aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies.gradle2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java88
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java163
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java100
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java77
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/LoaderReference.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java59
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java45
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java237
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java55
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java104
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java61
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java18
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java82
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java103
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java84
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java24
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java86
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java68
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java45
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java384
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java64
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java67
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java75
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java120
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java59
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java73
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java71
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java41
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java49
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java58
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java63
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java71
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java424
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java105
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java396
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java68
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java86
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java1245
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java585
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java94
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java50
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java7
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/EIGPacket.java7
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java69
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java82
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java35
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java179
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java53
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java862
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java44
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java394
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java196
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CrackingDistillTower.java53
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java123
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java351
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java782
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java581
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java258
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java223
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java413
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java379
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java277
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java220
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java459
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java180
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java308
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java488
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java140
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java489
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java73
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java58
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java265
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java123
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java41
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java90
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java72
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java1106
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java75
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java68
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java69
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java75
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java46
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java54
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java110
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java38
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java119
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java38
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java167
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java193
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java113
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java87
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java183
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java621
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java314
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java728
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java383
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java38
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java130
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java47
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java71
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java171
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java166
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java141
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java387
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java89
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java31
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java63
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java104
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java802
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java82
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java35
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java66
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java133
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java130
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java95
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java35
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java255
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java660
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java100
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java52
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java454
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java118
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java51
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java55
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java103
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/MegaUtils.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java67
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java154
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java101
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java35
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java51
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java41
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java38
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java31
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java90
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java98
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java192
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java244
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java62
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java252
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java33
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java77
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java32
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java65
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java40
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java38
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java59
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java63
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java114
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java134
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java49
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java44
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java74
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java137
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java59
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java59
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java114
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java77
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java114
257 files changed, 12670 insertions, 17078 deletions
diff --git a/dependencies.gradle b/dependencies.gradle
index 6438489b5a..a4f0718b63 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,7 +1,7 @@
// Add your dependencies here
dependencies {
- compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.232:dev")
+ compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.254:dev")
compile("com.github.GTNewHorizons:StructureLib:1.2.0-beta.2:dev")
compile("com.github.GTNewHorizons:TecTech:5.0.67:dev")
compile("com.github.GTNewHorizons:NotEnoughItems:2.3.20-GTNH:dev")
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.
* <p>
* 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.
* <p>
- * IStructureElements returned from this class <b>SHOULD NOT</b> have its methods called before post init, or else
- * you might end up with wrong autoplace hints.
+ * IStructureElements returned from this class <b>SHOULD NOT</b> 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<Byte, Pair<Block, Integer>> allLevels) {
+ private static void doRegister(byte level, Block block, int meta,
+ SetMultimap<Byte, Pair<Block, Integer>> 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 <b>borosilicate</b> 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 <b>borosilicate</b> glass. DOES NOT accept other glass like
+ * reinforced glass, magic mirror, vanilla glass, etc. unless these glass are explicitly registered as a
+ * borosilicate glass.
* <p>
* 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 <b>borosilicate</b> 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 <b>borosilicate</b> glass. DOES NOT accept other glass like reinforced
+ * glass, magic mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass.
* <p>
* 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 <b>borosilicate</b> 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 <b>borosilicate</b> glass. DOES NOT accept other glass like reinforced glass, magic
+ * mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass.
* <p>
* This assumes you want all glass used to be of the same tier.
* <p>
- * 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 <T> IStructureElement<T> ofBoroGlass(
- byte initialValue, BiConsumer<T, Byte> setter, Function<T, Byte> getter) {
+ public static <T> IStructureElement<T> ofBoroGlass(byte initialValue, BiConsumer<T, Byte> setter,
+ Function<T, Byte> getter) {
return lazy(
t -> ofBlocksTiered(BorosilicateGlass::getTier, getRepresentatives(), initialValue, setter, getter));
}
/**
- * Get a structure element for <b>borosilicate</b> 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 <b>borosilicate</b> 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 <T> IStructureElement<T> ofBoroGlass(
- byte initialValue, byte minTier, byte maxTier, BiConsumer<T, Byte> setter, Function<T, Byte> getter) {
+ public static <T> IStructureElement<T> ofBoroGlass(byte initialValue, byte minTier, byte maxTier,
+ BiConsumer<T, Byte> setter, Function<T, Byte> 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(
+ 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));
}
/**
- * Get the tier of this <b>borosilicate</b> glass. DOES NOT consider other glass like reinforced glass, magic mirror, vanilla glass, etc.
- * unless these glass are explicitly registered as a borosilicate glass.
+ * Get the tier of this <b>borosilicate</b> glass. DOES NOT consider other glass like reinforced glass, magic
+ * mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass.
*
* @return glass tier, or -1 if is not a borosilicate glass
*/
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java
index 61ce6d2c8a..4a85029994 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java
@@ -1,23 +1,14 @@
/*
- * 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;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
index 19f422265b..9d2e2d7829 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
@@ -1,23 +1,14 @@
/*
- * 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;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java
index d7de7ee822..d74263115b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java
@@ -1,27 +1,19 @@
/*
- * 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 interface ITileAddsInformation {
+
String[] getInfoData();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java
index 22403b5cc1..1f75115752 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java
@@ -1,23 +1,14 @@
/*
- * 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;
@@ -25,7 +16,8 @@ package com.github.bartimaeusnek.bartworks.API;
import net.minecraft.inventory.ISidedInventory;
public interface ITileDropsContent extends ISidedInventory {
+
default int[] getDropSlots() {
- return new int[] {0};
+ return new int[] { 0 };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java
index 473908c7a3..4100b17760 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java
@@ -1,33 +1,25 @@
/*
- * 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 cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public interface ITileHasDifferentTextureSides {
IIcon[] texture = new IIcon[7];
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/LoaderReference.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/LoaderReference.java
index 14c56e7ad9..acc2da9ede 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/LoaderReference.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/LoaderReference.java
@@ -1,23 +1,14 @@
/*
- * 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;
@@ -28,6 +19,7 @@ import cpw.mods.fml.common.Loader;
* DO NOT CALL THIS IN THE CORE MOD! IT WILL __NOT__ WORK AND FUCK EVERYTHING UP!
*/
public class LoaderReference {
+
private LoaderReference() {}
public static boolean Natura;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java
index a11e0c4a03..041096d4f6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java
@@ -1,23 +1,14 @@
/*
- * 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;
@@ -27,16 +18,14 @@ import cpw.mods.fml.common.FMLCommonHandler;
public class SideReference {
public static class EffectiveSide {
- public static final boolean Server =
- FMLCommonHandler.instance().getEffectiveSide().isServer();
- public static final boolean Client =
- FMLCommonHandler.instance().getEffectiveSide().isClient();
+
+ public static final boolean Server = FMLCommonHandler.instance().getEffectiveSide().isServer();
+ public static final boolean Client = FMLCommonHandler.instance().getEffectiveSide().isClient();
}
public static class Side {
- public static final boolean Server =
- FMLCommonHandler.instance().getSide().isServer();
- public static final boolean Client =
- FMLCommonHandler.instance().getSide().isClient();
+
+ public static final boolean Server = FMLCommonHandler.instance().getSide().isServer();
+ public static final boolean Client = FMLCommonHandler.instance().getSide().isClient();
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java
index 29b84ae5ca..7dd376c310 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java
@@ -1,39 +1,31 @@
/*
- * 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 gregtech.api.interfaces.ISubTagContainer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import gregtech.api.interfaces.ISubTagContainer;
+
public class VoidMinerDropAdder {
private static Method getExtraDropsDimMap;
static {
try {
- getExtraDropsDimMap = Class.forName(
- "com.github.bartimaeusnek.crossmod.galacticgreg.GT_TileEntity_VoidMiner_Base")
+ getExtraDropsDimMap = Class
+ .forName("com.github.bartimaeusnek.crossmod.galacticgreg.GT_TileEntity_VoidMiner_Base")
.getMethod("addMatierialToDimensionList", int.class, ISubTagContainer.class, float.class);
} catch (NoSuchMethodException | ClassNotFoundException e) {
e.printStackTrace();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
index f8079ff6ff..17a33e768d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
@@ -1,23 +1,14 @@
/*
- * 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;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java
index 577e9621ff..2cd29281f4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java
@@ -1,23 +1,14 @@
/*
- * 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;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
index 86d9d2c0b8..590486cf6e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
@@ -2,17 +2,18 @@ package com.github.bartimaeusnek.bartworks.API.modularUI;
import static com.github.bartimaeusnek.bartworks.MainMod.MOD_ID;
-import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture;
-import com.gtnewhorizons.modularui.api.drawable.UITexture;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
+import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture;
+import com.gtnewhorizons.modularui.api.drawable.UITexture;
+
public class BW_UITextures {
- public static final AdaptableUITexture BACKGROUND_BROWN =
- AdaptableUITexture.of(MOD_ID, "GUI/background/brown", 176, 166, 3);
- public static final UITexture BACKGROUND_CIRCUIT_PROGRAMMER =
- UITexture.fullImage(MOD_ID, "GUI/background/circuit_programmer");
+ public static final AdaptableUITexture BACKGROUND_BROWN = AdaptableUITexture
+ .of(MOD_ID, "GUI/background/brown", 176, 166, 3);
+ public static final UITexture BACKGROUND_CIRCUIT_PROGRAMMER = UITexture
+ .fullImage(MOD_ID, "GUI/background/circuit_programmer");
public static final AdaptableUITexture SLOT_BROWN = AdaptableUITexture.of(MOD_ID, "GUI/slot/brown", 18, 18, 1);
@@ -23,34 +24,32 @@ public class BW_UITextures {
public static final UITexture OVERLAY_SLOT_CROSS = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/cross");
public static final UITexture PROGRESSBAR_SIEVERT = UITexture.fullImage(MOD_ID, "GUI/progressbar/sievert");
- public static final UITexture PROGRESSBAR_STORED_EU_116 =
- UITexture.fullImage(MOD_ID, "GUI/progressbar/stored_eu_116");
+ public static final UITexture PROGRESSBAR_STORED_EU_116 = UITexture
+ .fullImage(MOD_ID, "GUI/progressbar/stored_eu_116");
public static final UITexture PROGRESSBAR_FUEL = UITexture.fullImage(MOD_ID, "GUI/progressbar/fuel");
public static final UITexture PICTURE_BW_LOGO_47X21 = UITexture.fullImage(MOD_ID, "GUI/picture/bw_logo_47x21");
- public static final UITexture PICTURE_SIEVERT_CONTAINER =
- UITexture.fullImage(MOD_ID, "GUI/picture/sievert_container");
- public static final UITexture PICTURE_DECAY_TIME_CONTAINER =
- UITexture.fullImage(MOD_ID, "GUI/picture/decay_time_container");
- public static final UITexture PICTURE_DECAY_TIME_INSIDE =
- UITexture.fullImage(MOD_ID, "GUI/picture/decay_time_inside");
+ public static final UITexture PICTURE_SIEVERT_CONTAINER = UITexture
+ .fullImage(MOD_ID, "GUI/picture/sievert_container");
+ public static final UITexture PICTURE_DECAY_TIME_CONTAINER = UITexture
+ .fullImage(MOD_ID, "GUI/picture/decay_time_container");
+ public static final UITexture PICTURE_DECAY_TIME_INSIDE = UITexture
+ .fullImage(MOD_ID, "GUI/picture/decay_time_inside");
public static final UITexture PICTURE_RADIATION = UITexture.fullImage(MOD_ID, "GUI/picture/radiation");
public static final UITexture PICTURE_WINDMILL_EMPTY = UITexture.fullImage(MOD_ID, "GUI/picture/windmill_empty");
- public static final UITexture[] PICTURE_WINDMILL_ROTATING = IntStream.range(0, 4)
- .mapToObj(i ->
- UITexture.partly(MOD_ID, "GUI/picture/windmill_rotating", 32, 128, 0, i * 32, 32, (i + 1) * 32))
- .collect(Collectors.toList())
- .toArray(new UITexture[0]);
+ public static final UITexture[] PICTURE_WINDMILL_ROTATING = IntStream.range(0, 4).mapToObj(
+ i -> UITexture.partly(MOD_ID, "GUI/picture/windmill_rotating", 32, 128, 0, i * 32, 32, (i + 1) * 32))
+ .collect(Collectors.toList()).toArray(new UITexture[0]);
public static final UITexture PICTURE_STORED_EU_FRAME = UITexture.fullImage(MOD_ID, "GUI/picture/stored_eu_frame");
- public static final UITexture PICTURE_RADIATION_SHUTTER_FRAME =
- UITexture.fullImage(MOD_ID, "GUI/picture/radiation_shutter_frame");
- public static final AdaptableUITexture PICTURE_RADIATION_SHUTTER_INSIDE =
- AdaptableUITexture.of(MOD_ID, "GUI/picture/radiation_shutter_inside", 51, 48, 1);
-
- public static final AdaptableUITexture TAB_TITLE_BROWN =
- AdaptableUITexture.of(MOD_ID, "GUI/tab/title_brown", 28, 28, 4);
- public static final AdaptableUITexture TAB_TITLE_DARK_BROWN =
- AdaptableUITexture.of(MOD_ID, "GUI/tab/title_dark_brown", 28, 28, 4);
- public static final AdaptableUITexture TAB_TITLE_ANGULAR_BROWN =
- AdaptableUITexture.of(MOD_ID, "GUI/tab/title_angular_brown", 28, 28, 4);
+ public static final UITexture PICTURE_RADIATION_SHUTTER_FRAME = UITexture
+ .fullImage(MOD_ID, "GUI/picture/radiation_shutter_frame");
+ public static final AdaptableUITexture PICTURE_RADIATION_SHUTTER_INSIDE = AdaptableUITexture
+ .of(MOD_ID, "GUI/picture/radiation_shutter_inside", 51, 48, 1);
+
+ public static final AdaptableUITexture TAB_TITLE_BROWN = AdaptableUITexture
+ .of(MOD_ID, "GUI/tab/title_brown", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_DARK_BROWN = AdaptableUITexture
+ .of(MOD_ID, "GUI/tab/title_dark_brown", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_ANGULAR_BROWN = AdaptableUITexture
+ .of(MOD_ID, "GUI/tab/title_angular_brown", 28, 28, 4);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java
index 7dabe8be07..bf495440e5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java
@@ -1,23 +1,14 @@
/*
- * 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.
*/
@API(owner = "bartworks", apiVersion = API_REFERENCE.VERSION, provides = "bartworks API")
package com.github.bartimaeusnek.bartworks.API;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java
index 5f618c6955..725a0135a4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java
@@ -1,23 +1,14 @@
/*
- * 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.ASM;
@@ -26,6 +17,7 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
+
import org.objectweb.asm.tree.MethodNode;
public class ASMUtils {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java
index 331dc32534..a747c95f7f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java
@@ -1,44 +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.ASM;
import static com.github.bartimaeusnek.bartworks.ASM.BWCoreTransformer.shouldTransform;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
+
import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
@SuppressWarnings("ALL")
public class BWCore extends DummyModContainer {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java
index 9f68bfd1c4..7227780e37 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java
@@ -1,35 +1,29 @@
/*
- * 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.ASM;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import cpw.mods.fml.relauncher.FMLInjectionData;
-import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import java.io.File;
import java.util.ArrayList;
import java.util.Map;
+
import net.minecraftforge.common.config.Configuration;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+
+import cpw.mods.fml.relauncher.FMLInjectionData;
+import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
+
@IFMLLoadingPlugin.SortingIndex(Integer.MAX_VALUE) // Load as late as possible (after fastcraft/OptiFine).
@IFMLLoadingPlugin.MCVersion("1.7.10")
@IFMLLoadingPlugin.TransformerExclusions("com.github.bartimaeusnek.bartworks.ASM")
@@ -51,7 +45,7 @@ public class BWCorePlugin implements IFMLLoadingPlugin {
@Override
public String[] getASMTransformerClass() {
- return new String[] {BWCoreTransformer.class.getName()};
+ return new String[] { BWCoreTransformer.class.getName() };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java
index 04932c3281..86480db53c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java
@@ -1,33 +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.ASM;
-import com.github.bartimaeusnek.bartworks.util.NonNullWrappedHashSet;
-import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityList;
-import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityListNode;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -35,9 +24,14 @@ import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.util.NonNullWrappedHashSet;
+import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityList;
+import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityListNode;
+
public class BWCoreStaticReplacementMethodes {
- private static ThreadLocal<AccessPriorityList<IRecipe>> RECENTLYUSEDRECIPES =
- ThreadLocal.withInitial(AccessPriorityList::new);
+
+ private static ThreadLocal<AccessPriorityList<IRecipe>> RECENTLYUSEDRECIPES = ThreadLocal
+ .withInitial(AccessPriorityList::new);
public static void clearRecentlyUsedRecipes() {
// the easiest way to ensure the cache is flushed without causing synchronization overhead
@@ -64,8 +58,7 @@ public class BWCoreStaticReplacementMethodes {
}
}
- if (i == 2
- && itemstack.getItem() == itemstack1.getItem()
+ if (i == 2 && itemstack.getItem() == itemstack1.getItem()
&& itemstack.stackSize == 1
&& itemstack1.stackSize == 1
&& itemstack.getItem().isRepairable()) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java
index 1120323d7c..58d65ddec5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java
@@ -1,23 +1,14 @@
/*
- * 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.ASM;
@@ -26,31 +17,28 @@ import static org.objectweb.asm.Opcodes.*;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.launchwrapper.IClassTransformer;
+
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.*;
public class BWCoreTransformer implements IClassTransformer {
- public static final String[] DESCRIPTIONFORCONFIG = {
- "REMOVING RAIN FROM LAST MILLENIUM (EXU)",
- "REMVOING CREATURES FROM LAST MILLENIUM (EXU)",
- "PATCHING GLOBAL RENDERER FOR USE WITH MY GALACTIC DIMS",
- "PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION",
- "[UNUSED] PLACING MY GLASS-BLOCK RUNNABLE INTO THE GT_API",
- "DUCTTAPING RWG WORLDEN FAILS",
- "PATCHING CRAFTING MANAGER FOR CACHING RECIPES"
- // "REMOVING 12% BONUS OUTPUTS FROM GT++ SIFTER"
+
+ public static final String[] DESCRIPTIONFORCONFIG = { "REMOVING RAIN FROM LAST MILLENIUM (EXU)",
+ "REMVOING CREATURES FROM LAST MILLENIUM (EXU)", "PATCHING GLOBAL RENDERER FOR USE WITH MY GALACTIC DIMS",
+ "PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION",
+ "[UNUSED] PLACING MY GLASS-BLOCK RUNNABLE INTO THE GT_API", "DUCTTAPING RWG WORLDEN FAILS",
+ "PATCHING CRAFTING MANAGER FOR CACHING RECIPES"
+ // "REMOVING 12% BONUS OUTPUTS FROM GT++ SIFTER"
};
public static final String[] CLASSESBEEINGTRANSFORMED = {
- "com.rwtema.extrautils.worldgen.endoftime.WorldProviderEndOfTime",
- "com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime",
- "net.minecraft.client.renderer.RenderGlobal",
- "thaumcraft.common.tiles.TileWandPedestal",
- "gregtech.GT_Mod",
- "rwg.world.ChunkGeneratorRealistic",
- "net.minecraft.item.crafting.CraftingManager"
- // "gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialSifter"
+ "com.rwtema.extrautils.worldgen.endoftime.WorldProviderEndOfTime",
+ "com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime",
+ "net.minecraft.client.renderer.RenderGlobal", "thaumcraft.common.tiles.TileWandPedestal", "gregtech.GT_Mod",
+ "rwg.world.ChunkGeneratorRealistic", "net.minecraft.item.crafting.CraftingManager"
+ // "gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialSifter"
};
static boolean obfs;
@@ -80,7 +68,10 @@ public class BWCoreTransformer implements IClassTransformer {
nu.insertBefore(
beginning,
new FieldInsnNode(
- GETFIELD, "net/minecraft/world/World", obfs ? "field_72995_K" : "isRemote", "Z"));
+ GETFIELD,
+ "net/minecraft/world/World",
+ obfs ? "field_72995_K" : "isRemote",
+ "Z"));
nu.insertBefore(beginning, new JumpInsnNode(IFNE, label));
nu.add(new InsnNode(POP));
nu.add(label);
@@ -94,8 +85,8 @@ public class BWCoreTransformer implements IClassTransformer {
public static byte[] transform(int id, byte[] basicClass) {
if (!BWCoreTransformer.shouldTransform[id]) {
- BWCore.BWCORE_LOG.info(
- "Patch: " + BWCoreTransformer.DESCRIPTIONFORCONFIG[id] + " is disabled, will not patch!");
+ BWCore.BWCORE_LOG
+ .info("Patch: " + BWCoreTransformer.DESCRIPTIONFORCONFIG[id] + " is disabled, will not patch!");
return basicClass;
}
@@ -105,8 +96,7 @@ public class BWCoreTransformer implements IClassTransformer {
ClassNode classNode = new ClassNode();
classReader.accept(classNode, ClassReader.SKIP_FRAMES);
List<MethodNode> methods = classNode.methods;
- scase:
- switch (id) {
+ scase: switch (id) {
case 0: {
BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
String name_deObfs = "canDoRainSnowIce";
@@ -122,7 +112,11 @@ public class BWCoreTransformer implements IClassTransformer {
}
BWCore.BWCORE_LOG.info("Creating new " + name_deObfs + "!");
MethodNode nu = new MethodNode(
- ACC_PUBLIC, name_deObfs, /*obfs ? dsc_Obfs :*/ dsc_deObfs, null, new String[0]);
+ ACC_PUBLIC,
+ name_deObfs,
+ /* obfs ? dsc_Obfs : */ dsc_deObfs,
+ null,
+ new String[0]);
InsnList insnList = new InsnList();
insnList.add(new InsnNode(ICONST_0));
insnList.add(new InsnNode(IRETURN));
@@ -169,7 +163,7 @@ public class BWCoreTransformer implements IClassTransformer {
&& ASMUtils.isCorrectMethod(toPatch, dsc_universal)) {
BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!");
InsnList nu = new InsnList();
- LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()};
+ LabelNode[] LabelNodes = { new LabelNode(), new LabelNode() };
String theWorld_src = "field_72769_h";
String renderEngine_src = "field_72770_i";
@@ -181,92 +175,92 @@ public class BWCoreTransformer implements IClassTransformer {
if (toPatch.instructions.get(j) instanceof FieldInsnNode
&& toPatch.instructions.get(j).getOpcode() == GETSTATIC
&& !(nameFieldToPatch = ASMUtils.matchAny(
- ((FieldInsnNode) toPatch.instructions.get(j)).name,
- field_deObfs,
- field_src))
- .isEmpty()) {
+ ((FieldInsnNode) toPatch.instructions.get(j)).name,
+ field_deObfs,
+ field_src)).isEmpty()) {
boolean useSrc = nameFieldToPatch.equals(field_src);
- if (useSrc)
- BWCore.BWCORE_LOG.info(
- "Found either Optifine or Fastcraft... this patch was annoying to make compatible to them...");
+ if (useSrc) BWCore.BWCORE_LOG.info(
+ "Found either Optifine or Fastcraft... this patch was annoying to make compatible to them...");
nu.add(new VarInsnNode(ALOAD, 0));
- nu.add(new FieldInsnNode(
- GETFIELD,
- "net/minecraft/client/renderer/RenderGlobal",
- useSrc ? theWorld_src : "theWorld",
- "Lnet/minecraft/client/multiplayer/WorldClient;"));
- nu.add(new FieldInsnNode(
- GETFIELD,
- "net/minecraft/client/multiplayer/WorldClient",
- useSrc ? provider_src : "provider",
- "Lnet/minecraft/world/WorldProvider;"));
+ nu.add(
+ new FieldInsnNode(
+ GETFIELD,
+ "net/minecraft/client/renderer/RenderGlobal",
+ useSrc ? theWorld_src : "theWorld",
+ "Lnet/minecraft/client/multiplayer/WorldClient;"));
+ nu.add(
+ new FieldInsnNode(
+ GETFIELD,
+ "net/minecraft/client/multiplayer/WorldClient",
+ useSrc ? provider_src : "provider",
+ "Lnet/minecraft/world/WorldProvider;"));
nu.add(
new TypeInsnNode(
INSTANCEOF,
"com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace"));
nu.add(new JumpInsnNode(IFEQ, LabelNodes[0]));
nu.add(new VarInsnNode(ALOAD, 0));
- nu.add(new FieldInsnNode(
- GETFIELD,
- "net/minecraft/client/renderer/RenderGlobal",
- useSrc ? renderEngine_src : "renderEngine",
- "Lnet/minecraft/client/renderer/texture/TextureManager;"));
- nu.add(new FieldInsnNode(
- GETSTATIC,
- "com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b",
- "sunTex",
- "Lnet/minecraft/util/ResourceLocation;"));
- nu.add(new MethodInsnNode(
- INVOKEVIRTUAL,
- "net/minecraft/client/renderer/texture/TextureManager",
- useSrc ? bindTexture_src : "bindTexture",
- "(Lnet/minecraft/util/ResourceLocation;)V",
- false));
+ nu.add(
+ new FieldInsnNode(
+ GETFIELD,
+ "net/minecraft/client/renderer/RenderGlobal",
+ useSrc ? renderEngine_src : "renderEngine",
+ "Lnet/minecraft/client/renderer/texture/TextureManager;"));
+ nu.add(
+ new FieldInsnNode(
+ GETSTATIC,
+ "com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b",
+ "sunTex",
+ "Lnet/minecraft/util/ResourceLocation;"));
+ nu.add(
+ new MethodInsnNode(
+ INVOKEVIRTUAL,
+ "net/minecraft/client/renderer/texture/TextureManager",
+ useSrc ? bindTexture_src : "bindTexture",
+ "(Lnet/minecraft/util/ResourceLocation;)V",
+ false));
nu.add(new JumpInsnNode(GOTO, LabelNodes[1]));
nu.add(LabelNodes[0]);
nu.add(new VarInsnNode(ALOAD, 0));
- nu.add(new FieldInsnNode(
- GETFIELD,
- "net/minecraft/client/renderer/RenderGlobal",
- useSrc ? renderEngine_src : "renderEngine",
- "Lnet/minecraft/client/renderer/texture/TextureManager;"));
- nu.add(new FieldInsnNode(
- GETSTATIC,
- "net/minecraft/client/renderer/RenderGlobal",
- useSrc ? field_src : "locationSunPng",
- "Lnet/minecraft/util/ResourceLocation;"));
- nu.add(new MethodInsnNode(
- INVOKEVIRTUAL,
- "net/minecraft/client/renderer/texture/TextureManager",
- useSrc ? bindTexture_src : "bindTexture",
- "(Lnet/minecraft/util/ResourceLocation;)V",
- false));
+ nu.add(
+ new FieldInsnNode(
+ GETFIELD,
+ "net/minecraft/client/renderer/RenderGlobal",
+ useSrc ? renderEngine_src : "renderEngine",
+ "Lnet/minecraft/client/renderer/texture/TextureManager;"));
+ nu.add(
+ new FieldInsnNode(
+ GETSTATIC,
+ "net/minecraft/client/renderer/RenderGlobal",
+ useSrc ? field_src : "locationSunPng",
+ "Lnet/minecraft/util/ResourceLocation;"));
+ nu.add(
+ new MethodInsnNode(
+ INVOKEVIRTUAL,
+ "net/minecraft/client/renderer/texture/TextureManager",
+ useSrc ? bindTexture_src : "bindTexture",
+ "(Lnet/minecraft/util/ResourceLocation;)V",
+ false));
nu.add(LabelNodes[1]);
j++;
} else {
if (j < toPatch.instructions.size() - 2) {
if (toPatch.instructions.get(j + 2) instanceof FieldInsnNode
- && toPatch.instructions
- .get(j + 2)
- .getOpcode()
- == GETSTATIC
+ && toPatch.instructions.get(j + 2).getOpcode() == GETSTATIC
&& !ASMUtils.matchAny(
- ((FieldInsnNode) toPatch.instructions.get(j + 2)).name,
- field_deObfs,
- field_src)
- .isEmpty()) continue;
+ ((FieldInsnNode) toPatch.instructions.get(j + 2)).name,
+ field_deObfs,
+ field_src).isEmpty())
+ continue;
if (toPatch.instructions.get(j + 1) instanceof FieldInsnNode
- && toPatch.instructions
- .get(j + 1)
- .getOpcode()
- == GETSTATIC
+ && toPatch.instructions.get(j + 1).getOpcode() == GETSTATIC
&& !ASMUtils.matchAny(
- ((FieldInsnNode) toPatch.instructions.get(j + 1)).name,
- field_deObfs,
- field_src)
- .isEmpty()) continue;
+ ((FieldInsnNode) toPatch.instructions.get(j + 1)).name,
+ field_deObfs,
+ field_src).isEmpty())
+ continue;
}
nu.add(toPatch.instructions.get(j));
}
@@ -301,7 +295,7 @@ public class BWCoreTransformer implements IClassTransformer {
for (MethodNode toPatch : methods) {
if (ASMUtils.isCorrectMethod(toPatch, name_deObfs)) {
BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!");
- LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()};
+ LabelNode[] LabelNodes = { new LabelNode(), new LabelNode() };
InsnList nu = new InsnList();
// if (x < -28675) x %= -28675;
nu.add(new VarInsnNode(ILOAD, 2));
@@ -341,12 +335,13 @@ public class BWCoreTransformer implements IClassTransformer {
toPatch.instructions = new InsnList();
toPatch.instructions.add(new VarInsnNode(ALOAD, 1));
toPatch.instructions.add(new VarInsnNode(ALOAD, 2));
- toPatch.instructions.add(new MethodInsnNode(
- INVOKESTATIC,
- "com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes",
- "findCachedMatchingRecipe",
- "(Lnet/minecraft/inventory/InventoryCrafting;Lnet/minecraft/world/World;)Lnet/minecraft/item/ItemStack;",
- false));
+ toPatch.instructions.add(
+ new MethodInsnNode(
+ INVOKESTATIC,
+ "com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes",
+ "findCachedMatchingRecipe",
+ "(Lnet/minecraft/inventory/InventoryCrafting;Lnet/minecraft/world/World;)Lnet/minecraft/item/ItemStack;",
+ false));
toPatch.instructions.add(new InsnNode(ARETURN));
toPatch.localVariables.clear();
toPatch.maxStack = 2;
@@ -356,12 +351,12 @@ public class BWCoreTransformer implements IClassTransformer {
}
}
- // case 6: {
- // BWCore.BWCORE_LOG.info("Could find: " +
- // BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
- // ((IntInsnNode) methods.get(11).instructions.get(10)).operand = 10000;
- // break scase;
- // }
+ // case 6: {
+ // BWCore.BWCORE_LOG.info("Could find: " +
+ // BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
+ // ((IntInsnNode) methods.get(11).instructions.get(10)).operand = 10000;
+ // break scase;
+ // }
default: {
BWCore.BWCORE_LOG.info("Could not find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
return basicClass;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
index 28dbaf5250..d4a1e0015f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
@@ -1,32 +1,24 @@
/*
- * 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;
-import com.github.bartimaeusnek.bartworks.API.SideReference;
-import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import cpw.mods.fml.common.network.IGuiHandler;
+
public class GuiHandler implements IGuiHandler {
@Override
@@ -36,8 +28,7 @@ public class GuiHandler implements IGuiHandler {
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- if (SideReference.Side.Client) {
- } else return getServerGuiElement(ID, player, world, x, y, z);
+ if (SideReference.Side.Client) {} else return getServerGuiElement(ID, player, world, x, y, z);
return null;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index 3dc2ef474e..2a873977a9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -1,23 +1,14 @@
/*
- * 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;
@@ -26,6 +17,16 @@ import static com.github.bartimaeusnek.bartworks.common.loaders.BioRecipeLoader.
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.removeIC2Recipes;
import static gregtech.api.enums.GT_Values.VN;
+import java.io.IOException;
+import java.util.Map;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.MinecraftForge;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import com.github.bartimaeusnek.bartworks.API.*;
import com.github.bartimaeusnek.bartworks.client.ClientEventHandler.TooltipEventHandler;
import com.github.bartimaeusnek.bartworks.client.creativetabs.BioTab;
@@ -45,6 +46,7 @@ import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.DownTierLoader;
import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.*;
@@ -53,21 +55,13 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
-import java.io.IOException;
-import java.util.Map;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.MinecraftForge;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
@SuppressWarnings("ALL")
@Mod(
modid = MainMod.MOD_ID,
name = MainMod.NAME,
version = MainMod.VERSION,
- dependencies = "required-after:IC2; "
- + "required-after:gregtech; "
+ dependencies = "required-after:IC2; " + "required-after:gregtech; "
+ "after:berriespp; "
+ "after:tectech; "
+ "after:GalacticraftMars; "
@@ -77,6 +71,7 @@ import org.apache.logging.log4j.Logger;
+ "after:RandomThings; "
+ "before:miscutils; ")
public final class MainMod {
+
public static final String NAME = "BartWorks";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String MOD_ID = "bartworks";
@@ -161,8 +156,8 @@ public final class MainMod {
NetworkRegistry.INSTANCE.registerGuiHandler(MainMod.instance, MainMod.GH);
if (ConfigHandler.BioLab) {
GTNHBlocks.run();
- for (Map.Entry<BioVatLogicAdder.BlockMetaPair, Byte> pair :
- BioVatLogicAdder.BioVatGlass.getGlassMap().entrySet()) {
+ for (Map.Entry<BioVatLogicAdder.BlockMetaPair, Byte> pair : BioVatLogicAdder.BioVatGlass.getGlassMap()
+ .entrySet()) {
GT_OreDictUnificator.registerOre(
"blockGlass" + VN[pair.getValue()],
new ItemStack(pair.getKey().getBlock(), 1, pair.getKey().getaByte()));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java
index c571fdbef2..4c59aa38ef 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java
@@ -1,36 +1,30 @@
/*
- * 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.client.ClientEventHandler;
-import com.github.bartimaeusnek.bartworks.util.Pair;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
+
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+
class TooltipCache {
+
private static final HashMap<Pair<Integer, Short>, char[]> cache = new HashMap<>();
static boolean put(ItemStack itemStack, List<String> tooltip) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java
index 33892d57ae..1c004ec151 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java
@@ -1,27 +1,30 @@
/*
- * 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.client.ClientEventHandler;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.event.entity.player.ItemTooltipEvent;
+
import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks;
@@ -31,6 +34,7 @@ import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.eventhandler.EventPriority;
@@ -39,16 +43,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.GT_Values;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.event.entity.player.ItemTooltipEvent;
@SideOnly(Side.CLIENT)
public class TooltipEventHandler {
@@ -61,11 +55,11 @@ public class TooltipEventHandler {
if (TooltipCache.getTooltip(event.itemStack).isEmpty()) {
ItemStack tmp = event.itemStack.copy();
- Pair<Integer, Short> abstractedStack =
- new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage());
+ Pair<Integer, Short> abstractedStack = new Pair<>(
+ Item.getIdFromItem(tmp.getItem()),
+ (short) tmp.getItemDamage());
List<String> tooAdd = new ArrayList<>();
- if (ConfigHandler.sharedItemStackTooltip
- && OreDictHandler.getNonBWCache().contains(abstractedStack)) {
+ if (ConfigHandler.sharedItemStackTooltip && OreDictHandler.getNonBWCache().contains(abstractedStack)) {
for (Pair<Integer, Short> pair : OreDictHandler.getNonBWCache()) {
if (pair.equals(abstractedStack)) {
GameRegistry.UniqueIdentifier UI = GameRegistry.findUniqueIdentifierFor(tmp.getItem());
@@ -73,19 +67,24 @@ public class TooltipEventHandler {
UI = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(tmp.getItem()));
if (UI != null) {
for (ModContainer modContainer : Loader.instance().getModList()) {
- if (UI.modId.equals(MainMod.MOD_ID)
- || UI.modId.equals(BartWorksCrossmod.MOD_ID)
- || UI.modId.equals("BWCore")) break;
+ if (UI.modId.equals(MainMod.MOD_ID) || UI.modId.equals(BartWorksCrossmod.MOD_ID)
+ || UI.modId.equals("BWCore"))
+ break;
if (UI.modId.equals(modContainer.getModId())) {
- tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks"
- + ChatColorHelper.GRAY + " and " + ChatColorHelper.RED
- + modContainer.getName());
+ tooAdd.add(
+ "Shared ItemStack between " + ChatColorHelper.DARKGREEN
+ + "BartWorks"
+ + ChatColorHelper.GRAY
+ + " and "
+ + ChatColorHelper.RED
+ + modContainer.getName());
}
}
- } else
- tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks"
- + ChatColorHelper.GRAY
- + " and another Mod, that doesn't use the ModContainer propperly!");
+ } else tooAdd.add(
+ "Shared ItemStack between " + ChatColorHelper.DARKGREEN
+ + "BartWorks"
+ + ChatColorHelper.GRAY
+ + " and another Mod, that doesn't use the ModContainer propperly!");
}
}
}
@@ -96,16 +95,23 @@ public class TooltipEventHandler {
TooltipCache.put(event.itemStack, tooAdd);
return;
}
- BioVatLogicAdder.BlockMetaPair PAIR =
- new BioVatLogicAdder.BlockMetaPair(BLOCK, (byte) event.itemStack.getItemDamage());
+ BioVatLogicAdder.BlockMetaPair PAIR = new BioVatLogicAdder.BlockMetaPair(
+ BLOCK,
+ (byte) event.itemStack.getItemDamage());
HashMap<BioVatLogicAdder.BlockMetaPair, Byte> GLASSMAP = BioVatLogicAdder.BioVatGlass.getGlassMap();
if (GLASSMAP.containsKey(PAIR)) {
int tier = GLASSMAP.get(PAIR);
- tooAdd.add(StatCollector.translateToLocal("tooltip.glas.0.name") + " "
- + BW_ColorUtil.getColorForTier(tier) + GT_Values.VN[tier] + ChatColorHelper.RESET);
+ tooAdd.add(
+ StatCollector.translateToLocal("tooltip.glas.0.name") + " "
+ + BW_ColorUtil.getColorForTier(tier)
+ + GT_Values.VN[tier]
+ + ChatColorHelper.RESET);
} else if (BLOCK.getMaterial().equals(Material.glass)) {
- tooAdd.add(StatCollector.translateToLocal("tooltip.glas.0.name") + " "
- + BW_ColorUtil.getColorForTier(3) + GT_Values.VN[3] + ChatColorHelper.RESET);
+ tooAdd.add(
+ StatCollector.translateToLocal("tooltip.glas.0.name") + " "
+ + BW_ColorUtil.getColorForTier(3)
+ + GT_Values.VN[3]
+ + ChatColorHelper.RESET);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java
index 0360502170..efd085f320 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java
@@ -1,31 +1,23 @@
/*
- * 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.client.creativetabs;
-import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+
public class BioTab extends CreativeTabs {
public BioTab(String lable) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
index a300c63802..5a42164597 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
@@ -1,31 +1,23 @@
/*
- * 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.client.creativetabs;
-import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+
public class GT2Tab extends CreativeTabs {
public GT2Tab(String lable) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
index d80aa74a11..53be7436ce 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
@@ -1,31 +1,23 @@
/*
- * 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.client.creativetabs;
-import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+
public class bartworksTab extends CreativeTabs {
public bartworksTab(String lable) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
index c3339e156d..ccacef6c3f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
@@ -1,39 +1,34 @@
/*
- * 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.client.gui;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+import org.lwjgl.opengl.GL11;
+
import com.github.bartimaeusnek.bartworks.MainMod;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator;
import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator;
import ic2.core.util.GuiTooltipHelper;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator {
+
public ContainerWindKineticGenerator container;
public String name;
@@ -44,15 +39,21 @@ public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator {
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- this.fontRendererObj.drawString(
- this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 6, 2157374);
+ this.fontRendererObj
+ .drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 6, 2157374);
if (this.container.base.checkrotor()) {
if (!this.container.base.rotorspace()) {
this.fontRendererObj.drawString(
- StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotorspace"), 27, 52, 2157374);
+ StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotorspace"),
+ 27,
+ 52,
+ 2157374);
} else if (this.container.base.checkrotor() && !this.container.base.guiisminWindStrength()) {
this.fontRendererObj.drawString(
- StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak1"), 27, 52, 2157374);
+ StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak1"),
+ 27,
+ 52,
+ 2157374);
} else {
this.fontRendererObj.drawString(this.container.base.getRotorhealth() + " %", 46, 52, 2157374);
if (this.container.base.guiisoverload()) {
@@ -68,14 +69,16 @@ public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator {
}
} else {
this.fontRendererObj.drawString(
- StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"), 27, 52, 2157374);
+ StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"),
+ 27,
+ 52,
+ 2157374);
}
}
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor3f(0.5f, 0.25f, 0.07f);
- this.mc
- .getTextureManager()
+ this.mc.getTextureManager()
.bindTexture(new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUIPrimitiveKUBox.png"));
int j = (this.width - this.xSize) / 2;
int k = (this.height - this.ySize) / 2;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java
index 58ef11827a..1bef2a4a2e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java
@@ -1,18 +1,22 @@
package com.github.bartimaeusnek.bartworks.client.renderer;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.lang.reflect.Field;
+
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.init.Blocks;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.world.World;
+
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class BW_CropVisualizer extends EntityFX {
+
int[] meta = new int[8];
static Field tessellatorHasBrightnessField = null;
@@ -31,22 +35,15 @@ public class BW_CropVisualizer extends EntityFX {
}
@Override
- public void renderParticle(
- Tessellator p_70539_1_,
- float p_70539_2_,
- float p_70539_3_,
- float p_70539_4_,
- float p_70539_5_,
- float p_70539_6_,
- float p_70539_7_) {
+ public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_,
+ float p_70539_5_, float p_70539_6_, float p_70539_7_) {
Tessellator tessellator = Tessellator.instance;
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDepthMask(false);
try {
if (tessellatorHasBrightnessField == null) {
tessellatorHasBrightnessField = Tessellator.class.getDeclaredField(
- (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")
- ? "hasBrightness"
+ (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment") ? "hasBrightness"
: "field_78414_p");
tessellatorHasBrightnessField.setAccessible(true);
}
@@ -57,13 +54,12 @@ public class BW_CropVisualizer extends EntityFX {
tessellator.setColorRGBA(255, 255, 255, 255);
double f12 = this.posY - interpPosY;
int i = 0;
- for (int x = -1; x <= 1; x++)
- for (int z = -1; z <= 1; z++) {
- if (x == 0 && z == 0) continue;
- double f11 = (this.posX + (double) x) - interpPosX;
- double f13 = (this.posZ + (double) z) - interpPosZ;
- RenderBlocks.getInstance().renderBlockCropsImpl(Blocks.wheat, meta[i++], f11, f12, f13);
- }
+ for (int x = -1; x <= 1; x++) for (int z = -1; z <= 1; z++) {
+ if (x == 0 && z == 0) continue;
+ double f11 = (this.posX + (double) x) - interpPosX;
+ double f13 = (this.posZ + (double) z) - interpPosZ;
+ RenderBlocks.getInstance().renderBlockCropsImpl(Blocks.wheat, meta[i++], f11, f12, f13);
+ }
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDepthMask(true);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java
index 01a08ed8a2..37e55767bb 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java
@@ -1,15 +1,17 @@
package com.github.bartimaeusnek.bartworks.client.renderer;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+
@SideOnly(Side.CLIENT)
public class BW_EICPistonVisualizer extends EntityFX {
@@ -27,14 +29,8 @@ public class BW_EICPistonVisualizer extends EntityFX {
}
@Override
- public void renderParticle(
- Tessellator p_70539_1_,
- float p_70539_2_,
- float p_70539_3_,
- float p_70539_4_,
- float p_70539_5_,
- float p_70539_6_,
- float p_70539_7_) {
+ public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_,
+ float p_70539_5_, float p_70539_6_, float p_70539_7_) {
Tessellator tessellator = Tessellator.instance;
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDepthMask(false);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java
index ab9a04fc18..b375a1c1b0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java
@@ -1,34 +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.client.renderer;
-import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_Meta_Items;
-import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader;
-import com.github.bartimaeusnek.bartworks.util.BW_Util;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.render.GT_RenderUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
@@ -38,10 +22,21 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
+
import org.lwjgl.opengl.GL11;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_Meta_Items;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.render.GT_RenderUtil;
+
@SideOnly(Side.CLIENT)
public class BW_GT_ItemRenderer implements IItemRenderer {
+
public BW_GT_ItemRenderer() {
for (BW_Meta_Items.BW_GT_MetaGen_Item_Hook tItem : BW_Meta_Items.BW_GT_MetaGen_Item_Hook.sInstances) {
MinecraftForgeClient.registerItemRenderer(tItem, this);
@@ -61,8 +56,8 @@ public class BW_GT_ItemRenderer implements IItemRenderer {
}
@Override
- public boolean shouldUseRenderHelper(
- IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) {
+ public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack,
+ IItemRenderer.ItemRendererHelper aHelper) {
if (GT_Utility.isStackInvalid(aStack)) {
return false;
} else {
@@ -108,23 +103,22 @@ public class BW_GT_ItemRenderer implements IItemRenderer {
}
}
} else {
- if (aMetaData < CircuitImprintLoader.reverseIDs)
- ItemRenderer.renderItemIn2D(
- Tessellator.instance,
- tIcon.getMaxU(),
- tIcon.getMinV(),
- tIcon.getMinU(),
- tIcon.getMaxV(),
- tIcon.getIconWidth(),
- tIcon.getIconHeight(),
- 0.0625F);
- // else {
- // for (int i = 0; i < 4; i++) {
- // ItemRenderer.renderItemIn2D(Tessellator.instance,
+ if (aMetaData < CircuitImprintLoader.reverseIDs) ItemRenderer.renderItemIn2D(
+ Tessellator.instance,
+ tIcon.getMaxU(),
+ tIcon.getMinV(),
+ tIcon.getMinU(),
+ tIcon.getMaxV(),
+ tIcon.getIconWidth(),
+ tIcon.getIconHeight(),
+ 0.0625F);
+ // else {
+ // for (int i = 0; i < 4; i++) {
+ // ItemRenderer.renderItemIn2D(Tessellator.instance,
// 0.0F+i*2F,0.0F+i*2F,10.0F+i*2F,10.0F+i*2F, tIcon.getIconWidth(), tIcon.getIconHeight(),0.0625F);
- // }
- // }
- // ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(),
+ // }
+ // }
+ // ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(),
// tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(),
// 0.0625F);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java
index bad6170263..a082a44d31 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java
@@ -1,35 +1,27 @@
/*
- * 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.client.renderer;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.IIconContainer;
import net.minecraft.block.Block;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.interfaces.IIconContainer;
+
@SideOnly(Side.CLIENT)
public class BW_GT_Vanilla_Texture implements IIconContainer {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java
index a55ed8be41..c298b6a321 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java
@@ -1,41 +1,36 @@
/*
- * 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.client.renderer;
import static gregtech.common.render.GT_Renderer_Block.*;
-import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Block_TE;
-import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Blocks;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import gregtech.GT_Mod;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
+
import org.lwjgl.opengl.GL11;
+import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Block_TE;
+import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Blocks;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import gregtech.GT_Mod;
+
public class BW_Renderer_Block_Ores implements ISimpleBlockRenderingHandler {
+
public static BW_Renderer_Block_Ores INSTANCE = new BW_Renderer_Block_Ores();
public final int mRenderID = RenderingRegistry.getNextAvailableRenderId();
public static final float blockMin = 0.0F;
@@ -64,8 +59,8 @@ public class BW_Renderer_Block_Ores implements ISimpleBlockRenderingHandler {
}
@Override
- public boolean renderWorldBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int modelId, RenderBlocks aRenderer) {
+ public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int modelId,
+ RenderBlocks aRenderer) {
BW_MetaGenerated_Block_TE tTileEntity = ((BW_MetaGenerated_Blocks) aBlock).getProperTileEntityForRendering();
tTileEntity.mMetaData = ((BW_MetaGenerated_Block_TE) aWorld.getTileEntity(aX, aY, aZ)).mMetaData;
aRenderer.useInventoryTint = false;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java
index 1e0ee45c9d..244d7e5c7c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java
@@ -1,39 +1,33 @@
/*
- * 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.client.renderer;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.world.IBlockAccess;
+
+import org.lwjgl.opengl.GL11;
+
import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks;
import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks2;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.world.IBlockAccess;
-import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RendererGlasBlock implements ISimpleBlockRenderingHandler {
@@ -76,8 +70,8 @@ public class RendererGlasBlock implements ISimpleBlockRenderingHandler {
}
@Override
- public boolean renderWorldBlock(
- IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
// renderer.setRenderBounds(0.001,0.001,0.001,0.999,0.999,0.999);
// renderer.setRenderBounds(0,0,0,1,1,1);
if (block instanceof BW_GlasBlocks) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
index e659a6d2f9..894d15cf4c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
@@ -1,34 +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.client.renderer;
-import com.github.bartimaeusnek.bartworks.common.blocks.BioFluidBlock;
-import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
-import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
-import com.github.bartimaeusnek.bartworks.util.Coords;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
@@ -40,8 +24,18 @@ import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fluids.BlockFluidBase;
import net.minecraftforge.fluids.IFluidBlock;
+import com.github.bartimaeusnek.bartworks.common.blocks.BioFluidBlock;
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
+import com.github.bartimaeusnek.bartworks.util.Coords;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler {
+
private static final float LIGHT_Y_NEG = 0.5f;
private static final float LIGHT_Y_POS = 1f;
private static final float LIGHT_XZ_NEG = 0.8f;
@@ -90,8 +84,8 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {}
@SideOnly(Side.CLIENT)
- public boolean renderWorldBlock(
- IBlockAccess iBlockAccess, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess iBlockAccess, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
if ((!(block instanceof BioFluidBlock))) return false;
Tessellator tessellator = Tessellator.instance;
Coords blockat = new Coords(x, y, z, iBlockAccess.getTileEntity(x, y, z).getWorldObj().provider.dimensionId);
@@ -114,12 +108,10 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
boolean renderTop = iBlockAccess.getBlock(x, y + 1, z) != blockFluidBase;
boolean renderBottom = block.shouldSideBeRendered(iBlockAccess, x, y - 1, z, 0)
&& iBlockAccess.getBlock(x, y - 1, z) != blockFluidBase;
- boolean[] renderSides = {
- block.shouldSideBeRendered(iBlockAccess, x, y, z - 1, 2),
- block.shouldSideBeRendered(iBlockAccess, x, y, z + 1, 3),
- block.shouldSideBeRendered(iBlockAccess, x - 1, y, z, 4),
- block.shouldSideBeRendered(iBlockAccess, x + 1, y, z, 5)
- };
+ boolean[] renderSides = { block.shouldSideBeRendered(iBlockAccess, x, y, z - 1, 2),
+ block.shouldSideBeRendered(iBlockAccess, x, y, z + 1, 3),
+ block.shouldSideBeRendered(iBlockAccess, x - 1, y, z, 4),
+ block.shouldSideBeRendered(iBlockAccess, x + 1, y, z, 5) };
if (!renderTop && !renderBottom && !renderSides[0] && !renderSides[1] && !renderSides[2] && !renderSides[3]) {
return false;
}
@@ -136,18 +128,18 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
float fluidHeightForRender6 = this.getFluidHeightForRender(iBlockAccess, x + 1, y, z - 1, blockFluidBase);
float fluidHeightForRender7 = this.getFluidHeightForRender(iBlockAccess, x + 1, y, z, blockFluidBase);
float fluidHeightForRender8 = this.getFluidHeightForRender(iBlockAccess, x + 1, y, z + 1, blockFluidBase);
- heightNW = this.getFluidHeightAverage(new float[] {
- fluidHeightForRender1, fluidHeightForRender2, fluidHeightForRender4, fluidHeightForRender
- });
- heightSW = this.getFluidHeightAverage(new float[] {
- fluidHeightForRender2, fluidHeightForRender3, fluidHeightForRender5, fluidHeightForRender
- });
- heightSE = this.getFluidHeightAverage(new float[] {
- fluidHeightForRender5, fluidHeightForRender7, fluidHeightForRender8, fluidHeightForRender
- });
- heightNE = this.getFluidHeightAverage(new float[] {
- fluidHeightForRender4, fluidHeightForRender6, fluidHeightForRender7, fluidHeightForRender
- });
+ heightNW = this.getFluidHeightAverage(
+ new float[] { fluidHeightForRender1, fluidHeightForRender2, fluidHeightForRender4,
+ fluidHeightForRender });
+ heightSW = this.getFluidHeightAverage(
+ new float[] { fluidHeightForRender2, fluidHeightForRender3, fluidHeightForRender5,
+ fluidHeightForRender });
+ heightSE = this.getFluidHeightAverage(
+ new float[] { fluidHeightForRender5, fluidHeightForRender7, fluidHeightForRender8,
+ fluidHeightForRender });
+ heightNE = this.getFluidHeightAverage(
+ new float[] { fluidHeightForRender4, fluidHeightForRender6, fluidHeightForRender7,
+ fluidHeightForRender });
} else {
heightNW = fluidHeightForRender;
heightSW = fluidHeightForRender;
@@ -165,14 +157,8 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
heightSE -= RendererSwitchingColorFluid.RENDER_OFFSET;
heightNE -= RendererSwitchingColorFluid.RENDER_OFFSET;
- double dInterpolatedU,
- dInterpolatedV,
- dInterpolatedU2,
- dInterpolatedV2,
- dInterpolatedU3,
- dInterpolatedV3,
- dInterpolatedU4,
- dInterpolatedV4;
+ double dInterpolatedU, dInterpolatedV, dInterpolatedU2, dInterpolatedV2, dInterpolatedU3, dInterpolatedV3,
+ dInterpolatedU4, dInterpolatedV4;
if (flowDir < -999.0f) {
dInterpolatedU = iconStill.getInterpolatedU(0.0);
@@ -321,11 +307,8 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
}
private IIcon getNullCheckedIiconOrFallbackTexture() {
- return FluidLoader.autogenIIcon != null
- ? FluidLoader.autogenIIcon
- : ((TextureMap) Minecraft.getMinecraft()
- .getTextureManager()
- .getTexture(TextureMap.locationBlocksTexture))
- .getAtlasSprite("missingno");
+ return FluidLoader.autogenIIcon != null ? FluidLoader.autogenIIcon
+ : ((TextureMap) Minecraft.getMinecraft().getTextureManager()
+ .getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java
index a849ac11ac..84d37b0e9c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java
@@ -1,39 +1,32 @@
/*
- * 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.client.textures;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Stream;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.stream.Stream;
@SideOnly(Side.CLIENT)
public class PrefixTextureLinker implements Runnable {
@@ -44,40 +37,37 @@ public class PrefixTextureLinker implements Runnable {
private static void fillBlockTexMap() {
blockTexMap.put(TextureSet.SET_QUARTZ, TextureSet.INDEX_block4);
- Stream.of(WerkstoffLoader.blockCasing, WerkstoffLoader.blockCasingAdvanced)
- .forEach(prefixes -> {
- HashMap<TextureSet, IIconContainer> curr = new HashMap<>();
- Arrays.stream(TextureSet.class.getFields())
- .filter(field -> field.getName().contains("SET"))
- .forEach(SET -> {
- try {
- curr.put(
- (TextureSet) SET.get(null),
- new Textures.BlockIcons.CustomIcon("materialicons/"
- + SET.getName().substring(4) + "/" + prefixes));
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- });
- texMapBlocks.put(prefixes, curr);
- });
+ Stream.of(WerkstoffLoader.blockCasing, WerkstoffLoader.blockCasingAdvanced).forEach(prefixes -> {
+ HashMap<TextureSet, IIconContainer> curr = new HashMap<>();
+ Arrays.stream(TextureSet.class.getFields()).filter(field -> field.getName().contains("SET"))
+ .forEach(SET -> {
+ try {
+ curr.put(
+ (TextureSet) SET.get(null),
+ new Textures.BlockIcons.CustomIcon(
+ "materialicons/" + SET.getName().substring(4) + "/" + prefixes));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ });
+ texMapBlocks.put(prefixes, curr);
+ });
}
private static void fillItemTexMap() {
Arrays.stream(OrePrefixes.values())
- .filter(prefixes -> prefixes != OrePrefixes.rod
- && prefixes.mTextureIndex == -1
- && Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes) != 0)
+ .filter(
+ prefixes -> prefixes != OrePrefixes.rod && prefixes.mTextureIndex == -1
+ && Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes) != 0)
.forEach(prefixes -> {
HashMap<TextureSet, Textures.ItemIcons.CustomIcon> curr = new HashMap<>();
- Arrays.stream(TextureSet.class.getFields())
- .filter(field -> field.getName().contains("SET"))
+ Arrays.stream(TextureSet.class.getFields()).filter(field -> field.getName().contains("SET"))
.forEach(SET -> {
try {
curr.put(
(TextureSet) SET.get(null),
- new Textures.ItemIcons.CustomIcon("materialicons/"
- + SET.getName().substring(4) + "/" + prefixes));
+ new Textures.ItemIcons.CustomIcon(
+ "materialicons/" + SET.getName().substring(4) + "/" + prefixes));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
index 22b58a28be..3dccd88475 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
@@ -1,32 +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.common.blocks;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -39,6 +27,12 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.MainMod;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+
public class BW_Blocks extends Block {
@SideOnly(Side.CLIENT)
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java
index 451d435286..8bd57edaf9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java
@@ -1,31 +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.common.blocks;
-import com.github.bartimaeusnek.bartworks.API.SideReference;
-import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -33,6 +20,12 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class BW_GlasBlocks extends BW_Blocks {
@SideOnly(Side.CLIENT)
@@ -47,8 +40,8 @@ public class BW_GlasBlocks extends BW_Blocks {
this.connectedTex = false;
}
- public BW_GlasBlocks(
- String name, String[] texture, short[][] color, CreativeTabs tabs, boolean connectedTex, boolean fake) {
+ public BW_GlasBlocks(String name, String[] texture, short[][] color, CreativeTabs tabs, boolean connectedTex,
+ boolean fake) {
super(name, texture, tabs, Material.glass);
this.connectedTex = connectedTex;
this.color = color;
@@ -93,8 +86,8 @@ public class BW_GlasBlocks extends BW_Blocks {
this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
String[] splitname = this.textureNames[0].split(":");
for (int j = 0; j < 16; j++) {
- this.connectedTexture[j] = par1IconRegister.registerIcon(
- splitname[0] + ":connectedTex/" + splitname[1] + '/' + splitname[1] + '_' + j);
+ this.connectedTexture[j] = par1IconRegister
+ .registerIcon(splitname[0] + ":connectedTex/" + splitname[1] + '/' + splitname[1] + '_' + j);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java
index d2d149fd6e..16688fbc33 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java
@@ -1,9 +1,5 @@
package com.github.bartimaeusnek.bartworks.common.blocks;
-import com.github.bartimaeusnek.bartworks.API.SideReference;
-import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -11,7 +7,14 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class BW_GlasBlocks2 extends BW_Blocks {
+
@SideOnly(Side.CLIENT)
private IIcon[] connectedTexture;
@@ -24,8 +27,8 @@ public class BW_GlasBlocks2 extends BW_Blocks {
this.connectedTex = false;
}
- public BW_GlasBlocks2(
- String name, String[] texture, short[][] color, CreativeTabs tabs, boolean connectedTex, boolean fake) {
+ public BW_GlasBlocks2(String name, String[] texture, short[][] color, CreativeTabs tabs, boolean connectedTex,
+ boolean fake) {
super(name, texture, tabs, Material.glass);
this.connectedTex = connectedTex;
this.color = color;
@@ -70,8 +73,13 @@ public class BW_GlasBlocks2 extends BW_Blocks {
this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
String[] splitname = this.textureNames[0].split(":");
for (int j = 0; j < 16; j++) {
- this.connectedTexture[j] = par1IconRegister.registerIcon(splitname[0] + ":connectedTex/"
- + "BoronSilicateGlassBlock" + '/' + "BoronSilicateGlassBlock" + '_' + j);
+ this.connectedTexture[j] = par1IconRegister.registerIcon(
+ splitname[0] + ":connectedTex/"
+ + "BoronSilicateGlassBlock"
+ + '/'
+ + "BoronSilicateGlassBlock"
+ + '_'
+ + j);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
index 7b10ace417..2cfc787a1d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
@@ -1,39 +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.common.blocks;
-import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
-import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
-import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
-import com.gtnewhorizons.modularui.api.UIInfos;
-import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.tile.IWrenchable;
-import ic2.core.IC2;
-import ic2.core.IHasGui;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -52,6 +31,20 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.IFluidContainerItem;
+import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
+import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
+import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
+import com.gtnewhorizons.modularui.api.UIInfos;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.api.tile.IWrenchable;
+import ic2.core.IC2;
+import ic2.core.IHasGui;
+
public class BW_TileEntityContainer extends BlockContainer implements ITileAddsInformation {
protected Class<? extends TileEntity> tileEntity;
@@ -67,16 +60,8 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI
}
@Override
- public boolean onBlockActivated(
- World worldObj,
- int x,
- int y,
- int z,
- EntityPlayer player,
- int p_149727_6_,
- float p_149727_7_,
- float p_149727_8_,
- float p_149727_9_) {
+ public boolean onBlockActivated(World worldObj, int x, int y, int z, EntityPlayer player, int p_149727_6_,
+ float p_149727_7_, float p_149727_8_, float p_149727_9_) {
if (worldObj.isRemote) {
return false;
}
@@ -88,13 +73,13 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI
&& ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, false) != null)
if (player.getHeldItem().getItem().equals(Items.bucket)
&& ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, false).amount == 1000) {
- ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, true);
- player.getHeldItem().stackSize--;
- if (player.getHeldItem().stackSize <= 0)
- player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
- player.inventory.addItemStackToInventory(new ItemStack(Items.water_bucket));
- return true;
- }
+ ((BW_TileEntity_HeatedWaterPump) tile).drain(1000, true);
+ player.getHeldItem().stackSize--;
+ if (player.getHeldItem().stackSize <= 0)
+ player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
+ player.inventory.addItemStackToInventory(new ItemStack(Items.water_bucket));
+ return true;
+ }
}
if (!player.isSneaking()) {
if (tile instanceof IHasGui) {
@@ -141,9 +126,8 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI
if (t instanceof ITileDropsContent) {
int[] dropSlots = ((ITileDropsContent) t).getDropSlots();
for (int dropSlot : dropSlots) {
- if (((ITileDropsContent) t).getStackInSlot(dropSlot) != null)
- world.spawnEntityInWorld(new EntityItem(
- world, x, y, z, ((BW_TileEntity_HeatedWaterPump) t).getStackInSlot(dropSlot)));
+ if (((ITileDropsContent) t).getStackInSlot(dropSlot) != null) world.spawnEntityInWorld(
+ new EntityItem(world, x, y, z, ((BW_TileEntity_HeatedWaterPump) t).getStackInSlot(dropSlot)));
}
}
super.breakBlock(world, x, y, z, block, meta);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java
index ed4680dde8..89d7dfae75 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java
@@ -1,37 +1,29 @@
/*
- * 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.common.blocks;
-import gregtech.api.GregTech_API;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import gregtech.api.GregTech_API;
+
public class BW_TileEntityContainer_MachineBlock extends BW_TileEntityContainer {
- public BW_TileEntityContainer_MachineBlock(
- Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
+ public BW_TileEntityContainer_MachineBlock(Material p_i45386_1_, Class<? extends TileEntity> tileEntity,
+ String blockName) {
super(p_i45386_1_, tileEntity, blockName);
GregTech_API.registerMachineBlock(this, -1);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
index 184e02dc00..22b14db261 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
@@ -1,36 +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.common.blocks;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.gtnewhorizons.modularui.api.UIInfos;
-import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.tile.IWrenchable;
-import ic2.core.IC2;
-import ic2.core.IHasGui;
import java.util.List;
+
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -47,6 +31,16 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.gtnewhorizons.modularui.api.UIInfos;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.api.tile.IWrenchable;
+import ic2.core.IC2;
+import ic2.core.IHasGui;
+
public class BW_TileEntityContainer_Multiple extends BlockContainer {
protected final String[] textureNames;
@@ -56,12 +50,8 @@ public class BW_TileEntityContainer_Multiple extends BlockContainer {
@SideOnly(Side.CLIENT)
protected IIcon[] texture;
- public BW_TileEntityContainer_Multiple(
- Material p_i45386_1_,
- Class<? extends TileEntity>[] tileEntity,
- String blockName,
- String[] textureNames,
- CreativeTabs tabs) {
+ public BW_TileEntityContainer_Multiple(Material p_i45386_1_, Class<? extends TileEntity>[] tileEntity,
+ String blockName, String[] textureNames, CreativeTabs tabs) {
super(p_i45386_1_);
this.setHardness(15.0F);
this.setResistance(30.0F);
@@ -74,16 +64,8 @@ public class BW_TileEntityContainer_Multiple extends BlockContainer {
}
@Override
- public boolean onBlockActivated(
- World worldObj,
- int x,
- int y,
- int z,
- EntityPlayer player,
- int p_149727_6_,
- float p_149727_7_,
- float p_149727_8_,
- float p_149727_9_) {
+ public boolean onBlockActivated(World worldObj, int x, int y, int z, EntityPlayer player, int p_149727_6_,
+ float p_149727_7_, float p_149727_8_, float p_149727_9_) {
if (worldObj.isRemote) {
return true;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java
index 5d06247dbc..fa984b8ee9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java
@@ -1,31 +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.common.blocks;
-import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BWTileEntityDimIDBridge;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -36,6 +23,12 @@ import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidBase;
import net.minecraftforge.fluids.FluidStack;
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BWTileEntityDimIDBridge;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class BioFluidBlock extends BlockFluidBase implements ITileEntityProvider {
public BioFluidBlock() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java
index 8b8d4c15d7..c294bcbabc 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java
@@ -1,34 +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.common.commands;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import java.lang.reflect.Field;
+
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+
public class ChangeConfig extends CommandBase {
+
@Override
public String getCommandName() {
return "bwcfg";
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java
index 0beec2c8af..138542bd4b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java
@@ -1,33 +1,26 @@
/*
- * 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.common.commands;
-import com.github.bartimaeusnek.bartworks.ASM.BWCoreStaticReplacementMethodes;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
+import com.github.bartimaeusnek.bartworks.ASM.BWCoreStaticReplacementMethodes;
+
public class ClearCraftingCache extends CommandBase {
+
@Override
public String getCommandName() {
return "bwclr";
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java
index f41c1d384d..e3dd2d13c5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java
@@ -1,23 +1,14 @@
/*
- * 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.common.commands;
@@ -28,6 +19,7 @@ import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
public class GetWorkingDirectory extends CommandBase {
+
@Override
public String getCommandName() {
return "bwgwd";
@@ -40,7 +32,6 @@ public class GetWorkingDirectory extends CommandBase {
@Override
public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) {
- p_71515_1_.addChatMessage(
- new ChatComponentText(Minecraft.getMinecraft().mcDataDir.getAbsolutePath()));
+ p_71515_1_.addChatMessage(new ChatComponentText(Minecraft.getMinecraft().mcDataDir.getAbsolutePath()));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java
index 1a924e7322..1646b8e750 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java
@@ -1,23 +1,14 @@
/*
- * 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.common.commands;
@@ -26,12 +17,14 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
+
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
public class PrintRecipeListToFile extends CommandBase {
+
@Override
public String getCommandName() {
return "prltf";
@@ -51,8 +44,7 @@ public class PrintRecipeListToFile extends CommandBase {
BufferedWriter fw = new BufferedWriter(new FileWriter(file));
CraftingManager.getInstance().getRecipeList().forEach(e -> {
try {
- fw.write(e.toString() + " = "
- + ((IRecipe) e).getRecipeOutput().getDisplayName() + "\n");
+ fw.write(e.toString() + " = " + ((IRecipe) e).getRecipeOutput().getDisplayName() + "\n");
} catch (IOException ex) {
ex.printStackTrace();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java
index 00a1fc4c4c..35cdae5bbc 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java
@@ -1,23 +1,14 @@
/*
- * 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.common.commands;
@@ -27,6 +18,7 @@ import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
public class RunGC extends CommandBase {
+
@Override
public String getCommandName() {
return "bwgc";
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java
index 02f3454a03..ece4708722 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java
@@ -1,31 +1,23 @@
/*
- * 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.common.commands;
-import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
+import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins;
+
public class SummonRuin extends CommandBase {
@Override
@@ -41,13 +33,12 @@ public class SummonRuin extends CommandBase {
@Override
public void processCommand(ICommandSender iCommandSender, String[] p_71515_2_) {
try {
- new MapGenRuins.RuinsBase()
- .generate(
- iCommandSender.getEntityWorld(),
- iCommandSender.getEntityWorld().rand,
- Integer.parseInt(p_71515_2_[0]),
- 256,
- Integer.parseInt(p_71515_2_[1]));
+ new MapGenRuins.RuinsBase().generate(
+ iCommandSender.getEntityWorld(),
+ iCommandSender.getEntityWorld().rand,
+ Integer.parseInt(p_71515_2_[0]),
+ 256,
+ Integer.parseInt(p_71515_2_[1]));
} catch (Exception e) {
e.printStackTrace();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
index 6c918fb4e5..8d5e071bd3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.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.common.configs;
-import com.github.bartimaeusnek.bartworks.API.API_ConfigValues;
-import com.github.bartimaeusnek.bartworks.ASM.BWCoreTransformer;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+
import net.minecraftforge.common.config.Configuration;
+import com.github.bartimaeusnek.bartworks.API.API_ConfigValues;
+import com.github.bartimaeusnek.bartworks.ASM.BWCoreTransformer;
+
public class ConfigHandler {
private static final int IDU = 10 * 8 + 5;
@@ -80,112 +73,63 @@ public class ConfigHandler {
public static boolean disablePistonInEIC = false;
- private static final int[][] METAFORTIERS_ENERGY = {
- {100, 101, 102, 105},
- {1110, 1115, 1120, 1127},
- {1111, 12726, 1116, 1121, 1128},
- {1112, 12727, 1117, 1122, 1129},
- {12728, 1190, 1130, 12685},
- {1191, 1174, 695, 12686},
- };
- private static final int[][] METAFORTIERS_BUFFER = {
- {5133, 5123},
- {161, 171, 181, 191},
- {162, 172, 182, 192},
- {163, 173, 183, 193},
- {164, 174, 184, 194},
- {165, 175, 185, 195},
- };
- private static final int[][] METAFORTIERS_CABLE = {
- {5133, 5123},
- {1210, 1230, 1250, 1270, 1290},
- {1310, 1330, 1350, 1370, 1390},
- {1410, 1430, 1450, 1470, 1490},
- {1510, 1530, 1550, 1570, 1590},
- {1650, 1670, 1690},
- };
+ private static final int[][] METAFORTIERS_ENERGY = { { 100, 101, 102, 105 }, { 1110, 1115, 1120, 1127 },
+ { 1111, 12726, 1116, 1121, 1128 }, { 1112, 12727, 1117, 1122, 1129 }, { 12728, 1190, 1130, 12685 },
+ { 1191, 1174, 695, 12686 }, };
+ private static final int[][] METAFORTIERS_BUFFER = { { 5133, 5123 }, { 161, 171, 181, 191 }, { 162, 172, 182, 192 },
+ { 163, 173, 183, 193 }, { 164, 174, 184, 194 }, { 165, 175, 185, 195 }, };
+ private static final int[][] METAFORTIERS_CABLE = { { 5133, 5123 }, { 1210, 1230, 1250, 1270, 1290 },
+ { 1310, 1330, 1350, 1370, 1390 }, { 1410, 1430, 1450, 1470, 1490 }, { 1510, 1530, 1550, 1570, 1590 },
+ { 1650, 1670, 1690 }, };
private static final int[][] METAFORTIERS_MACHINE = {
- {103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119},
- {
- 201, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 311, 321, 331, 341, 351, 361, 371, 381, 391, 401,
- 411, 421, 431, 441, 451, 461, 471, 481, 491, 501, 511, 521, 531, 541, 551, 561, 571, 581, 591, 601, 611,
- 621, 631, 641, 651, 661, 671
- },
- {
- 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 302, 312, 322, 332, 342, 352, 362, 372, 382, 392, 402,
- 412, 422, 432, 442, 452, 462, 472, 482, 492, 502, 512, 522, 532, 542, 552, 562, 572, 582, 592, 602, 612,
- 622, 632, 642, 652, 662, 672
- },
- {
- 203, 213, 223, 233, 243, 253, 263, 273, 283, 293, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 403,
- 413, 423, 433, 443, 453, 463, 473, 483, 493, 503, 513, 523, 533, 543, 553, 563, 573, 583, 593, 603, 613,
- 623, 633, 643, 653, 663, 673
- },
- {
- 204, 214, 224, 234, 244, 254, 264, 274, 284, 294, 304, 314, 324, 334, 344, 354, 364, 374, 384, 394, 404,
- 414, 424, 434, 444, 454, 464, 474, 484, 494, 504, 514, 524, 534, 544, 554, 564, 574, 584, 594, 604, 614,
- 624, 634, 644, 654, 664, 674
- },
- {
- 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405,
- 415, 425, 435, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 605, 615,
- 625, 635, 645, 655, 665, 675
- },
- };
- private static int[][][] defaultMetasForTiers = {
- METAFORTIERS_ENERGY, METAFORTIERS_BUFFER, METAFORTIERS_CABLE, METAFORTIERS_MACHINE
- };
- private static final String[] VOLTAGE_NAMES = new String[] {
- "High Pressure Steam",
- "Low Voltage",
- "Medium Voltage",
- "High Voltage",
- "Extreme Voltage",
- "Insane Voltage",
- "Ludicrous Voltage",
- "ZPM Voltage",
- "Ultimate Voltage",
- "Ultimate High Voltage",
- "Ultimate Extreme Voltage",
- "Ultimate Insane Voltage",
- "Ultimate Mega Voltage",
- "Ultimate Extended Mega Voltage",
- "Overpowered Voltage",
- "Maximum Voltage"
- };
- private static final String[] names = {"Generators", "Buffers", "Cables", "Machines"};
+ { 103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119 },
+ { 201, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 311, 321, 331, 341, 351, 361, 371, 381, 391, 401,
+ 411, 421, 431, 441, 451, 461, 471, 481, 491, 501, 511, 521, 531, 541, 551, 561, 571, 581, 591, 601,
+ 611, 621, 631, 641, 651, 661, 671 },
+ { 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 302, 312, 322, 332, 342, 352, 362, 372, 382, 392, 402,
+ 412, 422, 432, 442, 452, 462, 472, 482, 492, 502, 512, 522, 532, 542, 552, 562, 572, 582, 592, 602,
+ 612, 622, 632, 642, 652, 662, 672 },
+ { 203, 213, 223, 233, 243, 253, 263, 273, 283, 293, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 403,
+ 413, 423, 433, 443, 453, 463, 473, 483, 493, 503, 513, 523, 533, 543, 553, 563, 573, 583, 593, 603,
+ 613, 623, 633, 643, 653, 663, 673 },
+ { 204, 214, 224, 234, 244, 254, 264, 274, 284, 294, 304, 314, 324, 334, 344, 354, 364, 374, 384, 394, 404,
+ 414, 424, 434, 444, 454, 464, 474, 484, 494, 504, 514, 524, 534, 544, 554, 564, 574, 584, 594, 604,
+ 614, 624, 634, 644, 654, 664, 674 },
+ { 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405,
+ 415, 425, 435, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 605,
+ 615, 625, 635, 645, 655, 665, 675 }, };
+ private static int[][][] defaultMetasForTiers = { METAFORTIERS_ENERGY, METAFORTIERS_BUFFER, METAFORTIERS_CABLE,
+ METAFORTIERS_MACHINE };
+ private static final String[] VOLTAGE_NAMES = new String[] { "High Pressure Steam", "Low Voltage", "Medium Voltage",
+ "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage",
+ "Ultimate High Voltage", "Ultimate Extreme Voltage", "Ultimate Insane Voltage", "Ultimate Mega Voltage",
+ "Ultimate Extended Mega Voltage", "Overpowered Voltage", "Maximum Voltage" };
+ private static final String[] names = { "Generators", "Buffers", "Cables", "Machines" };
public ConfigHandler(Configuration C) {
ConfigHandler.c = C;
- ConfigHandler.classicMode = ConfigHandler.c
- .get(
- "System",
- "Enable Classic Mode",
- false,
- "Enables the classic Mode (all recipes in normal machines are doable in MV")
- .getBoolean(false);
+ ConfigHandler.classicMode = ConfigHandler.c.get(
+ "System",
+ "Enable Classic Mode",
+ false,
+ "Enables the classic Mode (all recipes in normal machines are doable in MV").getBoolean(false);
ConfigHandler.creativeScannerID = ConfigHandler.c
- .get("System", "Creative Debug Scanner", 0, "ID for the Creative Debug Scanner Block")
- .getInt(0);
+ .get("System", "Creative Debug Scanner", 0, "ID for the Creative Debug Scanner Block").getInt(0);
ConfigHandler.tooltips = ConfigHandler.c
- .get("System", "BartWorksToolTips", true, "If you wish to enable extra tooltips")
- .getBoolean(true);
- ConfigHandler.sharedItemStackTooltip = ConfigHandler.c
- .get(
- "System",
- "BartWorksSharedItemStackToolTips",
- true,
- "If you wish to enable \"Shared Item Stack\" tooltips")
- .getBoolean(true);
+ .get("System", "BartWorksToolTips", true, "If you wish to enable extra tooltips").getBoolean(true);
+ ConfigHandler.sharedItemStackTooltip = ConfigHandler.c.get(
+ "System",
+ "BartWorksSharedItemStackToolTips",
+ true,
+ "If you wish to enable \"Shared Item Stack\" tooltips").getBoolean(true);
- ConfigHandler.IDOffset = ConfigHandler.c
- .get(
- "System",
- "ID Offset",
- 12600,
- "ID Offset for this mod. This Mod uses " + ConfigHandler.IDU
- + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS")
+ ConfigHandler.IDOffset = ConfigHandler.c.get(
+ "System",
+ "ID Offset",
+ 12600,
+ "ID Offset for this mod. This Mod uses " + ConfigHandler.IDU
+ + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS")
.getInt(12600);
ConfigHandler.ezmode = ConfigHandler.c
.get(
@@ -194,36 +138,29 @@ public class ConfigHandler {
false,
"If GTNH is Loaded, this will enable easy recipes, if not, it will enable harder recipes.")
.getBoolean(false);
- ConfigHandler.teslastaff = ConfigHandler.c
- .get(
- "System",
- "Enable Teslastaff",
- false,
- "Enables the Teslastaff, an Item used to destroy Electric Armors")
- .getBoolean(false);
- ConfigHandler.newStuff = !ConfigHandler.c
- .get(
- "System",
- "Disable non-original-GT-stuff",
- false,
- "This switch disables my new content, that is not part of the GT2 compat")
- .getBoolean(false);
- ConfigHandler.BioLab = !ConfigHandler.c
- .get(
- "System",
- "Disable BioLab",
- false,
- "This switch disables the BioLab, BioVat etc. If you use GT5.08 or equivalent, this needs to be turned off!")
+ ConfigHandler.teslastaff = ConfigHandler.c.get(
+ "System",
+ "Enable Teslastaff",
+ false,
+ "Enables the Teslastaff, an Item used to destroy Electric Armors").getBoolean(false);
+ ConfigHandler.newStuff = !ConfigHandler.c.get(
+ "System",
+ "Disable non-original-GT-stuff",
+ false,
+ "This switch disables my new content, that is not part of the GT2 compat").getBoolean(false);
+ ConfigHandler.BioLab = !ConfigHandler.c.get(
+ "System",
+ "Disable BioLab",
+ false,
+ "This switch disables the BioLab, BioVat etc. If you use GT5.08 or equivalent, this needs to be turned off!")
.getBoolean(false);
- ConfigHandler.cutoffTier = ConfigHandler.c
- .get(
- "System",
- "Tier to nerf circuits",
- 5,
- "This switch sets the lowest unnerfed Circuit Recipe Tier. -1 to disable it completely.",
- -1,
- VOLTAGE_NAMES.length)
- .getInt(5);
+ ConfigHandler.cutoffTier = ConfigHandler.c.get(
+ "System",
+ "Tier to nerf circuits",
+ 5,
+ "This switch sets the lowest unnerfed Circuit Recipe Tier. -1 to disable it completely.",
+ -1,
+ VOLTAGE_NAMES.length).getInt(5);
ConfigHandler.cutoffTier = (ConfigHandler.cutoffTier == -1 ? VOLTAGE_NAMES.length : ConfigHandler.cutoffTier);
ConfigHandler.disableExtraGassesForEBF = ConfigHandler.c
.get(
@@ -235,41 +172,33 @@ public class ConfigHandler {
ConfigHandler.disableBoltedBlocksCasing = ConfigHandler.c
.get("System", "Disable Bolted Casings", false, "This switch disable the generation of bolted casings")
.getBoolean(false);
- ConfigHandler.disableReboltedBlocksCasing = ConfigHandler.c
- .get(
- "System",
- "Disable Rebolted Casings",
- false,
- "This switch disable the generation of rebolted casings")
- .getBoolean(false);
+ ConfigHandler.disableReboltedBlocksCasing = ConfigHandler.c.get(
+ "System",
+ "Disable Rebolted Casings",
+ false,
+ "This switch disable the generation of rebolted casings").getBoolean(false);
- ConfigHandler.mbWaterperSec = ConfigHandler.c
- .get("Singleblocks", "mL Water per Sec for the StirlingPump", 150)
+ ConfigHandler.mbWaterperSec = ConfigHandler.c.get("Singleblocks", "mL Water per Sec for the StirlingPump", 150)
.getInt(150);
- ConfigHandler.energyPerCell = ConfigHandler.c
- .get(
- "Multiblocks",
- "energyPerLESUCell",
- 1000000,
- "This will set Up the Energy per LESU Cell",
- 1000000,
- Integer.MAX_VALUE)
- .getInt(1000000);
- ConfigHandler.DEHPDirectSteam = ConfigHandler.c
- .get(
- "Multiblocks",
- "DEHP Direct Steam Mode",
- false,
- "This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant")
+ ConfigHandler.energyPerCell = ConfigHandler.c.get(
+ "Multiblocks",
+ "energyPerLESUCell",
+ 1000000,
+ "This will set Up the Energy per LESU Cell",
+ 1000000,
+ Integer.MAX_VALUE).getInt(1000000);
+ ConfigHandler.DEHPDirectSteam = ConfigHandler.c.get(
+ "Multiblocks",
+ "DEHP Direct Steam Mode",
+ false,
+ "This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant")
.getBoolean(false);
- ConfigHandler.megaMachinesMax = ConfigHandler.c
- .get(
- "Multiblocks",
- "Mega Machines Maximum Recipes per Operation",
- 256,
- "This changes the Maximum Recipes per Operation to the specified Valure")
- .getInt(256);
+ ConfigHandler.megaMachinesMax = ConfigHandler.c.get(
+ "Multiblocks",
+ "Mega Machines Maximum Recipes per Operation",
+ 256,
+ "This changes the Maximum Recipes per Operation to the specified Valure").getInt(256);
ConfigHandler.bioVatMaxParallelBonus = ConfigHandler.c
.get(
"Multiblocks",
@@ -277,13 +206,15 @@ public class ConfigHandler {
1000,
"This are the maximum parallel Operations the BioVat can do, when the output is half full.")
.getInt(1000);
- ConfigHandler.voidMinerBlacklist = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(ConfigHandler.c
- .get(
- "Multiblocks",
- "Void Miner Blacklist",
- new String[0],
- "This is a blacklist for the Void Miner, blacklisted ores will not enter the drop prize pool. Please fill in the Unique Identifier of Ore and connect Damage with a colon, For example: gregtech:gt.blockores:32")
- .getStringList())));
+ ConfigHandler.voidMinerBlacklist = Collections.unmodifiableSet(
+ new HashSet<>(
+ Arrays.asList(
+ ConfigHandler.c.get(
+ "Multiblocks",
+ "Void Miner Blacklist",
+ new String[0],
+ "This is a blacklist for the Void Miner, blacklisted ores will not enter the drop prize pool. Please fill in the Unique Identifier of Ore and connect Damage with a colon, For example: gregtech:gt.blockores:32")
+ .getStringList())));
ConfigHandler.disablePistonInEIC = ConfigHandler.c
.get(
"Multiblocks",
@@ -299,57 +230,48 @@ public class ConfigHandler {
ConfigHandler.pollutionHeatedWaterPumpSecond,
"How much should the Simple Stirling Water Pump produce pollution per second")
.getInt(ConfigHandler.pollutionHeatedWaterPumpSecond);
- ConfigHandler.basePollutionMBFSecond = ConfigHandler.c
- .get(
- "Pollution",
- "Pollution produced per tick by the MBF per ingot",
- ConfigHandler.basePollutionMBFSecond,
- "How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel")
+ ConfigHandler.basePollutionMBFSecond = ConfigHandler.c.get(
+ "Pollution",
+ "Pollution produced per tick by the MBF per ingot",
+ ConfigHandler.basePollutionMBFSecond,
+ "How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel")
.getInt(ConfigHandler.basePollutionMBFSecond);
if (ConfigHandler.IDOffset == 0) {
ConfigHandler.IDOffset = 12600;
- ConfigHandler.c
- .get(
- "System",
- "ID Offset",
- 12600,
- "ID Offset for this mod. This Mod uses " + ConfigHandler.IDU
- + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS")
+ ConfigHandler.c.get(
+ "System",
+ "ID Offset",
+ 12600,
+ "ID Offset for this mod. This Mod uses " + ConfigHandler.IDU
+ + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS")
.set(12600);
}
ConfigHandler.GTppLogDisabler = ConfigHandler.c
- .get("System", "Disable GT++ Logging", false, "Enables or Disables GT++ Logging.")
- .getBoolean(false);
+ .get("System", "Disable GT++ Logging", false, "Enables or Disables GT++ Logging.").getBoolean(false);
API_ConfigValues.debugLog = ConfigHandler.c
- .get("System", "Enable Debug Log", false, "Enables or Disables the debug log.")
- .getBoolean(false);
+ .get("System", "Enable Debug Log", false, "Enables or Disables the debug log.").getBoolean(false);
for (int i = 0; i < BWCoreTransformer.CLASSESBEEINGTRANSFORMED.length; i++)
- BWCoreTransformer.shouldTransform[i] = ConfigHandler.c
- .get(
- "ASM fixes",
- BWCoreTransformer.DESCRIPTIONFORCONFIG[i] + " in class: "
- + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[i],
- true)
- .getBoolean(true);
+ BWCoreTransformer.shouldTransform[i] = ConfigHandler.c.get(
+ "ASM fixes",
+ BWCoreTransformer.DESCRIPTIONFORCONFIG[i] + " in class: "
+ + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[i],
+ true).getBoolean(true);
ConfigHandler.enabledPatches = new boolean[BWCoreTransformer.shouldTransform.length];
- ConfigHandler.enabledPatches =
- Arrays.copyOf(BWCoreTransformer.shouldTransform, BWCoreTransformer.shouldTransform.length);
+ ConfigHandler.enabledPatches = Arrays
+ .copyOf(BWCoreTransformer.shouldTransform, BWCoreTransformer.shouldTransform.length);
ConfigHandler.ross128BID = ConfigHandler.c
- .get("CrossMod Interactions", "DimID - Ross128b", -64, "The Dim ID for Ross128b")
- .getInt(-64);
+ .get("CrossMod Interactions", "DimID - Ross128b", -64, "The Dim ID for Ross128b").getInt(-64);
ConfigHandler.ross128BAID = ConfigHandler.c
.get("CrossMod Interactions", "DimID - Ross128ba", -63, "The Dim ID for Ross128ba (Ross128b's Moon)")
.getInt(-63);
ConfigHandler.ross128btier = ConfigHandler.c
- .get("CrossMod Interactions", "Rocket Tier - Ross128b", 3, "The Rocket Tier for Ross128b")
- .getInt(3);
+ .get("CrossMod Interactions", "Rocket Tier - Ross128b", 3, "The Rocket Tier for Ross128b").getInt(3);
ConfigHandler.ross128batier = ConfigHandler.c
- .get("CrossMod Interactions", "Rocket Tier - Ross128ba", 3, "The Rocket Tier for Ross128a")
- .getInt(3);
+ .get("CrossMod Interactions", "Rocket Tier - Ross128ba", 3, "The Rocket Tier for Ross128a").getInt(3);
ConfigHandler.ross128bRuinChance = ConfigHandler.c
.get("CrossMod Interactions", "Ruin Chance - Ross128b", 512, "Higher Values mean lesser Ruins.")
.getInt(512);
@@ -360,13 +282,11 @@ public class ConfigHandler {
true,
"If the Ross128 System should be activated, DO NOT CHANGE AFTER WORLD GENERATION")
.getBoolean(true);
- ConfigHandler.landerType = ConfigHandler.c
- .get(
- "CrossMod Interactions",
- "LanderType",
- 3,
- "1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander")
- .getInt(3);
+ ConfigHandler.landerType = ConfigHandler.c.get(
+ "CrossMod Interactions",
+ "LanderType",
+ 3,
+ "1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander").getInt(3);
ConfigHandler.disableMagicalForest = ConfigHandler.c
.get(
"CrossMod Interactions",
@@ -376,20 +296,16 @@ public class ConfigHandler {
.getBoolean(false);
ConfigHandler.maxTierRoss = (byte) ConfigHandler.c
- .get("Ross Ruin Metas", "A_Ruin Machine Tiers", 6, "", 0, VOLTAGE_NAMES.length)
- .getInt(6);
+ .get("Ross Ruin Metas", "A_Ruin Machine Tiers", 6, "", 0, VOLTAGE_NAMES.length).getInt(6);
ConfigHandler.metasForTiers = new int[4][maxTierRoss][];
for (int i = 0; i < 4; i++) {
if (maxTierRoss > ConfigHandler.defaultMetasForTiers[i].length)
ConfigHandler.defaultMetasForTiers[i] = new int[maxTierRoss][0];
- for (int j = 0; j < maxTierRoss; j++)
- ConfigHandler.metasForTiers[i][j] = ConfigHandler.c
- .get(
- "Ross Ruin Metas",
- j + "_Ruin " + names[i] + " Tier " + VOLTAGE_NAMES[j],
- ConfigHandler.defaultMetasForTiers[i][j])
- .getIntList();
+ for (int j = 0; j < maxTierRoss; j++) ConfigHandler.metasForTiers[i][j] = ConfigHandler.c.get(
+ "Ross Ruin Metas",
+ j + "_Ruin " + names[i] + " Tier " + VOLTAGE_NAMES[j],
+ ConfigHandler.defaultMetasForTiers[i][j]).getIntList();
}
ConfigHandler.setUpComments();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java
index e0565ec316..33876e557c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java
@@ -1,38 +1,21 @@
/*
- * 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.common.items;
-import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
-import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_LanguageManager;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.entity.player.EntityPlayer;
@@ -41,12 +24,23 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.util.GT_LanguageManager;
+
public class BW_ItemBlocks extends ItemBlock {
- private final String mNoMobsToolTip =
- GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
- private final String mNoTileEntityToolTip =
- GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
+ private final String mNoMobsToolTip = GT_LanguageManager
+ .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
+ private final String mNoTileEntityToolTip = GT_LanguageManager
+ .addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
public BW_ItemBlocks(Block par1) {
super(par1);
@@ -71,8 +65,10 @@ public class BW_ItemBlocks extends ItemBlock {
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
byte tier = BorosilicateGlass.getTier(this.field_150939_a, aStack.getItemDamage());
if (tier >= 0) {
- aList.add(StatCollector.translateToLocal("tooltip.glas.0.name") + " " + BW_ColorUtil.getColorForTier(tier)
- + GT_Values.VN[tier]);
+ aList.add(
+ StatCollector.translateToLocal("tooltip.glas.0.name") + " "
+ + BW_ColorUtil.getColorForTier(tier)
+ + GT_Values.VN[tier]);
}
if (this.field_150939_a instanceof ITileAddsInformation) {
aList.addAll(Arrays.asList(((ITileAddsInformation) this.field_150939_a).getInfoData()));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
index dc606f9e73..8a3ec95073 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
@@ -1,33 +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.common.items;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.core.WorldData;
import java.util.List;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -36,6 +23,13 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.core.WorldData;
+
public class BW_SimpleWindMeter extends Item {
public BW_SimpleWindMeter() {
@@ -57,27 +51,26 @@ public class BW_SimpleWindMeter extends Item {
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean p_77624_4_) {
super.addInformation(itemStack, entityPlayer, list, p_77624_4_);
list.add(StatCollector.translateToLocal("tooltip.windmeter.0.name"));
- list.add(StatCollector.translateToLocal("tooltip.windmeter.1.name") + " "
- + (this.getMaxDamage() - this.getDamage(itemStack)) + "/" + this.getMaxDamage());
+ list.add(
+ StatCollector.translateToLocal("tooltip.windmeter.1.name") + " "
+ + (this.getMaxDamage() - this.getDamage(itemStack))
+ + "/"
+ + this.getMaxDamage());
list.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
- if (entityPlayer.worldObj.isRemote
- || world == null
+ if (entityPlayer.worldObj.isRemote || world == null
|| WorldData.get(world) == null
- || WorldData.get(world).windSim == null) return itemStack;
+ || WorldData.get(world).windSim == null)
+ return itemStack;
float windStrength = (float) WorldData.get(world).windSim.getWindAt(entityPlayer.posY);
- String windS = windStrength < 1f
- ? StatCollector.translateToLocal("tooltip.windmeter.2.name")
- : windStrength < 10f
- ? StatCollector.translateToLocal("tooltip.windmeter.3.name")
- : windStrength < 20f
- ? StatCollector.translateToLocal("tooltip.windmeter.4.name")
- : windStrength < 30f
- ? StatCollector.translateToLocal("tooltip.windmeter.5.name")
+ String windS = windStrength < 1f ? StatCollector.translateToLocal("tooltip.windmeter.2.name")
+ : windStrength < 10f ? StatCollector.translateToLocal("tooltip.windmeter.3.name")
+ : windStrength < 20f ? StatCollector.translateToLocal("tooltip.windmeter.4.name")
+ : windStrength < 30f ? StatCollector.translateToLocal("tooltip.windmeter.5.name")
: windStrength < 50f
? StatCollector.translateToLocal("tooltip.windmeter.6.name")
: StatCollector.translateToLocal("tooltip.windmeter.7.name");
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
index 414f862cd6..ce55f220b4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
@@ -1,23 +1,14 @@
/*
- * 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.common.items;
@@ -25,15 +16,8 @@ package com.github.bartimaeusnek.bartworks.common.items;
import static ic2.api.item.IKineticRotor.GearboxType.WATER;
import static ic2.api.item.IKineticRotor.GearboxType.WIND;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.item.IKineticRotor;
-import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator;
-import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator;
-import ic2.core.util.StackUtil;
import java.util.List;
+
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@@ -43,6 +27,16 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.api.item.IKineticRotor;
+import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator;
+import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator;
+import ic2.core.util.StackUtil;
+
public class BW_Stonage_Rotors extends Item implements IKineticRotor {
private final int[] DiaMinMax = new int[3];
@@ -55,18 +49,8 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor {
private final int maxDamageEx;
private int dura;
- public BW_Stonage_Rotors(
- int diameter,
- float eff,
- int speed,
- float mRotor,
- int min,
- int max,
- int durability,
- IKineticRotor.GearboxType type,
- ResourceLocation tex,
- String Name,
- String itemTex) {
+ public BW_Stonage_Rotors(int diameter, float eff, int speed, float mRotor, int min, int max, int durability,
+ IKineticRotor.GearboxType type, ResourceLocation tex, String Name, String itemTex) {
this.DiaMinMax[0] = diameter;
this.DiaMinMax[1] = min;
this.DiaMinMax[2] = max;
@@ -89,8 +73,9 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor {
@SuppressWarnings("unchecked")
public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b) {
- info.add(StatCollector.translateToLocalFormatted(
- "ic2.itemrotor.wind.info", this.DiaMinMax[1], this.DiaMinMax[2]));
+ info.add(
+ StatCollector
+ .translateToLocalFormatted("ic2.itemrotor.wind.info", this.DiaMinMax[1], this.DiaMinMax[2]));
IKineticRotor.GearboxType type = null;
if (Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator) {
type = WATER;
@@ -98,9 +83,11 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor {
type = WIND;
}
info.add(StatCollector.translateToLocal("tooltip.rotor.0.name") + " " + this.DiaMinMax[0]);
- info.add(StatCollector.translateToLocal("tooltip.rotor.1.name") + " "
- + ((this.getMaxDamageEx() - this.getDamageOfStack(itemStack)) / 100) + "/"
- + (this.getMaxDamageEx() / 100));
+ info.add(
+ StatCollector.translateToLocal("tooltip.rotor.1.name") + " "
+ + ((this.getMaxDamageEx() - this.getDamageOfStack(itemStack)) / 100)
+ + "/"
+ + (this.getMaxDamageEx() / 100));
info.add(StatCollector.translateToLocal("tooltip.rotor.2.name") + " " + this.eff);
info.add(StatCollector.translateToLocal("tooltip.rotor.3.name") + " " + this.speed);
info.add(StatCollector.translateToLocal("tooltip.rotor.4.name") + " " + this.mRotor);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
index bfc0a9d239..ebe2c0fa43 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
@@ -1,27 +1,29 @@
/*
- * 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.common.items;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
@@ -36,6 +38,7 @@ import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -50,15 +53,6 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem, IItemWithModularUI {
@@ -82,11 +76,11 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
@SuppressWarnings("unchecked")
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
- if (aStack != null && aStack.getTagCompound() != null)
- aList.add(StatCollector.translateToLocal("tooltip.cp.0.name") + " "
- + (aStack.getTagCompound().getBoolean("HasChip")
- ? StatCollector.translateToLocal("tooltip.bw.yes.name")
- : StatCollector.translateToLocal("tooltip.bw.no.name")));
+ if (aStack != null && aStack.getTagCompound() != null) aList.add(
+ StatCollector.translateToLocal("tooltip.cp.0.name") + " "
+ + (aStack.getTagCompound().getBoolean("HasChip")
+ ? StatCollector.translateToLocal("tooltip.bw.yes.name")
+ : StatCollector.translateToLocal("tooltip.bw.no.name")));
aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
}
@@ -159,12 +153,14 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
builder.bindPlayerInventory(buildContext.getPlayer(), new Pos2d(86, 83), ModularUITextures.ITEM_SLOT);
ItemStackHandler inventoryHandler = new ItemStackHandler(1) {
+
@Override
public int getSlotLimit(int slot) {
return 1;
}
};
SlotWidget circuitSlotWidget = new SlotWidget(new BaseSlot(inventoryHandler, 0) {
+
@Override
public void putStack(ItemStack stack) {
if (isLVCircuit(stack)) {
@@ -182,39 +178,32 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
}
circuitSlotWidget.getMcSlot().putStack(initialStack);
- builder.widget(circuitSlotWidget
- .setChangeListener(widget -> {
- ItemStack stack = widget.getMcSlot().getStack();
- ItemStack heldItem = widget.getContext().getPlayer().getHeldItem();
- NBTTagCompound tag2 = heldItem.getTagCompound();
- if (tag2 == null) {
- tag2 = new NBTTagCompound();
- }
-
- if (stack != null) {
- tag2.setBoolean(NBT_KEY_HAS_CHIP, true);
- tag2.setByte(NBT_KEY_CHIP_CONFIG, (byte) stack.getItemDamage());
- } else {
- tag2.setBoolean(NBT_KEY_HAS_CHIP, false);
- }
- heldItem.setTagCompound(tag2);
- })
- .setFilter(stack -> isProgrammedCircuit(stack) || isLVCircuit(stack))
- .setBackground(ModularUITextures.ITEM_SLOT, GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
- .setPos(122, 60));
+ builder.widget(circuitSlotWidget.setChangeListener(widget -> {
+ ItemStack stack = widget.getMcSlot().getStack();
+ ItemStack heldItem = widget.getContext().getPlayer().getHeldItem();
+ NBTTagCompound tag2 = heldItem.getTagCompound();
+ if (tag2 == null) {
+ tag2 = new NBTTagCompound();
+ }
+
+ if (stack != null) {
+ tag2.setBoolean(NBT_KEY_HAS_CHIP, true);
+ tag2.setByte(NBT_KEY_CHIP_CONFIG, (byte) stack.getItemDamage());
+ } else {
+ tag2.setBoolean(NBT_KEY_HAS_CHIP, false);
+ }
+ heldItem.setTagCompound(tag2);
+ }).setFilter(stack -> isProgrammedCircuit(stack) || isLVCircuit(stack))
+ .setBackground(ModularUITextures.ITEM_SLOT, GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT).setPos(122, 60));
for (int i = 0; i < 24; i++) {
final int index = i;
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (circuitSlotWidget.getMcSlot().getHasStack()
- && isProgrammedCircuit(
- circuitSlotWidget.getMcSlot().getStack())) {
- circuitSlotWidget.getMcSlot().putStack(createRealCircuit(index + 1));
- }
- })
- .setPos(32 + (i % 12) * 18, 21 + (i / 12) * 18)
- .setSize(18, 18));
+ builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (circuitSlotWidget.getMcSlot().getHasStack()
+ && isProgrammedCircuit(circuitSlotWidget.getMcSlot().getStack())) {
+ circuitSlotWidget.getMcSlot().putStack(createRealCircuit(index + 1));
+ }
+ }).setPos(32 + (i % 12) * 18, 21 + (i / 12) * 18).setSize(18, 18));
}
return builder.build();
@@ -231,9 +220,6 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
private boolean isLVCircuit(ItemStack stack) {
return BW_Util.checkStackAndPrefix(stack)
&& GT_OreDictUnificator.getAssociation(stack).mPrefix.equals(OrePrefixes.circuit)
- && GT_OreDictUnificator.getAssociation(stack)
- .mMaterial
- .mMaterial
- .equals(Materials.Basic);
+ && GT_OreDictUnificator.getAssociation(stack).mMaterial.mMaterial.equals(Materials.Basic);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
index 714cc51f2e..7d3327761c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
@@ -1,27 +1,25 @@
/*
- * 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.common.items;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
@@ -33,16 +31,12 @@ import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.items.GT_Generic_Item;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class GT_Destructopack_Item extends GT_Generic_Item implements IItemWithModularUI {
@@ -79,16 +73,13 @@ public class GT_Destructopack_Item extends GT_Generic_Item implements IItemWithM
builder.bindPlayerInventory(buildContext.getPlayer());
builder.widget(new SlotWidget(new BaseSlot(new ItemStackHandler(), 0) {
- @Override
- public void putStack(ItemStack stack) {
- onSlotChanged();
- }
- })
- .setBackground(ModularUITextures.ITEM_SLOT, BW_UITextures.OVERLAY_SLOT_CROSS)
- .setPos(79, 16))
- .widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT)
- .setSize(17, 17)
+
+ @Override
+ public void putStack(ItemStack stack) {
+ onSlotChanged();
+ }
+ }).setBackground(ModularUITextures.ITEM_SLOT, BW_UITextures.OVERLAY_SLOT_CROSS).setPos(79, 16)).widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT).setSize(17, 17)
.setPos(152, 63));
return builder.build();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java
index d7e0cf19f5..5207a345c1 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java
@@ -1,38 +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.common.items;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import com.google.common.collect.Sets;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.GT_Values;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -49,9 +33,20 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.google.common.collect.Sets;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.GT_Values;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+
public class GT_Rockcutter_Item extends ItemTool implements IElectricItem {
- private static Set<Block> mineableBlocks =
- Sets.newHashSet(Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.clay);
+
+ private static Set<Block> mineableBlocks = Sets
+ .newHashSet(Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.clay);
private final int mCharge;
private final int mTransfer;
public int mTier;
@@ -92,23 +87,14 @@ public class GT_Rockcutter_Item extends ItemTool implements IElectricItem {
}
}
- public boolean onItemUse(
- ItemStack aStack,
- EntityPlayer aPlayer,
- World p_77648_3_,
- int p_77648_4_,
- int p_77648_5_,
- int p_77648_6_,
- int p_77648_7_,
- float p_77648_8_,
- float p_77648_9_,
- float p_77648_10_) {
+ public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World p_77648_3_, int p_77648_4_, int p_77648_5_,
+ int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
ElectricItem.manager.use(aStack, 0, aPlayer);
return false;
}
- public boolean onBlockDestroyed(
- ItemStack var1, World var2, Block var3, int var4, int var5, int var6, EntityLivingBase var7) {
+ public boolean onBlockDestroyed(ItemStack var1, World var2, Block var3, int var4, int var5, int var6,
+ EntityLivingBase var7) {
ElectricItem.manager.use(var1, 0, var7);
if (ElectricItem.manager.canUse(var1, 500 * this.multi)) {
ElectricItem.manager.use(var1, 500 * this.multi, var7);
@@ -120,8 +106,7 @@ public class GT_Rockcutter_Item extends ItemTool implements IElectricItem {
@Override
public boolean canHarvestBlock(Block par1Block, ItemStack itemStack) {
- return par1Block.getMaterial().equals(Material.glass)
- || par1Block.getMaterial().equals(Material.clay)
+ return par1Block.getMaterial().equals(Material.glass) || par1Block.getMaterial().equals(Material.clay)
|| par1Block.getMaterial().equals(Material.packedIce)
|| par1Block.getMaterial().equals(Material.ice)
|| par1Block.getMaterial().equals(Material.sand)
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java
index 00a10b7c9e..0c05642998 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java
@@ -1,36 +1,21 @@
/*
- * 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.common.items;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import com.google.common.collect.Sets;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
import java.util.List;
import java.util.Set;
+
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -44,7 +29,17 @@ import net.minecraft.item.ItemTool;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.google.common.collect.Sets;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+
public class GT_Teslastaff_Item extends ItemTool implements IElectricItem {
+
private static final Set<Block> effective = Sets.newHashSet(Blocks.web);
private final double mCharge;
private final double mTransfer;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java
index ad2a780136..cc7977b5cc 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java
@@ -1,34 +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.common.items;
-import com.github.bartimaeusnek.bartworks.MainMod;
import java.util.List;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
+import com.github.bartimaeusnek.bartworks.MainMod;
+
public class LabModule extends SimpleSubItemClass {
+
public LabModule(String[] tex) {
super(tex);
this.setCreativeTab(MainMod.BIO_TAB);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
index f22ebf56aa..3ae2981575 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
@@ -1,36 +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.common.items;
import static com.github.bartimaeusnek.bartworks.common.loaders.BioItemList.*;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
-import com.github.bartimaeusnek.bartworks.util.BW_Util;
-import com.github.bartimaeusnek.bartworks.util.BioCulture;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
+
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -38,6 +24,14 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.BioCulture;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class LabParts extends SimpleSubItemClass {
public LabParts(String[] tex) {
@@ -52,8 +46,7 @@ public class LabParts extends SimpleSubItemClass {
switch (itemStack.getItemDamage()) {
case 0:
- return BW_Util.getRarityFromByte(
- itemStack.getTagCompound().getCompoundTag("DNA").getByte("Rarity"));
+ return BW_Util.getRarityFromByte(itemStack.getTagCompound().getCompoundTag("DNA").getByte("Rarity"));
case 1:
case 2:
return BW_Util.getRarityFromByte(itemStack.getTagCompound().getByte("Rarity"));
@@ -65,8 +58,7 @@ public class LabParts extends SimpleSubItemClass {
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int p_82790_2_) {
- if (stack.getItemDamage() == 0
- && stack.getTagCompound() != null
+ if (stack.getItemDamage() == 0 && stack.getTagCompound() != null
&& stack.getTagCompound().getIntArray("Color") != null
&& stack.getTagCompound().getIntArray("Color").length > 0) {
int[] rgb = stack.getTagCompound().getIntArray("Color");
@@ -108,22 +100,25 @@ public class LabParts extends SimpleSubItemClass {
switch (itemStack.getItemDamage()) {
case 0:
- list.add(StatCollector.translateToLocal("tooltip.labparts.5.name") + " "
- + itemStack.getTagCompound().getString("Name")
- + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
+ list.add(
+ StatCollector.translateToLocal("tooltip.labparts.5.name") + " "
+ + itemStack.getTagCompound().getString("Name")
+ + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
if (!itemStack.getTagCompound().getBoolean("Breedable")) {
list.add(StatCollector.translateToLocal("tooltip.labparts.6.name"));
}
break;
case 1:
- list.add(StatCollector.translateToLocal("tooltip.labparts.7.name") + " "
- + itemStack.getTagCompound().getString("Name")
- + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
+ list.add(
+ StatCollector.translateToLocal("tooltip.labparts.7.name") + " "
+ + itemStack.getTagCompound().getString("Name")
+ + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
break;
case 2:
- list.add(StatCollector.translateToLocal("tooltip.labparts.8.name") + " "
- + itemStack.getTagCompound().getString("Name")
- + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
+ list.add(
+ StatCollector.translateToLocal("tooltip.labparts.8.name") + " "
+ + itemStack.getTagCompound().getString("Name")
+ + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
break;
default:
break;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java
index 1a45731e6e..bd192efbe5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java
@@ -1,32 +1,24 @@
/*
- * 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.common.items;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class SimpleIconItem extends Item {
private final String tex;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
index 0ae4dc469a..346f9e84c7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
@@ -1,32 +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.common.items;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -34,7 +22,14 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class SimpleSubItemClass extends Item {
+
@SideOnly(Side.CLIENT)
protected IIcon[] itemIcon;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java
index bcb2052d57..60f7b1f30e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java
@@ -1,8 +1,12 @@
package com.github.bartimaeusnek.bartworks.common.loaders;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.system.material.BW_GT_MaterialReference;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -10,8 +14,6 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class ArtificialMicaLine {
@@ -151,7 +153,12 @@ public class ArtificialMicaLine {
120);
// MgO(s) = MgO(l)
GT_Values.RA.addFluidExtractionRecipe(
- Materials.Magnesia.getDust(1), null, Materials.Magnesia.getMolten(144), 0, 20, 120);
+ Materials.Magnesia.getDust(1),
+ null,
+ Materials.Magnesia.getMolten(144),
+ 0,
+ 20,
+ 120);
// 27Raw Fluorophlogopite Dust + 720MgO(l) = 4608Fluorophlogopite(l)
GT_Values.RA.addBlastRecipe(
WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 27),
@@ -164,24 +171,24 @@ public class ArtificialMicaLine {
480,
1700);
// 144Fluorophlogopite(l) = Fluorophlogopite
- GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe(new GT_Recipe(
- false,
- new ItemStack[] {ItemList.Shape_Mold_Plate.get(0)},
- new ItemStack[] {WerkstoffLoader.Fluorophlogopite.get(OrePrefixes.plate, 1)},
- null,
- null,
- new FluidStack[] {WerkstoffLoader.HotFluorophlogopite.getFluidOrGas(144)},
- null,
- 10,
- 120,
- 0));
+ GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { ItemList.Shape_Mold_Plate.get(0) },
+ new ItemStack[] { WerkstoffLoader.Fluorophlogopite.get(OrePrefixes.plate, 1) },
+ null,
+ null,
+ new FluidStack[] { WerkstoffLoader.HotFluorophlogopite.getFluidOrGas(144) },
+ null,
+ 10,
+ 120,
+ 0));
// Fluorophlogopite = 4Insulator Foil
- if (LoaderReference.dreamcraft)
- GT_Values.RA.addBenderRecipe(
- WerkstoffLoader.Fluorophlogopite.get(OrePrefixes.plate, 1),
- GT_Utility.getIntegratedCircuit(1),
- GT_ModHandler.getModItem("dreamcraft", "item.MicaInsulatorFoil", 4),
- 10,
- 600);
+ if (LoaderReference.dreamcraft) GT_Values.RA.addBenderRecipe(
+ WerkstoffLoader.Fluorophlogopite.get(OrePrefixes.plate, 1),
+ GT_Utility.getIntegratedCircuit(1),
+ GT_ModHandler.getModItem("dreamcraft", "item.MicaInsulatorFoil", 4),
+ 10,
+ 600);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
index bba88a0859..7f10a18de0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
@@ -1,28 +1,29 @@
/*
- * 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.common.loaders;
+import java.lang.reflect.Field;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+
import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.Loader;
@@ -31,16 +32,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.Materials;
import gregtech.api.enums.SubTag;
import ic2.core.Ic2Items;
-import java.lang.reflect.Field;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-import org.apache.commons.lang3.reflect.FieldUtils;
/**
- * This class gets injected into GT via ASM!
- * DO NOT CALL IT YOURSELF!
+ * This class gets injected into GT via ASM! DO NOT CALL IT YOURSELF!
*/
public class BeforeGTPreload implements Runnable {
@@ -50,8 +44,8 @@ public class BeforeGTPreload implements Runnable {
public void run() {
if (didrun) return;
// fixing BorosilicateGlass... -_-'
- Materials.BorosilicateGlass.add(
- SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_RECYCLING, SubTag.SMELTING_TO_FLUID);
+ Materials.BorosilicateGlass
+ .add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_RECYCLING, SubTag.SMELTING_TO_FLUID);
Field activeContainer = FieldUtils.getDeclaredField(LoadController.class, "activeContainer", true);
ModContainer bartworks = null;
@@ -74,8 +68,7 @@ public class BeforeGTPreload implements Runnable {
}
if (bartworks != null) break;
}
- if (bartworks == null || gregtech == null)
- FMLCommonHandler.instance().exitJava(-1, true);
+ if (bartworks == null || gregtech == null) FMLCommonHandler.instance().exitJava(-1, true);
try {
activeContainer.set(modController, bartworks);
@@ -89,8 +82,7 @@ public class BeforeGTPreload implements Runnable {
Block[] bw_glasses;
try {
bw_glasses = (Block[]) Class.forName("com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry")
- .getField("bw_glasses")
- .get(null);
+ .getField("bw_glasses").get(null);
GameRegistry.registerBlock(bw_glasses[0], BW_ItemBlocks.class, "BW_GlasBlocks");
GameRegistry.registerBlock(bw_glasses[1], BW_ItemBlocks.class, "BW_GlasBlocks2");
OreDictionary.registerOre("blockGlassHV", new ItemStack(Blocks.glass, 1, Short.MAX_VALUE));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
index 6d327f594b..61e62e640e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
@@ -1,50 +1,43 @@
/*
- * 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.common.loaders;
+import java.awt.*;
+
+import net.minecraft.item.EnumRarity;
+
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.awt.*;
-import net.minecraft.item.EnumRarity;
public class BioCultureLoader {
- public static final BioData BIO_DATA_BETA_LACMATASE =
- BioData.createAndRegisterBioData("beta-Lactamase", EnumRarity.uncommon, 10000, 0);
- private static final BioData BIO_DATA_YEAST =
- BioData.createAndRegisterBioData("Saccharomyces cerevisiae", EnumRarity.common);
- private static final BioDNA BIO_DNA_WHINE_YEAST =
- BioDNA.createAndRegisterBioDNA("Saccharomyces cerevisiae var bayanus", EnumRarity.uncommon);
- private static final BioDNA BIO_DNA_BEER_YEAST =
- BioDNA.createAndRegisterBioDNA("Saccharomyces cerevisiae var cerevisiae", EnumRarity.uncommon);
- private static final BioData eColiData =
- BioData.createAndRegisterBioData("Escherichia koli", EnumRarity.uncommon, 10000, 0);
- private static final BioDNA BIO_DNA_ANAEROBIC_OIL =
- BioDNA.createAndRegisterBioDNA("Pseudomonas Veronii", EnumRarity.uncommon);
- private static final BioData BIO_DATA_ANAEROBIC_OIL =
- BioData.createAndRegisterBioData("Pseudomonas Veronii", EnumRarity.uncommon, 5000, 1);
+ public static final BioData BIO_DATA_BETA_LACMATASE = BioData
+ .createAndRegisterBioData("beta-Lactamase", EnumRarity.uncommon, 10000, 0);
+ private static final BioData BIO_DATA_YEAST = BioData
+ .createAndRegisterBioData("Saccharomyces cerevisiae", EnumRarity.common);
+ private static final BioDNA BIO_DNA_WHINE_YEAST = BioDNA
+ .createAndRegisterBioDNA("Saccharomyces cerevisiae var bayanus", EnumRarity.uncommon);
+ private static final BioDNA BIO_DNA_BEER_YEAST = BioDNA
+ .createAndRegisterBioDNA("Saccharomyces cerevisiae var cerevisiae", EnumRarity.uncommon);
+ private static final BioData eColiData = BioData
+ .createAndRegisterBioData("Escherichia koli", EnumRarity.uncommon, 10000, 0);
+ private static final BioDNA BIO_DNA_ANAEROBIC_OIL = BioDNA
+ .createAndRegisterBioDNA("Pseudomonas Veronii", EnumRarity.uncommon);
+ private static final BioData BIO_DATA_ANAEROBIC_OIL = BioData
+ .createAndRegisterBioData("Pseudomonas Veronii", EnumRarity.uncommon, 5000, 1);
public static BioCulture CommonYeast;
public static BioCulture WhineYeast;
public static BioCulture BeerYeast;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
index 8addea861c..dbc172487d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
@@ -1,27 +1,24 @@
/*
- * 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.common.loaders;
+import java.util.Collection;
+import java.util.HashSet;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.common.items.LabModule;
import com.github.bartimaeusnek.bartworks.common.items.LabParts;
import com.github.bartimaeusnek.bartworks.util.BioCulture;
@@ -29,32 +26,20 @@ import com.github.bartimaeusnek.bartworks.util.BioDNA;
import com.github.bartimaeusnek.bartworks.util.BioData;
import com.github.bartimaeusnek.bartworks.util.BioPlasmid;
import cpw.mods.fml.common.registry.GameRegistry;
-import java.util.Collection;
-import java.util.HashSet;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
public class BioItemList {
private BioItemList() {}
- private static final Item mItemBioLabParts = new LabModule(new String[] {
- "DNAExtractionModule",
- "PCRThermoclyclingModule",
- "PlasmidSynthesisModule",
- "TransformationModule",
- "ClonalCellularSynthesisModule"
- });
- public static final ItemStack[] mBioLabParts = {
- new ItemStack(BioItemList.mItemBioLabParts),
- new ItemStack(BioItemList.mItemBioLabParts, 1, 1),
- new ItemStack(BioItemList.mItemBioLabParts, 1, 2),
- new ItemStack(BioItemList.mItemBioLabParts, 1, 3),
- new ItemStack(BioItemList.mItemBioLabParts, 1, 4)
- };
- private static final Item vanillaBioLabParts = new LabParts(new String[] {
- "petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose", "IncubationModule", "PlasmaMembrane"
- });
+ private static final Item mItemBioLabParts = new LabModule(
+ new String[] { "DNAExtractionModule", "PCRThermoclyclingModule", "PlasmidSynthesisModule",
+ "TransformationModule", "ClonalCellularSynthesisModule" });
+ public static final ItemStack[] mBioLabParts = { new ItemStack(BioItemList.mItemBioLabParts),
+ new ItemStack(BioItemList.mItemBioLabParts, 1, 1), new ItemStack(BioItemList.mItemBioLabParts, 1, 2),
+ new ItemStack(BioItemList.mItemBioLabParts, 1, 3), new ItemStack(BioItemList.mItemBioLabParts, 1, 4) };
+ private static final Item vanillaBioLabParts = new LabParts(
+ new String[] { "petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose",
+ "IncubationModule", "PlasmaMembrane" });
public static void registerBioItems() {
GameRegistry.registerItem(BioItemList.mItemBioLabParts, "BioLabModules");
@@ -108,11 +93,7 @@ public class BioItemList {
}
/**
- * 1 - Detergent Powder
- * 2 - Agarose
- * 3 - Incubation Module
- * 4 - Plasma Membrane
- * others are null
+ * 1 - Detergent Powder 2 - Agarose 3 - Incubation Module 4 - Plasma Membrane others are null
*
* @param selection see above
* @return the selected Item
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java
index f72cd1f0aa..28ad279e28 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java
index dcc43adcbc..d51b0f3c04 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java
@@ -1,27 +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.common.loaders;
+import java.util.List;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
@@ -29,6 +30,7 @@ import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTile
import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -37,14 +39,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.List;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
public class BioRecipeLoader {
@@ -52,107 +46,67 @@ public class BioRecipeLoader {
public static void run() {
// DNAExtractionModule
- GT_ModHandler.addCraftingRecipe(BioItemList.mBioLabParts[0], RecipeLoader.BITSD, new Object[] {
- "TET",
- "CFC",
- "TST",
- 'T',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L),
- 'E',
- ItemList.Emitter_EV.get(1L),
- 'C',
- GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Aluminium, 1L),
- 'S',
- ItemList.Sensor_EV.get(1L),
- 'F',
- ItemList.Field_Generator_EV.get(1L)
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioItemList.mBioLabParts[0],
+ RecipeLoader.BITSD,
+ new Object[] { "TET", "CFC", "TST", 'T',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), 'E',
+ ItemList.Emitter_EV.get(1L), 'C',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Aluminium, 1L), 'S',
+ ItemList.Sensor_EV.get(1L), 'F', ItemList.Field_Generator_EV.get(1L) });
// PCRThermoclyclingModule
- GT_ModHandler.addCraftingRecipe(BioItemList.mBioLabParts[1], RecipeLoader.BITSD, new Object[] {
- "NEN",
- "CFC",
- "NSN",
- 'N',
- GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Nichrome, 1L),
- 'E',
- ItemList.Emitter_EV.get(1L),
- 'C',
- GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Aluminium, 1L),
- 'S',
- ItemList.Sensor_EV.get(1L),
- 'F',
- ItemList.Field_Generator_EV.get(1L)
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioItemList.mBioLabParts[1],
+ RecipeLoader.BITSD,
+ new Object[] { "NEN", "CFC", "NSN", 'N',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Nichrome, 1L), 'E',
+ ItemList.Emitter_EV.get(1L), 'C',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Aluminium, 1L), 'S',
+ ItemList.Sensor_EV.get(1L), 'F', ItemList.Field_Generator_EV.get(1L) });
// PlasmidSynthesisModule
- GT_ModHandler.addCraftingRecipe(BioItemList.mBioLabParts[2], RecipeLoader.BITSD, new Object[] {
- "SFE",
- "CPC",
- "NFN",
- 'N',
- GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Nichrome, 1L),
- 'C',
- "circuit" + Materials.Data,
- 'F',
- ItemList.Field_Generator_EV.get(1L),
- 'E',
- ItemList.Emitter_EV.get(1L),
- 'S',
- ItemList.Sensor_EV.get(1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L),
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioItemList.mBioLabParts[2],
+ RecipeLoader.BITSD,
+ new Object[] { "SFE", "CPC", "NFN", 'N',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Nichrome, 1L), 'C',
+ "circuit" + Materials.Data, 'F', ItemList.Field_Generator_EV.get(1L), 'E',
+ ItemList.Emitter_EV.get(1L), 'S', ItemList.Sensor_EV.get(1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), });
// TransformationModule
- GT_ModHandler.addCraftingRecipe(BioItemList.mBioLabParts[3], RecipeLoader.BITSD, new Object[] {
- "SFE",
- "CPC",
- "NFN",
- 'N',
- GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 1L),
- 'C',
- "circuit" + Materials.Master,
- 'F',
- ItemList.Field_Generator_LuV.get(1L),
- 'E',
- ItemList.Emitter_LuV.get(1L),
- 'S',
- ItemList.Sensor_LuV.get(1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 1L),
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioItemList.mBioLabParts[3],
+ RecipeLoader.BITSD,
+ new Object[] { "SFE", "CPC", "NFN", 'N',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 1L), 'C',
+ "circuit" + Materials.Master, 'F', ItemList.Field_Generator_LuV.get(1L), 'E',
+ ItemList.Emitter_LuV.get(1L), 'S', ItemList.Sensor_LuV.get(1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 1L), });
// ClonalCellularSynthesisModule
- GT_ModHandler.addCraftingRecipe(BioItemList.mBioLabParts[4], RecipeLoader.BITSD, new Object[] {
- "FEF",
- "CPC",
- "FSF",
- 'N',
- GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 1L),
- 'C',
- "circuit" + Materials.Master,
- 'F',
- ItemList.Field_Generator_LuV.get(1L),
- 'E',
- ItemList.Emitter_LuV.get(1L),
- 'S',
- ItemList.Sensor_LuV.get(1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 1L),
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioItemList.mBioLabParts[4],
+ RecipeLoader.BITSD,
+ new Object[] { "FEF", "CPC", "FSF", 'N',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 1L), 'C',
+ "circuit" + Materials.Master, 'F', ItemList.Field_Generator_LuV.get(1L), 'E',
+ ItemList.Emitter_LuV.get(1L), 'S', ItemList.Sensor_LuV.get(1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 1L), });
List<ItemStack> oreCropVine = OreDictionary.getOres("cropVine", false);
- if (LoaderReference.croploadcore && !oreCropVine.isEmpty())
- for (ItemStack stack : oreCropVine) {
- GT_Values.RA.addExtractorRecipe(
- BW_Util.setStackSize(stack, 12),
- BioItemList.getOther(1),
- 500,
- BW_Util.getMachineVoltageFromTier(3));
- }
- else
+ if (LoaderReference.croploadcore && !oreCropVine.isEmpty()) for (ItemStack stack : oreCropVine) {
GT_Values.RA.addExtractorRecipe(
- new ItemStack(Blocks.vine, 12), BioItemList.getOther(1), 500, BW_Util.getMachineVoltageFromTier(3));
+ BW_Util.setStackSize(stack, 12),
+ BioItemList.getOther(1),
+ 500,
+ BW_Util.getMachineVoltageFromTier(3));
+ }
+ else GT_Values.RA.addExtractorRecipe(
+ new ItemStack(Blocks.vine, 12),
+ BioItemList.getOther(1),
+ 500,
+ BW_Util.getMachineVoltageFromTier(3));
GT_Values.RA.addExtractorRecipe(
ItemList.Circuit_Chip_Stemcell.get(1L),
@@ -160,8 +114,7 @@ public class BioRecipeLoader {
500,
BW_Util.getMachineVoltageFromTier(6));
- FluidStack dnaFluid = LoaderReference.gendustry
- ? FluidRegistry.getFluidStack("liquiddna", 1000)
+ FluidStack dnaFluid = LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 1000)
: Materials.Biomass.getFluid(1000L);
GT_Values.RA.addMixerRecipe(
GT_Utility.getIntegratedCircuit(17),
@@ -185,7 +138,7 @@ public class BioRecipeLoader {
null,
null,
null,
- new int[] {1000},
+ new int[] { 1000 },
60 * 20,
BW_Util.getMachineVoltageFromTier(3));
GT_Values.RA.addCentrifugeRecipe(
@@ -217,122 +170,65 @@ public class BioRecipeLoader {
60 * 20,
BW_Util.getMachineVoltageFromTier(3));
- ItemStack[] Pistons = {
- ItemList.Electric_Piston_HV.get(1L),
- ItemList.Electric_Piston_EV.get(1L),
- ItemList.Electric_Piston_IV.get(1L),
- ItemList.Electric_Piston_LuV.get(1L),
- ItemList.Electric_Piston_ZPM.get(1L),
- ItemList.Electric_Piston_UV.get(1L)
- };
+ ItemStack[] Pistons = { ItemList.Electric_Piston_HV.get(1L), ItemList.Electric_Piston_EV.get(1L),
+ ItemList.Electric_Piston_IV.get(1L), ItemList.Electric_Piston_LuV.get(1L),
+ ItemList.Electric_Piston_ZPM.get(1L), ItemList.Electric_Piston_UV.get(1L) };
ItemStack[] BioLab = new ItemStack[GT_Values.VN.length - 3];
ItemStack[] RadioHatch = new ItemStack[GT_Values.VN.length - 3];
- Materials[] cables = {
- Materials.Gold,
- Materials.Aluminium,
- Materials.Tungsten,
- Materials.VanadiumGallium,
- Materials.Naquadah,
- Materials.NaquadahAlloy,
- Materials.Superconductor
- };
- Materials[] hulls = {
- Materials.StainlessSteel,
- Materials.Titanium,
- Materials.TungstenSteel,
- Materials.Chrome,
- Materials.Iridium,
- Materials.Osmium,
- Materials.Naquadah
- };
- Materials[] wireMat = {
- Materials.Kanthal,
- Materials.Nichrome,
- Materials.TungstenSteel,
- Materials.Naquadah,
- Materials.NaquadahAlloy,
- Materials.Superconductor
- };
- Materials[] circuits = {
- Materials.Advanced,
- Materials.Data,
- Materials.Elite,
- Materials.Master,
- Materials.Ultimate,
- Materials.Superconductor
- };
+ Materials[] cables = { Materials.Gold, Materials.Aluminium, Materials.Tungsten, Materials.VanadiumGallium,
+ Materials.Naquadah, Materials.NaquadahAlloy, Materials.Superconductor };
+ Materials[] hulls = { Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, Materials.Chrome,
+ Materials.Iridium, Materials.Osmium, Materials.Naquadah };
+ Materials[] wireMat = { Materials.Kanthal, Materials.Nichrome, Materials.TungstenSteel, Materials.Naquadah,
+ Materials.NaquadahAlloy, Materials.Superconductor };
+ Materials[] circuits = { Materials.Advanced, Materials.Data, Materials.Elite, Materials.Master,
+ Materials.Ultimate, Materials.Superconductor };
for (int i = 3; i < GT_Values.VN.length - 1; i++) {
// 12625
BioLab[(i - 3)] = new GT_MetaTileEntity_BioLab(
- ConfigHandler.IDOffset + GT_Values.VN.length * 6 + i,
- "bw.biolab" + GT_Values.VN[i],
- GT_Values.VN[i] + " " + StatCollector.translateToLocal("tile.biolab.name"),
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 6 + i,
+ "bw.biolab" + GT_Values.VN[i],
+ GT_Values.VN[i] + " " + StatCollector.translateToLocal("tile.biolab.name"),
+ i).getStackForm(1L);
RadioHatch[(i - 3)] = new GT_MetaTileEntity_RadioHatch(
- ConfigHandler.IDOffset + GT_Values.VN.length * 7 - 2 + i,
- "bw.radiohatch" + GT_Values.VN[i],
- GT_Values.VN[i] + " " + StatCollector.translateToLocal("tile.radiohatch.name"),
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 7 - 2 + i,
+ "bw.radiohatch" + GT_Values.VN[i],
+ GT_Values.VN[i] + " " + StatCollector.translateToLocal("tile.radiohatch.name"),
+ i).getStackForm(1L);
try {
ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L);
- GT_ModHandler.addCraftingRecipe(BioLab[(i - 3)], RecipeLoader.BITSD, new Object[] {
- "PFP",
- "WCW",
- "OGO",
- 'F',
- GT_OreDictUnificator.get(OrePrefixes.frameGt, hulls[(i - 3)], 1L),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.wireGt01, wireMat[(i - 3)], 1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1L),
- 'O',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polystyrene, 1L),
- 'G',
- "circuit" + circuits[(i - 3)],
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(RadioHatch[(i - 3)], RecipeLoader.BITSD, new Object[] {
- "DPD",
- "DCD",
- "DKD",
- 'D',
- GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Lead, 1L),
- 'C',
- machinehull,
- 'K',
- GT_OreDictUnificator.get(OrePrefixes.cableGt08, cables[(i - 3)], 1L),
- 'P',
- Pistons[(i - 3)]
- });
+ GT_ModHandler.addCraftingRecipe(
+ BioLab[(i - 3)],
+ RecipeLoader.BITSD,
+ new Object[] { "PFP", "WCW", "OGO", 'F',
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, hulls[(i - 3)], 1L), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, wireMat[(i - 3)], 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1L), 'O',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polystyrene, 1L), 'G',
+ "circuit" + circuits[(i - 3)], 'C', machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ RadioHatch[(i - 3)],
+ RecipeLoader.BITSD,
+ new Object[] { "DPD", "DCD", "DKD", 'D',
+ GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Lead, 1L), 'C', machinehull,
+ 'K', GT_OreDictUnificator.get(OrePrefixes.cableGt08, cables[(i - 3)], 1L), 'P',
+ Pistons[(i - 3)] });
} catch (ArrayIndexOutOfBoundsException e) {
// e.printStackTrace();
}
}
GT_ModHandler.addCraftingRecipe(
new GT_TileEntity_BioVat(
- ConfigHandler.IDOffset + GT_Values.VN.length * 7,
- "bw.biovat",
- StatCollector.translateToLocal("tile.biovat.name"))
- .getStackForm(1L),
+ ConfigHandler.IDOffset + GT_Values.VN.length * 7,
+ "bw.biovat",
+ StatCollector.translateToLocal("tile.biovat.name")).getStackForm(1L),
RecipeLoader.BITSD,
- new Object[] {
- "GCG",
- "KHK",
- "GCG",
- 'G',
- new ItemStack(ItemRegistry.bw_glasses[0], 1, 1),
- 'C',
- "circuit" + Materials.Data,
- 'K',
- GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Silver, 1L),
- 'H',
- ItemList.MACHINE_HULLS[3].get(1L)
- });
-
- Materials[] sterilizers = {Materials.Ammonia, Materials.Chlorine, Materials.Ethanol, Materials.Methanol};
+ new Object[] { "GCG", "KHK", "GCG", 'G', new ItemStack(ItemRegistry.bw_glasses[0], 1, 1), 'C',
+ "circuit" + Materials.Data, 'K',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Silver, 1L), 'H',
+ ItemList.MACHINE_HULLS[3].get(1L) });
+
+ Materials[] sterilizers = { Materials.Ammonia, Materials.Chlorine, Materials.Ethanol, Materials.Methanol };
for (Materials used : sterilizers) {
GT_Values.RA.addAutoclaveRecipe(
ItemList.Circuit_Parts_PetriDish.get(1L),
@@ -358,16 +254,15 @@ public class BioRecipeLoader {
100,
BW_Util.getMachineVoltageFromTier(1));
- FluidStack[] easyFluids = {
- Materials.Water.getFluid(1000L), FluidRegistry.getFluidStack("ic2distilledwater", 1000)
- };
+ FluidStack[] easyFluids = { Materials.Water.getFluid(1000L),
+ FluidRegistry.getFluidStack("ic2distilledwater", 1000) };
for (FluidStack fluidStack : easyFluids) {
BWRecipes.instance.addBioLabRecipeIncubation(
new ItemStack(Items.rotten_flesh),
BioCultureLoader.rottenFleshBacteria,
- new int[] {3300},
- new FluidStack[] {fluidStack},
+ new int[] { 3300 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -375,8 +270,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
new ItemStack(Items.fermented_spider_eye),
BioCultureLoader.eColi,
- new int[] {4500},
- new FluidStack[] {fluidStack},
+ new int[] { 4500 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -384,8 +279,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
ItemList.Food_Dough.get(1L),
BioCultureLoader.CommonYeast,
- new int[] {7500},
- new FluidStack[] {fluidStack},
+ new int[] { 7500 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -393,8 +288,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
ItemList.Food_Dough_Sugar.get(1L),
BioCultureLoader.WhineYeast,
- new int[] {2500},
- new FluidStack[] {fluidStack},
+ new int[] { 2500 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -402,8 +297,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
ItemList.Bottle_Wine.get(1L),
BioCultureLoader.WhineYeast,
- new int[] {3300},
- new FluidStack[] {fluidStack},
+ new int[] { 3300 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -411,8 +306,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
ItemList.Bottle_Beer.get(1L),
BioCultureLoader.BeerYeast,
- new int[] {2500},
- new FluidStack[] {fluidStack},
+ new int[] { 2500 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -420,8 +315,8 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
ItemList.Bottle_Dark_Beer.get(1L),
BioCultureLoader.BeerYeast,
- new int[] {3300},
- new FluidStack[] {fluidStack},
+ new int[] { 3300 },
+ new FluidStack[] { fluidStack },
500,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART);
@@ -429,67 +324,60 @@ public class BioRecipeLoader {
BWRecipes.instance.addBioLabRecipeIncubation(
new ItemStack(Blocks.dirt),
BioCultureLoader.anaerobicOil,
- new int[] {100},
- new FluidStack[] {fluidStack},
+ new int[] { 100 },
+ new FluidStack[] { fluidStack },
1500,
BW_Util.getMachineVoltageFromTier(4),
BW_Util.STANDART);
BWRecipes.instance.addBacterialVatRecipe(
- new ItemStack[] {new ItemStack(Items.sugar, 64)},
- new FluidStack[] {new FluidStack(fluidStack, 100)},
+ new ItemStack[] { new ItemStack(Items.sugar, 64) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
BioCultureLoader.CommonYeast,
- new FluidStack[] {
- (LoaderReference.berriespp
- ? FluidRegistry.getFluidStack("potion.ghp", 1)
- : Materials.Ethanol.getFluid(1L))
- },
+ new FluidStack[] { (LoaderReference.berriespp ? FluidRegistry.getFluidStack("potion.ghp", 1)
+ : Materials.Ethanol.getFluid(1L)) },
350,
BW_Util.getMachineVoltageFromTier(4));
BWRecipes.instance.addBacterialVatRecipe(
- new ItemStack[] {ItemList.Crop_Drop_Grapes.get(16)},
- new FluidStack[] {new FluidStack(fluidStack, 100)},
+ new ItemStack[] { ItemList.Crop_Drop_Grapes.get(16) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
BioCultureLoader.WhineYeast,
- new FluidStack[] {FluidRegistry.getFluidStack("potion.wine", 12)},
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.wine", 12) },
200,
BW_Util.getMachineVoltageFromTier(2));
BWRecipes.instance.addBacterialVatRecipe(
- new ItemStack[] {
- new ItemStack(Items.sugar, 4),
- ItemList.IC2_Hops.get(16L),
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 8L)
- },
- new FluidStack[] {new FluidStack(fluidStack, 100)},
+ new ItemStack[] { new ItemStack(Items.sugar, 4), ItemList.IC2_Hops.get(16L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 8L) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
BioCultureLoader.BeerYeast,
- new FluidStack[] {FluidRegistry.getFluidStack("potion.beer", 5)},
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.beer", 5) },
600,
BW_Util.getMachineVoltageFromTier(1));
BWRecipes.instance.addBacterialVatRecipe(
- new ItemStack[] {
- ItemList.IC2_Hops.get(32L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 16L)
- },
- new FluidStack[] {new FluidStack(fluidStack, 100)},
+ new ItemStack[] { ItemList.IC2_Hops.get(32L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 16L) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
BioCultureLoader.BeerYeast,
- new FluidStack[] {FluidRegistry.getFluidStack("potion.darkbeer", 10)},
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.darkbeer", 10) },
600,
BW_Util.getMachineVoltageFromTier(1));
}
BWRecipes.instance.addBacterialVatRecipe(
null,
- new FluidStack[] {FluidRegistry.getFluidStack("potion.grapejuice", 100)},
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.grapejuice", 100) },
BioCultureLoader.WhineYeast,
- new FluidStack[] {FluidRegistry.getFluidStack("potion.wine", 12)},
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.wine", 12) },
400,
BW_Util.getMachineVoltageFromTier(1));
BWRecipes.instance.addBacterialVatRecipe(
null,
- new FluidStack[] {Materials.FermentedBiomass.getFluid(10000)},
+ new FluidStack[] { Materials.FermentedBiomass.getFluid(10000) },
BioCultureLoader.anaerobicOil,
- new FluidStack[] {new FluidStack(FluidLoader.fulvicAcid, 1000)},
+ new FluidStack[] { new FluidStack(FluidLoader.fulvicAcid, 1000) },
2748,
BW_Util.getMachineVoltageFromTier(3));
GT_Values.RA.addFluidHeaterRecipe(
@@ -519,7 +407,7 @@ public class BioRecipeLoader {
public static void runOnServerStarted() {
GT_Recipe.GT_Recipe_Map.sFermentingRecipes.mRecipeList.forEach(
recipe -> BWRecipes.instance.addBacterialVatRecipe(
- new ItemStack[] {null},
+ new ItemStack[] { null },
BioCultureLoader.generalPurposeFermentingBacteria,
recipe.mFluidInputs,
recipe.mFluidOutputs,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
index ba11127fe5..9bf41ba172 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
@@ -1,27 +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.common.loaders;
+import java.awt.*;
+import java.util.Arrays;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
@@ -29,6 +30,7 @@ import com.github.bartimaeusnek.bartworks.client.renderer.RendererSwitchingColor
import com.github.bartimaeusnek.bartworks.common.blocks.BioFluidBlock;
import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BWTileEntityDimIDBridge;
import com.github.bartimaeusnek.bartworks.util.BioCulture;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
@@ -37,14 +39,6 @@ import gregtech.api.objects.GT_Fluid;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Item_98;
-import java.awt.*;
-import java.util.Arrays;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class FluidLoader {
@@ -64,15 +58,14 @@ public class FluidLoader {
Arrays.fill(rgb, (short) 255);
FluidLoader.ff = new GT_Fluid("BWfakeFluid", "molten.autogenerated", rgb);
FluidLoader.fulvicAcid = FluidLoader.createAndRegisterFluid("Fulvic Acid", new Color(20, 20, 20));
- FluidLoader.heatedfulvicAcid =
- FluidLoader.createAndRegisterFluid("Heated Fulvic Acid", new Color(40, 20, 20), 720);
+ FluidLoader.heatedfulvicAcid = FluidLoader
+ .createAndRegisterFluid("Heated Fulvic Acid", new Color(40, 20, 20), 720);
FluidLoader.Kerogen = FluidLoader.createAndRegisterFluid("Kerogen", new Color(85, 85, 85));
FluidLoader.BioLabFluidMaterials = new Fluid[] {
- new GT_Fluid("FluorecentdDNA", "molten.autogenerated", new short[] {125, 50, 170, 0}),
- new GT_Fluid("EnzymesSollution", "molten.autogenerated", new short[] {240, 200, 125, 0}),
- new GT_Fluid("Penicillin", "molten.autogenerated", new short[] {255, 255, 255, 0}),
- new GT_Fluid("Polymerase", "molten.autogenerated", new short[] {110, 180, 110, 0}),
- };
+ new GT_Fluid("FluorecentdDNA", "molten.autogenerated", new short[] { 125, 50, 170, 0 }),
+ new GT_Fluid("EnzymesSollution", "molten.autogenerated", new short[] { 240, 200, 125, 0 }),
+ new GT_Fluid("Penicillin", "molten.autogenerated", new short[] { 255, 255, 255, 0 }),
+ new GT_Fluid("Polymerase", "molten.autogenerated", new short[] { 110, 180, 110, 0 }), };
FluidLoader.BioLabFluidCells = new ItemStack[FluidLoader.BioLabFluidMaterials.length];
for (int i = 0; i < FluidLoader.BioLabFluidMaterials.length; i++) {
@@ -80,31 +73,27 @@ public class FluidLoader {
}
GT_MetaGenerated_Item_98.FluidCell[] fluidCells = new GT_MetaGenerated_Item_98.FluidCell[] {
- GT_MetaGenerated_Item_98.FluidCell.FLUORESCENT_DNA,
- GT_MetaGenerated_Item_98.FluidCell.ENZYME_SOLUTION,
- GT_MetaGenerated_Item_98.FluidCell.PENICILLIN,
- GT_MetaGenerated_Item_98.FluidCell.POLYMERASE,
- };
+ GT_MetaGenerated_Item_98.FluidCell.FLUORESCENT_DNA, GT_MetaGenerated_Item_98.FluidCell.ENZYME_SOLUTION,
+ GT_MetaGenerated_Item_98.FluidCell.PENICILLIN, GT_MetaGenerated_Item_98.FluidCell.POLYMERASE, };
for (int i = 0; i < fluidCells.length; i++) {
FluidLoader.BioLabFluidCells[i] = fluidCells[i].get();
}
- // BioCulture.BIO_CULTURE_ARRAY_LIST.get(0).setFluid(new GT_Fluid("_NULL", "molten.autogenerated",
+ // BioCulture.BIO_CULTURE_ARRAY_LIST.get(0).setFluid(new GT_Fluid("_NULL", "molten.autogenerated",
// BW_Util.splitColorToRBGArray(BioCulture.BIO_CULTURE_ARRAY_LIST.get(0).getColorRGB())));
- 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.isBreedable()) {
- 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() }));
FluidRegistry.registerFluid(B.getFluid());
- GT_LanguageManager.addStringLocalization(
- B.getFluid().getUnlocalizedName(), B.getLocalisedName() + " Fluid");
+ GT_LanguageManager
+ .addStringLocalization(B.getFluid().getUnlocalizedName(), B.getLocalisedName() + " Fluid");
GT_Values.RA.addCentrifugeRecipe(
GT_Utility.getIntegratedCircuit(10),
GT_Values.NI,
@@ -132,18 +121,22 @@ public class FluidLoader {
}
public static Fluid createAndRegisterFluid(String Name, Color color) {
- Fluid f = new GT_Fluid(Name, "molten.autogenerated", new short[] {
- (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(), (short) color.getAlpha()
- });
+ Fluid f = new GT_Fluid(
+ Name,
+ "molten.autogenerated",
+ new short[] { (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(),
+ (short) color.getAlpha() });
GT_LanguageManager.addStringLocalization(f.getUnlocalizedName(), Name);
FluidRegistry.registerFluid(f);
return f;
}
public static Fluid createAndRegisterFluid(String Name, Color color, int temperature) {
- Fluid f = new GT_Fluid(Name, "molten.autogenerated", new short[] {
- (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(), (short) color.getAlpha()
- });
+ Fluid f = new GT_Fluid(
+ Name,
+ "molten.autogenerated",
+ new short[] { (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(),
+ (short) color.getAlpha() });
GT_LanguageManager.addStringLocalization(f.getUnlocalizedName(), Name);
f.setTemperature(temperature);
FluidRegistry.registerFluid(f);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java
index 40de4b8812..13aaa69461 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
@@ -26,11 +17,9 @@ import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
/**
- * Autogenerated run file, script Created on Wed Jan 2 19:11:07 2019 by boubou_19 and bartimaeusnek
- * Executed on 2019-01-03 02:08:43
- * modified by bartimaeusnek to only add blocks that mods are loaded
- * modified by bartimaeusnek on 2020-03-22 00:20 to run statically
- * modified by Quarri6343 on 2022-08-24 20:02 to add Botania Support
+ * Autogenerated run file, script Created on Wed Jan 2 19:11:07 2019 by boubou_19 and bartimaeusnek Executed on
+ * 2019-01-03 02:08:43 modified by bartimaeusnek to only add blocks that mods are loaded modified by bartimaeusnek on
+ * 2020-03-22 00:20 to run statically modified by Quarri6343 on 2022-08-24 20:02 to add Botania Support
*/
public class GTNHBlocks {
@@ -47,9 +36,8 @@ public class GTNHBlocks {
BioVatLogicAdder.BioVatGlass.addCustomGlass("Botania", "elfGlassPane", 0, 5);
}
if (LoaderReference.Botany) BioVatLogicAdder.BioVatGlass.addCustomGlass("Botany", "stained", 0, 3);
- if (LoaderReference.EnderIO)
- for (int i = 0; i <= 5; ++i)
- BioVatLogicAdder.BioVatGlass.addCustomGlass("EnderIO", "blockFusedQuartz", i, 3);
+ if (LoaderReference.EnderIO) for (int i = 0; i <= 5; ++i)
+ BioVatLogicAdder.BioVatGlass.addCustomGlass("EnderIO", "blockFusedQuartz", i, 3);
if (LoaderReference.ExtraUtilities) {
BioVatLogicAdder.BioVatGlass.addCustomGlass("ExtraUtilities", "decorativeBlock1", 9, 3);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
index 3ec699d6cc..a66ad633d5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
@@ -26,6 +17,13 @@ import static com.github.bartimaeusnek.bartworks.MainMod.BWT;
import static com.github.bartimaeusnek.bartworks.MainMod.GT2;
import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.newStuff;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.blocks.*;
@@ -44,6 +42,7 @@ import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.TT_MetaTileE
import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.TT_MetaTileEntity_LowPowerLaserDynamo;
import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.TT_MetaTileEntity_LowPowerLaserHatch;
import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.TT_MetaTileEntity_Pipe_Energy_LowPower;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -51,12 +50,6 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
import ic2.api.item.IKineticRotor;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
public class ItemRegistry {
@@ -66,8 +59,10 @@ public class ItemRegistry {
public static final Item ROCKCUTTER_MV = new GT_Rockcutter_Item(2);
public static final Item ROCKCUTTER_HV = new GT_Rockcutter_Item(3);
public static final Item CIRCUIT_PROGRAMMER = new Circuit_Programmer();
- public static final Block ROTORBLOCK =
- new BW_TileEntityContainer_MachineBlock(Material.wood, BW_RotorBlock.class, "BWRotorBlock");
+ public static final Block ROTORBLOCK = new BW_TileEntityContainer_MachineBlock(
+ Material.wood,
+ BW_RotorBlock.class,
+ "BWRotorBlock");
public static final Item LEATHER_ROTOR = new BW_Stonage_Rotors(
7,
0.15f,
@@ -126,93 +121,79 @@ public class ItemRegistry {
"rotors/combinedParts");
public static final Item TAB = new SimpleIconItem("GT2Coin");
public static final Item WINDMETER = new BW_SimpleWindMeter();
- public static final Block PUMPBLOCK =
- new BW_TileEntityContainer(Material.anvil, BW_TileEntity_HeatedWaterPump.class, "BWHeatedWaterPump");
+ public static final Block PUMPBLOCK = new BW_TileEntityContainer(
+ Material.anvil,
+ BW_TileEntity_HeatedWaterPump.class,
+ "BWHeatedWaterPump");
public static final Item PUMPPARTS = new SimpleSubItemClass("BWrawtube", "BWmotor");
- public static final Block EXPPUMP =
- new BW_TileEntityContainer(Material.coral, BW_TileEntity_ExperimentalFloodGate.class, "ExpReversePump");
+ public static final Block EXPPUMP = new BW_TileEntityContainer(
+ Material.coral,
+ BW_TileEntity_ExperimentalFloodGate.class,
+ "ExpReversePump");
public static final Block bw_realglas = new BW_GlasBlocks(
"BW_GlasBlocks",
- new String[] {
- MainMod.MOD_ID + ":BoronSilicateGlassBlock",
- MainMod.MOD_ID + ":TitaniumReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":TungstenSteelReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":LuVTierMaterialReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":IridiumReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":OsmiumReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock1",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock2",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock3",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock4",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock5",
- MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock6",
- MainMod.MOD_ID + ":ThoriumYttriumGlass",
- MainMod.MOD_ID + ":NeutroniumReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":CosmicNeutroniumReinforcedBoronSilicateGlassBlock",
- MainMod.MOD_ID + ":InfinityReinforcedBoronSilicateGlassBlock",
- },
- new short[][] {
- Materials.BorosilicateGlass.getRGBA(),
- Materials.Titanium.getRGBA(),
- Materials.TungstenSteel.getRGBA(),
- Materials.Chrome.getRGBA(),
- Materials.Iridium.getRGBA(),
- Materials.Osmium.getRGBA(),
- new short[] {0xff, 0, 0},
- new short[] {0, 0xff, 0},
- new short[] {0x80, 0, 0xff},
- new short[] {0xff, 0xff, 0},
- new short[] {0, 0xff, 0x80},
- new short[] {0x80, 0x33, 0},
- WerkstoffLoader.YttriumOxide.getRGBA(),
- Materials.Neutronium.getRGBA(),
- Materials.CosmicNeutronium.getRGBA(),
- new short[] {0xda, 0xeb, 0xff},
- },
+ new String[] { MainMod.MOD_ID + ":BoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":TitaniumReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":TungstenSteelReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":LuVTierMaterialReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":IridiumReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":OsmiumReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock1",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock2",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock3",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock4",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock5",
+ MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock6", MainMod.MOD_ID + ":ThoriumYttriumGlass",
+ MainMod.MOD_ID + ":NeutroniumReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":CosmicNeutroniumReinforcedBoronSilicateGlassBlock",
+ MainMod.MOD_ID + ":InfinityReinforcedBoronSilicateGlassBlock", },
+ new short[][] { Materials.BorosilicateGlass.getRGBA(), Materials.Titanium.getRGBA(),
+ Materials.TungstenSteel.getRGBA(), Materials.Chrome.getRGBA(), Materials.Iridium.getRGBA(),
+ Materials.Osmium.getRGBA(), new short[] { 0xff, 0, 0 }, new short[] { 0, 0xff, 0 },
+ new short[] { 0x80, 0, 0xff }, new short[] { 0xff, 0xff, 0 }, new short[] { 0, 0xff, 0x80 },
+ new short[] { 0x80, 0x33, 0 }, WerkstoffLoader.YttriumOxide.getRGBA(),
+ Materials.Neutronium.getRGBA(), Materials.CosmicNeutronium.getRGBA(),
+ new short[] { 0xda, 0xeb, 0xff }, },
MainMod.BIO_TAB,
true,
false);
public static final Block bw_realglas2 = new BW_GlasBlocks2(
"BW_GlasBlocks2",
- new String[] {MainMod.MOD_ID + ":TranscendentallyReinforcedBoronSilicateGlassBlock"},
- new short[][] {new short[] {50, 50, 50}},
+ new String[] { MainMod.MOD_ID + ":TranscendentallyReinforcedBoronSilicateGlassBlock" },
+ new short[][] { new short[] { 50, 50, 50 } },
MainMod.BIO_TAB,
true,
false);
- public static final Block[] bw_glasses = {bw_realglas, bw_realglas2};
+ public static final Block[] bw_glasses = { bw_realglas, bw_realglas2 };
public static final Block bw_fake_glasses = new BW_GlasBlocks(
- "BW_GlasBlocks", new String[] {MainMod.MOD_ID + ":BoronSilicateGlassBlockRandlos"}, null, null, true, true);
+ "BW_GlasBlocks",
+ new String[] { MainMod.MOD_ID + ":BoronSilicateGlassBlockRandlos" },
+ null,
+ null,
+ true,
+ true);
public static final Block bw_fake_glasses2 = new BW_GlasBlocks2(
"BW_GlasBlocks2",
- new String[] {MainMod.MOD_ID + ":BoronSilicateGlassBlockRandlos"},
+ new String[] { MainMod.MOD_ID + ":BoronSilicateGlassBlockRandlos" },
null,
null,
true,
true);
public static final Block[] BW_BLOCKS = {
- new BW_Blocks(
- "BW_ItemBlocks",
- new String[] {
- MainMod.MOD_ID + ":EtchedLapisCell", MainMod.MOD_ID + ":PlatedLapisCell",
- },
- GT2),
- new BW_Blocks(
- "GT_LESU_CASING",
- new String[] {
- MainMod.MOD_ID + ":LESU_CELL",
- },
- GT2),
- new BW_Blocks(
- "BW_Machinery_Casings",
- new String[] {
- MainMod.MOD_ID + ":NickelFerriteBlocks", MainMod.MOD_ID + ":TransformerCoil",
+ new BW_Blocks(
+ "BW_ItemBlocks",
+ new String[] { MainMod.MOD_ID + ":EtchedLapisCell", MainMod.MOD_ID + ":PlatedLapisCell", },
+ GT2),
+ new BW_Blocks("GT_LESU_CASING", new String[] { MainMod.MOD_ID + ":LESU_CELL", }, GT2),
+ new BW_Blocks(
+ "BW_Machinery_Casings",
+ new String[] { MainMod.MOD_ID + ":NickelFerriteBlocks", MainMod.MOD_ID + ":TransformerCoil",
// MainMod.MOD_ID+":DEHP_Casing",
// MainMod.MOD_ID+":DEHP_Casing_Base"
- },
- BWT),
- };
+ },
+ BWT), };
public static ItemStack[] diode2A = new ItemStack[GT_Values.VN.length];
public static ItemStack[] diode4A = new ItemStack[GT_Values.VN.length];
@@ -267,185 +248,172 @@ public class ItemRegistry {
GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_HV, ItemRegistry.ROCKCUTTER_HV.getUnlocalizedName());
GameRegistry.registerItem(ItemRegistry.TAB, "tabIconGT2");
if (newStuff) {
- if (ConfigHandler.creativeScannerID != 0)
- new CreativeScanner(
- ConfigHandler.creativeScannerID, "Creative Debug Scanner", "Creative Debug Scanner", 20);
+ if (ConfigHandler.creativeScannerID != 0) new CreativeScanner(
+ ConfigHandler.creativeScannerID,
+ "Creative Debug Scanner",
+ "Creative Debug Scanner",
+ 20);
ItemRegistry.eic = new GT_TileEntity_ElectricImplosionCompressor(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 6,
- "ElectricImplosionCompressor",
- "Electric Implosion Compressor")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 6,
+ "ElectricImplosionCompressor",
+ "Electric Implosion Compressor").getStackForm(1L);
// EIC depend on neutronium block to pass on structure updates
int bitmask = GregTech_API.sMachineIDs.getOrDefault(GregTech_API.sBlockMetal5, 0) | (1 << 2);
GregTech_API.registerMachineBlock(GregTech_API.sBlockMetal5, bitmask);
ItemRegistry.THTR = new GT_TileEntity_THTR(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 5,
- "THTR",
- "Thorium High Temperature Reactor")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 5,
+ "THTR",
+ "Thorium High Temperature Reactor").getStackForm(1L);
GT_TileEntity_THTR.THTRMaterials.registeraTHR_Materials();
ItemRegistry.HTGR = new GT_TileEntity_HTGR(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 48,
- "HTGR",
- "High Temperature Gas-cooled Reactor")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 48,
+ "HTGR",
+ "High Temperature Gas-cooled Reactor").getStackForm(1L);
GT_TileEntity_HTGR.HTGRMaterials.registeraTHR_Materials();
ItemRegistry.EIG = new GT_TileEntity_ExtremeIndustrialGreenhouse(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 49,
- "EIG",
- "Extreme Industrial Greenhouse")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 49,
+ "EIG",
+ "Extreme Industrial Greenhouse").getStackForm(1L);
GT_OreDictUnificator.add(
- OrePrefixes.block, Materials.BorosilicateGlass, new ItemStack(ItemRegistry.bw_glasses[0], 1, 0));
+ OrePrefixes.block,
+ Materials.BorosilicateGlass,
+ new ItemStack(ItemRegistry.bw_glasses[0], 1, 0));
GT_OreDictUnificator.registerOre(
- OrePrefixes.block, Materials.NickelZincFerrite, new ItemStack(ItemRegistry.BW_BLOCKS[2]));
+ OrePrefixes.block,
+ Materials.NickelZincFerrite,
+ new ItemStack(ItemRegistry.BW_BLOCKS[2]));
for (int i = 0; i < GT_Values.VN.length - 1; i++) {
ItemRegistry.diode2A[i] = new GT_MetaTileEntity_Diode(
- ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i,
- "diode" + "2A" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.diode.name") + " 2A " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i,
+ "diode" + "2A" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.diode.name") + " 2A " + GT_Values.VN[i],
+ i).getStackForm(1L);
ItemRegistry.diode4A[i] = new GT_MetaTileEntity_Diode(
- ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i,
- "diode" + "4A" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.diode.name") + " 4A " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i,
+ "diode" + "4A" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.diode.name") + " 4A " + GT_Values.VN[i],
+ i).getStackForm(1L);
ItemRegistry.diode8A[i] = new GT_MetaTileEntity_Diode(
- ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i,
- "diode" + "8A" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.diode.name") + " 8A " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i,
+ "diode" + "8A" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.diode.name") + " 8A " + GT_Values.VN[i],
+ i).getStackForm(1L);
ItemRegistry.diode12A[i] = new GT_MetaTileEntity_Diode(
- ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i,
- "diode" + "12A" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.diode.name") + " 12A " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i,
+ "diode" + "12A" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.diode.name") + " 12A " + GT_Values.VN[i],
+ i).getStackForm(1L);
ItemRegistry.diode16A[i] = new GT_MetaTileEntity_Diode(
- ConfigHandler.IDOffset + GT_Values.VN.length * 5 + 1 + i,
- "diode" + "16A" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.diode.name") + " 16A " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 5 + 1 + i,
+ "diode" + "16A" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.diode.name") + " 16A " + GT_Values.VN[i],
+ i).getStackForm(1L);
ItemRegistry.energyDistributor[i] = new GT_MetaTileEntity_EnergyDistributor(
- ConfigHandler.IDOffset + 1 + i,
- "energydistributor" + GT_Values.VN[i],
- StatCollector.translateToLocal("tile.energydistributor.name") + " " + GT_Values.VN[i],
- i)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + 1 + i,
+ "energydistributor" + GT_Values.VN[i],
+ StatCollector.translateToLocal("tile.energydistributor.name") + " " + GT_Values.VN[i],
+ i).getStackForm(1L);
}
for (int i = 0; i < 3; i++) {
ItemRegistry.acidGens[i] = new GT_MetaTileEntity_AcidGenerator(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 - 2 + i,
- "acidgenerator" + GT_Values.VN[i + 2],
- StatCollector.translateToLocal("tile.acidgenerator.name") + " " + GT_Values.VN[i + 2],
- i + 2)
- .getStackForm(1);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 - 2 + i,
+ "acidgenerator" + GT_Values.VN[i + 2],
+ StatCollector.translateToLocal("tile.acidgenerator.name") + " " + GT_Values.VN[i + 2],
+ i + 2).getStackForm(1);
}
ItemRegistry.acidGensLV = new GT_MetaTileEntity_AcidGenerator(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 65,
- "acidgenerator" + GT_Values.VN[1],
- StatCollector.translateToLocal("tile.acidgenerator.name") + " " + GT_Values.VN[1],
- +1)
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 65,
+ "acidgenerator" + GT_Values.VN[1],
+ StatCollector.translateToLocal("tile.acidgenerator.name") + " " + GT_Values.VN[1],
+ +1).getStackForm(1L);
ItemRegistry.dehp = new GT_TileEntity_DEHP(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 1, 1, "DEHP", "Deep Earth Heating Pump")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 1,
+ 1,
+ "DEHP",
+ "Deep Earth Heating Pump").getStackForm(1L);
ItemRegistry.megaMachines[0] = new GT_TileEntity_MegaBlastFurnace(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 2,
- "MegaBlastFurnace",
- StatCollector.translateToLocal("tile.bw.mbf.name"))
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 2,
+ "MegaBlastFurnace",
+ StatCollector.translateToLocal("tile.bw.mbf.name")).getStackForm(1L);
ItemRegistry.megaMachines[1] = new GT_TileEntity_MegaVacuumFreezer(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 3,
- "MegaVacuumFreezer",
- StatCollector.translateToLocal("tile.bw.mvf.name"))
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 3,
+ "MegaVacuumFreezer",
+ StatCollector.translateToLocal("tile.bw.mvf.name")).getStackForm(1L);
ItemRegistry.cal = new GT_TileEntity_CircuitAssemblyLine(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 7,
- "CircuitAssemblyLine",
- "Circuit Assembly Line")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 7,
+ "CircuitAssemblyLine",
+ "Circuit Assembly Line").getStackForm(1L);
ItemRegistry.compressedHatch = new GT_MetaTileEntity_CompressedFluidHatch(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 8,
- "CompressedFluidHatch",
- "Liquid Air Fluid Hatch")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 8,
+ "CompressedFluidHatch",
+ "Liquid Air Fluid Hatch").getStackForm(1L);
ItemRegistry.giantOutputHatch = new GT_MetaTileEntity_GiantOutputHatch(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 9,
- "GiantOutputHatch",
- "Giant Output Hatch")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 9,
+ "GiantOutputHatch",
+ "Giant Output Hatch").getStackForm(1L);
ItemRegistry.megaMachines[2] = new GT_TileEntity_MegaDistillTower(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 10,
- "MegaDistillationTower",
- "Mega Distillation Tower")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 10,
+ "MegaDistillationTower",
+ "Mega Distillation Tower").getStackForm(1L);
ItemRegistry.megaMachines[3] = new GT_TileEntity_MegaChemicalReactor(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 638,
- "MegaChemicalReactor",
- "Mega Chemical Reactor")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 638,
+ "MegaChemicalReactor",
+ "Mega Chemical Reactor").getStackForm(1L);
ItemRegistry.megaMachines[4] = new GT_TileEntity_MegaOilCracker(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 639,
- "MegaOilCracker",
- "Mega Oil Cracker")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 639,
+ "MegaOilCracker",
+ "Mega Oil Cracker").getStackForm(1L);
if (LoaderReference.galacticgreg && WerkstoffLoader.gtnhGT) {
ItemRegistry.voidminer[2] = new GT_TileEntity_VoidMiners.VMUV(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 11, "VoidMiner3", "Void Miner III")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 11,
+ "VoidMiner3",
+ "Void Miner III").getStackForm(1L);
ItemRegistry.voidminer[1] = new GT_TileEntity_VoidMiners.VMZPM(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 12, "VoidMiner2", "Void Miner II")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 12,
+ "VoidMiner2",
+ "Void Miner II").getStackForm(1L);
ItemRegistry.voidminer[0] = new GT_TileEntity_VoidMiners.VMLUV(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 13, "VoidMiner1", "Void Miner I")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 13,
+ "VoidMiner1",
+ "Void Miner I").getStackForm(1L);
}
if (LoaderReference.tectech) {
TecTechPipeEnergyLowPower = new TT_MetaTileEntity_Pipe_Energy_LowPower(
- ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 14,
- "pipe.lowpowerlaser",
- "Low Power Laser Pipe")
- .getStackForm(1L);
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 14,
+ "pipe.lowpowerlaser",
+ "Low Power Laser Pipe").getStackForm(1L);
int startID = ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15;
for (int amps = 32; amps <= 128; amps += 32) {
for (int tier = 4; tier < 8; tier++) {
TecTechLaserAdditions[0][amps / 32 - 1][tier - 4] = new TT_MetaTileEntity_LowPowerLaserBox(
- startID++,
- GT_Values.VN[tier] + "_LPLaser_Converter_" + amps,
- GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Converter",
- tier,
- amps)
- .getStackForm(1L);
+ startID++,
+ GT_Values.VN[tier] + "_LPLaser_Converter_" + amps,
+ GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Converter",
+ tier,
+ amps).getStackForm(1L);
}
}
for (int amps = 32; amps <= 128; amps += 32) {
for (int tier = 4; tier < 8; tier++) {
TecTechLaserAdditions[1][amps / 32 - 1][tier - 4] = new TT_MetaTileEntity_LowPowerLaserHatch(
- startID++,
- GT_Values.VN[tier] + "_LPLaser_Hatch_" + amps,
- GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Target Hatch",
- tier,
- amps)
- .getStackForm(1L);
+ startID++,
+ GT_Values.VN[tier] + "_LPLaser_Hatch_" + amps,
+ GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Target Hatch",
+ tier,
+ amps).getStackForm(1L);
}
}
for (int amps = 32; amps <= 128; amps += 32) {
for (int tier = 4; tier < 8; tier++) {
TecTechLaserAdditions[2][amps / 32 - 1][tier - 4] = new TT_MetaTileEntity_LowPowerLaserDynamo(
- startID++,
- GT_Values.VN[tier] + "_LPLaser_Dynamo_" + amps,
- GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Source Hatch",
- tier,
- amps)
- .getStackForm(1L);
+ startID++,
+ GT_Values.VN[tier] + "_LPLaser_Dynamo_" + amps,
+ GT_Values.VN[tier] + " " + amps + "A/t" + " Low Power Laser Source Hatch",
+ tier,
+ amps).getStackForm(1L);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java
index 9ca7cedec8..4307dca78c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
@@ -29,36 +20,41 @@ public class LocalisationLoader {
private LocalisationLoader() {}
private static void localiseTooltips() {
- GT_LanguageManager.addStringLocalization(
- "metaitem.01.tooltip.purify.2", "Throw into Cauldron to get clean crushed Ore");
- GT_LanguageManager.addStringLocalization(
- "metaitem.01.tooltip.nqgen", "Can be used as Enriched Naquadah Fuel Substitute");
+ GT_LanguageManager
+ .addStringLocalization("metaitem.01.tooltip.purify.2", "Throw into Cauldron to get clean crushed Ore");
+ GT_LanguageManager
+ .addStringLocalization("metaitem.01.tooltip.nqgen", "Can be used as Enriched Naquadah Fuel Substitute");
}
private static void localiseAchivements() {
GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.electricimplosioncompressor", "Electric Implosions?");
+ "achievement.gt.blockmachines.electricimplosioncompressor",
+ "Electric Implosions?");
GT_LanguageManager.addStringLocalization(
"achievement.gt.blockmachines.electricimplosioncompressor.desc",
"Basically a giant Hammer that presses Stuff - No more TNT!");
GT_LanguageManager.addStringLocalization("achievement.gt.blockmachines.dehp", "Heat from below!");
+ GT_LanguageManager
+ .addStringLocalization("achievement.gt.blockmachines.dehp.desc", "Get ALL the thermal energy!");
+ GT_LanguageManager
+ .addStringLocalization("achievement.gt.blockmachines.circuitassemblyline", "Cheaper Circuits?");
GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.dehp.desc", "Get ALL the thermal energy!");
- GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.circuitassemblyline", "Cheaper Circuits?");
- GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.circuitassemblyline.desc", "Well, yes, but actually no...");
+ "achievement.gt.blockmachines.circuitassemblyline.desc",
+ "Well, yes, but actually no...");
GT_LanguageManager.addStringLocalization("achievement.gt.blockmachines.voidminer1", "Ores from deep below!");
GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.voidminer1.desc", "Is this some kind of Ex-Nihilo?");
- GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.voidminer2", "Ores from deep below 2! Electric Boogaloo!");
- GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.voidminer2.desc", "Ex-Nihilo, but faster!");
+ "achievement.gt.blockmachines.voidminer1.desc",
+ "Is this some kind of Ex-Nihilo?");
GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.voidminer3", "Ores from deep below 3! Trinity Ex-Nihilo");
+ "achievement.gt.blockmachines.voidminer2",
+ "Ores from deep below 2! Electric Boogaloo!");
+ GT_LanguageManager
+ .addStringLocalization("achievement.gt.blockmachines.voidminer2.desc", "Ex-Nihilo, but faster!");
GT_LanguageManager.addStringLocalization(
- "achievement.gt.blockmachines.voidminer3.desc", "3x the trouble, 3x the fun!");
+ "achievement.gt.blockmachines.voidminer3",
+ "Ores from deep below 3! Trinity Ex-Nihilo");
+ GT_LanguageManager
+ .addStringLocalization("achievement.gt.blockmachines.voidminer3.desc", "3x the trouble, 3x the fun!");
}
public static void localiseAll() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java
index 8d0bdd1b48..ee839f56c4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java
@@ -4,6 +4,7 @@ import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialIte
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -27,24 +28,21 @@ public class RadioHatchMaterialLoader {
for (Materials material : Materials.getAll()) {
if (material == null || material.mElement == null) continue;
- boolean validProton = material.getProtons() >= 83
- && !material.equals(Materials.Tritanium) // No Tritanium
+ boolean validProton = material.getProtons() >= 83 && !material.equals(Materials.Tritanium) // No Tritanium
&& !material.equals(Materials.Naquadah); // Naquadah needs spacial value
if (validProton) {
int level = (int) material.getProtons();
short[] rgba = material.getRGBA();
- if (GT_OreDictUnificator.get(OrePrefixes.stick, material, 1) != null)
- BWRecipes.instance.addRadHatch(
- GT_OreDictUnificator.get(OrePrefixes.stick, material, 1), level, 1, rgba);
- if (GT_OreDictUnificator.get(OrePrefixes.stickLong, material, 1) != null)
- BWRecipes.instance.addRadHatch(
- GT_OreDictUnificator.get(OrePrefixes.stickLong, material, 1), level, 2, rgba);
+ if (GT_OreDictUnificator.get(OrePrefixes.stick, material, 1) != null) BWRecipes.instance
+ .addRadHatch(GT_OreDictUnificator.get(OrePrefixes.stick, material, 1), level, 1, rgba);
+ if (GT_OreDictUnificator.get(OrePrefixes.stickLong, material, 1) != null) BWRecipes.instance
+ .addRadHatch(GT_OreDictUnificator.get(OrePrefixes.stickLong, material, 1), level, 2, rgba);
}
}
- Materials[] spacialMaterial =
- new Materials[] {Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria};
- int[] spacialValue = new int[] {130, 140, 150};
+ Materials[] spacialMaterial = new Materials[] { Materials.Naquadah, Materials.NaquadahEnriched,
+ Materials.Naquadria };
+ int[] spacialValue = new int[] { 130, 140, 150 };
for (int i = 0; i < spacialMaterial.length; i++) {
if (GT_OreDictUnificator.get(OrePrefixes.stick, spacialMaterial[i], 1) != null)
@@ -62,29 +60,56 @@ public class RadioHatchMaterialLoader {
}
BWRecipes.instance.addRadHatch(
- ItemList.ThoriumCell_1.get(1), (int) Materials.Thorium.getProtons(), 3, Materials.Thorium.mRGBa);
+ ItemList.ThoriumCell_1.get(1),
+ (int) Materials.Thorium.getProtons(),
+ 3,
+ Materials.Thorium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.ThoriumCell_2.get(1), (int) Materials.Thorium.getProtons(), 6, Materials.Thorium.mRGBa);
+ ItemList.ThoriumCell_2.get(1),
+ (int) Materials.Thorium.getProtons(),
+ 6,
+ Materials.Thorium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.ThoriumCell_4.get(1), (int) Materials.Thorium.getProtons(), 12, Materials.Thorium.mRGBa);
+ ItemList.ThoriumCell_4.get(1),
+ (int) Materials.Thorium.getProtons(),
+ 12,
+ Materials.Thorium.mRGBa);
BWRecipes.instance.addRadHatch(ItemList.NaquadahCell_1.get(1), 140, 3, Materials.NaquadahEnriched.mRGBa);
BWRecipes.instance.addRadHatch(ItemList.NaquadahCell_2.get(1), 140, 6, Materials.NaquadahEnriched.mRGBa);
BWRecipes.instance.addRadHatch(ItemList.NaquadahCell_4.get(1), 140, 12, Materials.NaquadahEnriched.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Moxcell_1.get(1), (int) Materials.Plutonium.getProtons(), 3, Materials.Plutonium.mRGBa);
+ ItemList.Moxcell_1.get(1),
+ (int) Materials.Plutonium.getProtons(),
+ 3,
+ Materials.Plutonium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Moxcell_2.get(1), (int) Materials.Plutonium.getProtons(), 6, Materials.Plutonium.mRGBa);
+ ItemList.Moxcell_2.get(1),
+ (int) Materials.Plutonium.getProtons(),
+ 6,
+ Materials.Plutonium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Moxcell_4.get(1), (int) Materials.Plutonium.getProtons(), 12, Materials.Plutonium.mRGBa);
+ ItemList.Moxcell_4.get(1),
+ (int) Materials.Plutonium.getProtons(),
+ 12,
+ Materials.Plutonium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Uraniumcell_1.get(1), (int) Materials.Uranium.getProtons(), 3, Materials.Uranium.mRGBa);
+ ItemList.Uraniumcell_1.get(1),
+ (int) Materials.Uranium.getProtons(),
+ 3,
+ Materials.Uranium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Uraniumcell_2.get(1), (int) Materials.Uranium.getProtons(), 6, Materials.Uranium.mRGBa);
+ ItemList.Uraniumcell_2.get(1),
+ (int) Materials.Uranium.getProtons(),
+ 6,
+ Materials.Uranium.mRGBa);
BWRecipes.instance.addRadHatch(
- ItemList.Uraniumcell_4.get(1), (int) Materials.Uranium.getProtons(), 12, Materials.Uranium.mRGBa);
+ ItemList.Uraniumcell_4.get(1),
+ (int) Materials.Uranium.getProtons(),
+ 12,
+ Materials.Uranium.mRGBa);
BWRecipes.instance.addRadHatch(
BW_NonMeta_MaterialItems.TiberiumCell_1.get(1),
@@ -102,8 +127,8 @@ public class RadioHatchMaterialLoader {
12,
WerkstoffLoader.Tiberium.getRGBA());
- BWRecipes.instance.addRadHatch(
- BW_NonMeta_MaterialItems.TheCoreCell.get(1), 140, 96, Materials.NaquadahEnriched.mRGBa);
+ BWRecipes.instance
+ .addRadHatch(BW_NonMeta_MaterialItems.TheCoreCell.get(1), 140, 96, Materials.NaquadahEnriched.mRGBa);
BWRecipes.instance.addRadHatch(
ItemList.Depleted_Thorium_1.get(1),
@@ -121,12 +146,12 @@ public class RadioHatchMaterialLoader {
12,
Materials.Thorium.mRGBa);
- BWRecipes.instance.addRadHatch(
- ItemList.Depleted_Naquadah_1.get(1), 140 / 10, 3, Materials.NaquadahEnriched.mRGBa);
- BWRecipes.instance.addRadHatch(
- ItemList.Depleted_Naquadah_2.get(1), 140 / 10, 6, Materials.NaquadahEnriched.mRGBa);
- BWRecipes.instance.addRadHatch(
- ItemList.Depleted_Naquadah_4.get(1), 140 / 10, 12, Materials.NaquadahEnriched.mRGBa);
+ BWRecipes.instance
+ .addRadHatch(ItemList.Depleted_Naquadah_1.get(1), 140 / 10, 3, Materials.NaquadahEnriched.mRGBa);
+ BWRecipes.instance
+ .addRadHatch(ItemList.Depleted_Naquadah_2.get(1), 140 / 10, 6, Materials.NaquadahEnriched.mRGBa);
+ BWRecipes.instance
+ .addRadHatch(ItemList.Depleted_Naquadah_4.get(1), 140 / 10, 12, Materials.NaquadahEnriched.mRGBa);
BWRecipes.instance.addRadHatch(
GT_ModHandler.getModItem("IC2", "reactorMOXSimpledepleted", 1),
@@ -177,7 +202,10 @@ public class RadioHatchMaterialLoader {
WerkstoffLoader.Tiberium.getRGBA());
BWRecipes.instance.addRadHatch(
- BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1), 130 / 10, 96, Materials.Naquadah.mRGBa);
+ BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1),
+ 130 / 10,
+ 96,
+ Materials.Naquadah.mRGBa);
if (WerkstoffLoader.gtnhGT) {
BWRecipes.instance.addRadHatch(ItemList.MNqCell_1.get(1), 150, 3, Materials.Naquadria.mRGBa);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
index d2ba8f2d59..bfcf0eadc3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
@@ -1,29 +1,29 @@
/*
- * 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.common.loaders;
import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.newStuff;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.*;
@@ -31,6 +31,7 @@ import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ISubTagContainer;
@@ -39,19 +40,10 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import ic2.core.Ic2Items;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
public class RecipeLoader {
- protected static final long BITSD = GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.NOT_REMOVABLE
+ protected static final long BITSD = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE
| GT_ModHandler.RecipeBits.REVERSIBLE;
@SuppressWarnings("deprecation")
@@ -69,22 +61,16 @@ public class RecipeLoader {
100,
BW_Util.getMachineVoltageFromTier(3));
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0),
- Materials.Lapis.getPlates(9),
- GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2L),
- GT_Utility.getIntegratedCircuit(17)
- },
+ new ItemStack[] { new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0), Materials.Lapis.getPlates(9),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2L),
+ GT_Utility.getIntegratedCircuit(17) },
FluidRegistry.getFluidStack("ic2coolant", 1000),
new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1),
100,
BW_Util.getMachineVoltageFromTier(3));
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1),
- Materials.Lapis.getBlocks(8),
- GT_Utility.getIntegratedCircuit(17)
- },
+ new ItemStack[] { new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1), Materials.Lapis.getBlocks(8),
+ GT_Utility.getIntegratedCircuit(17) },
GT_Values.NF,
new ItemStack(ItemRegistry.BW_BLOCKS[1]),
100,
@@ -95,19 +81,18 @@ public class RecipeLoader {
*/
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- Materials.Lapis.getBlocks(8),
- GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
- GT_Utility.getIntegratedCircuit(17)
- },
+ new ItemStack[] { Materials.Lapis.getBlocks(8),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
+ GT_Utility.getIntegratedCircuit(17) },
GT_Values.NF,
new ItemStack(ItemRegistry.BW_BLOCKS[1]),
100,
BW_Util.getMachineVoltageFromTier(1));
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[1]), RecipeLoader.BITSD, new Object[] {
- "LLL", "LCL", "LLL", 'L', Materials.Lapis.getBlocks(1), 'C', "circuitBasic"
- });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.BW_BLOCKS[1]),
+ RecipeLoader.BITSD,
+ new Object[] { "LLL", "LCL", "LLL", 'L', Materials.Lapis.getBlocks(1), 'C', "circuitBasic" });
GT_Values.RA.addCutterRecipe(
new ItemStack(ItemRegistry.BW_BLOCKS[1]),
@@ -128,11 +113,11 @@ public class RecipeLoader {
GT_ModHandler.addShapelessCraftingRecipe(
new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0),
RecipeLoader.BITSD,
- new Object[] {new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1)});
+ new Object[] { new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1) });
GT_ModHandler.addShapelessCraftingRecipe(
new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1),
RecipeLoader.BITSD,
- new Object[] {new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0)});
+ new Object[] { new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0) });
}
/*
@@ -142,117 +127,69 @@ public class RecipeLoader {
GT_ModHandler.addCraftingRecipe(
new GT_TileEntity_LESU(ConfigHandler.IDOffset, "LESU", "L.E.S.U.").getStackForm(1L),
RecipeLoader.BITSD,
- new Object[] {
- "CDC",
- "SBS",
- "CFC",
- 'C',
- ConfigHandler.hardmode ? "circuitAdvanced" : "circuitBasic",
- 'D',
- ItemList.Cover_Screen.get(1L),
- 'S',
- GT_OreDictUnificator.get(
- OrePrefixes.cableGt12,
- ConfigHandler.hardmode ? Materials.Platinum : Materials.AnnealedCopper,
- 1L),
- 'B',
- new ItemStack(ItemRegistry.BW_BLOCKS[1]),
- 'F',
- ConfigHandler.hardmode ? ItemList.Field_Generator_HV.get(1L) : ItemList.Field_Generator_LV.get(1L)
- });
+ new Object[] { "CDC", "SBS", "CFC", 'C', ConfigHandler.hardmode ? "circuitAdvanced" : "circuitBasic",
+ 'D', ItemList.Cover_Screen.get(1L), 'S',
+ GT_OreDictUnificator.get(
+ OrePrefixes.cableGt12,
+ ConfigHandler.hardmode ? Materials.Platinum : Materials.AnnealedCopper,
+ 1L),
+ 'B', new ItemStack(ItemRegistry.BW_BLOCKS[1]), 'F',
+ ConfigHandler.hardmode ? ItemList.Field_Generator_HV.get(1L)
+ : ItemList.Field_Generator_LV.get(1L) });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.DESTRUCTOPACK), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "CPC",
- "PLP",
- "CPC",
- 'C',
- "circuitAdvanced",
- 'P',
- GT_OreDictUnificator.get(
- ConfigHandler.hardmode ? OrePrefixes.plateDouble : OrePrefixes.plate,
- Materials.Aluminium,
- 1L),
- 'L',
- new ItemStack(Items.lava_bucket)
- });
+ new ItemStack(ItemRegistry.DESTRUCTOPACK),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "CPC", "PLP", "CPC", 'C', "circuitAdvanced", 'P',
+ GT_OreDictUnificator.get(
+ ConfigHandler.hardmode ? OrePrefixes.plateDouble : OrePrefixes.plate,
+ Materials.Aluminium,
+ 1L),
+ 'L', new ItemStack(Items.lava_bucket) });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.DESTRUCTOPACK), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "CPC",
- "PLP",
- "CPC",
- 'C',
- "circuitAdvanced",
- 'P',
- GT_OreDictUnificator.get(
- ConfigHandler.hardmode ? OrePrefixes.plateDouble : OrePrefixes.plate,
- ConfigHandler.hardmode ? Materials.Steel : Materials.Iron,
- 1L),
- 'L',
- new ItemStack(Items.lava_bucket)
- });
+ new ItemStack(ItemRegistry.DESTRUCTOPACK),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "CPC", "PLP", "CPC", 'C', "circuitAdvanced", 'P',
+ GT_OreDictUnificator.get(
+ ConfigHandler.hardmode ? OrePrefixes.plateDouble : OrePrefixes.plate,
+ ConfigHandler.hardmode ? Materials.Steel : Materials.Iron,
+ 1L),
+ 'L', new ItemStack(Items.lava_bucket) });
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.ROCKCUTTER_MV), RecipeLoader.BITSD, new Object[] {
- "DS ",
- "DP ",
- "DCB",
- 'D',
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L),
- 'S',
- GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1L),
- 'C',
- "circuitGood",
- 'B',
- ItemList.IC2_AdvBattery.get(1L)
- });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.ROCKCUTTER_MV),
+ RecipeLoader.BITSD,
+ new Object[] { "DS ", "DP ", "DCB", 'D',
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), 'S',
+ GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1L), 'C', "circuitGood",
+ 'B', ItemList.IC2_AdvBattery.get(1L) });
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.ROCKCUTTER_LV), RecipeLoader.BITSD, new Object[] {
- "DS ",
- "DP ",
- "DCB",
- 'D',
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L),
- 'S',
- GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L),
- 'C',
- "circuitBasic",
- 'B',
- ItemList.IC2_ReBattery.get(1L)
- });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.ROCKCUTTER_LV),
+ RecipeLoader.BITSD,
+ new Object[] { "DS ", "DP ", "DCB", 'D',
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), 'S',
+ GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), 'C', "circuitBasic", 'B',
+ ItemList.IC2_ReBattery.get(1L) });
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.ROCKCUTTER_HV), RecipeLoader.BITSD, new Object[] {
- "DS ",
- "DP ",
- "DCB",
- 'D',
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L),
- 'S',
- GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L),
- 'C',
- "circuitAdvanced",
- 'B',
- ItemList.IC2_EnergyCrystal.get(1L)
- });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.ROCKCUTTER_HV),
+ RecipeLoader.BITSD,
+ new Object[] { "DS ", "DP ", "DCB", 'D',
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), 'S',
+ GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), 'C', "circuitAdvanced", 'B',
+ ItemList.IC2_EnergyCrystal.get(1L) });
- if (ConfigHandler.teslastaff)
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.TESLASTAFF), RecipeLoader.BITSD, new Object[] {
- "BO ",
- "OP ",
- " P",
- 'O',
- GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor, 1L),
- 'B',
- ItemList.Energy_LapotronicOrb.get(1L),
- 'P',
- "plateAlloyIridium",
- });
+ if (ConfigHandler.teslastaff) GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.TESLASTAFF),
+ RecipeLoader.BITSD,
+ new Object[] { "BO ", "OP ", " P", 'O',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor, 1L), 'B',
+ ItemList.Energy_LapotronicOrb.get(1L), 'P', "plateAlloyIridium", });
Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
? FluidRegistry.getFluid("molten.indalloy140")
@@ -263,72 +200,44 @@ public class RecipeLoader {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.PUMPPARTS, 1, 0), // tube
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {" fG", " G ", "G ", 'G', ItemList.Circuit_Parts_Glass_Tube.get(1L)});
+ new Object[] { " fG", " G ", "G ", 'G', ItemList.Circuit_Parts_Glass_Tube.get(1L) });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.PUMPPARTS, 1, 1), // motor
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "GLP",
- "LSd",
- "PfT",
- 'G',
- GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 1L),
- 'L',
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 1L),
- 'S',
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L),
- 'P',
- new ItemStack(Blocks.piston),
- 'T',
- new ItemStack(ItemRegistry.PUMPPARTS, 1, 0)
- });
+ new Object[] { "GLP", "LSd", "PfT", 'G',
+ GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 1L), 'L',
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 1L), 'S',
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), 'P',
+ new ItemStack(Blocks.piston), 'T', new ItemStack(ItemRegistry.PUMPPARTS, 1, 0) });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.PUMPBLOCK, 1, 0), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "IPI",
- "PMP",
- "ISI",
- 'I',
- GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L),
- 'P',
- GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Wood, 1L),
- 'M',
- new ItemStack(ItemRegistry.PUMPPARTS, 1, 1),
- 'S',
- Ic2Items.ironFurnace
- });
+ new ItemStack(ItemRegistry.PUMPBLOCK, 1, 0),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "IPI", "PMP", "ISI", 'I',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Wood, 1L), 'M',
+ new ItemStack(ItemRegistry.PUMPPARTS, 1, 1), 'S', Ic2Items.ironFurnace });
- if (!ConfigHandler.hardmode)
- GT_ModHandler.addCraftingRecipe(ItemRegistry.dehp, RecipeLoader.BITSD, new Object[] {
- "GPG",
- "NCN",
- "GPG",
- 'G',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 1L),
- 'P',
+ if (!ConfigHandler.hardmode) GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.dehp,
+ RecipeLoader.BITSD,
+ new Object[] { "GPG", "NCN", "GPG", 'G',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 1L), 'P',
+ ItemList.Pump_IV.get(1L), 'N',
+ GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L), 'C',
+ ItemList.MACHINE_HULLS[5], });
+ else GT_Values.RA.addAssemblylineRecipe(
ItemList.Pump_IV.get(1L),
- 'N',
- GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L),
- 'C',
- ItemList.MACHINE_HULLS[5],
- });
- else
- GT_Values.RA.addAssemblylineRecipe(
- ItemList.Pump_IV.get(1L),
- 72000,
- new ItemStack[] {
- ItemList.Pump_IV.get(16),
+ 72000,
+ new ItemStack[] { ItemList.Pump_IV.get(16),
GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 32L),
GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 16L),
GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 16L),
- ItemList.Field_Generator_LuV.get(8)
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 32 * 144),
- Materials.Polytetrafluoroethylene.getMolten(32 * 144)
- },
- ItemRegistry.dehp,
- 5000,
- BW_Util.getMachineVoltageFromTier(6));
+ ItemList.Field_Generator_LuV.get(8) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 32 * 144),
+ Materials.Polytetrafluoroethylene.getMolten(32 * 144) },
+ ItemRegistry.dehp,
+ 5000,
+ BW_Util.getMachineVoltageFromTier(6));
GT_Values.RA.addAssemblerRecipe(
GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 64, 1000),
@@ -378,8 +287,7 @@ public class RecipeLoader {
new ItemStack(ItemRegistry.bw_glasses[0], 1, 2),
800,
BW_Util.getMachineVoltageFromTier(4));
- FluidStack LuVMaterialFluid = ConfigHandler.newStuff
- ? WerkstoffLoader.LuVTierMaterial.getMolten(1152)
+ FluidStack LuVMaterialFluid = ConfigHandler.newStuff ? WerkstoffLoader.LuVTierMaterial.getMolten(1152)
: Materials.Chrome.getMolten(1152);
GT_Values.RA.addFluidSolidifierRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 0),
@@ -483,13 +391,13 @@ public class RecipeLoader {
// and reverse recipes... cause im nice :P
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 1),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.Titanium.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.Titanium.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(4));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 2),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.TungstenSteel.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.TungstenSteel.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(5));
@@ -498,43 +406,43 @@ public class RecipeLoader {
: Materials.Chrome.getDust(8);
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 3),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), LuVMaterialDust},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), LuVMaterialDust },
null,
800,
BW_Util.getMachineVoltageFromTier(6));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 4),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.Iridium.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.Iridium.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(7));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 5),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.Osmium.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.Osmium.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(8));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 13),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.Neutronium.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.Neutronium.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(9));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 14),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.CosmicNeutronium.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.CosmicNeutronium.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(10));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, 15),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.Infinity.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.Infinity.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(11));
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[1], 1, 0),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9), Materials.TranscendentMetal.getDust(8)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9), Materials.TranscendentMetal.getDust(8) },
null,
800,
BW_Util.getMachineVoltageFromTier(12));
@@ -542,7 +450,7 @@ public class RecipeLoader {
for (int i = 6; i < 11; i++) {
GT_Values.RA.addPulveriserRecipe(
new ItemStack(ItemRegistry.bw_glasses[0], 1, i),
- new ItemStack[] {Materials.BorosilicateGlass.getDust(9)},
+ new ItemStack[] { Materials.BorosilicateGlass.getDust(9) },
null,
400,
BW_Util.getMachineVoltageFromTier(1));
@@ -558,84 +466,59 @@ public class RecipeLoader {
}
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.WINDMETER), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "SWF",
- "Sf ",
- "Ss ",
- 'S',
- "stickWood",
- 'W',
- new ItemStack(Blocks.wool, 1, Short.MAX_VALUE),
- 'F',
- new ItemStack(Items.string),
- });
+ new ItemStack(ItemRegistry.WINDMETER),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "SWF", "Sf ", "Ss ", 'S', "stickWood", 'W',
+ new ItemStack(Blocks.wool, 1, Short.MAX_VALUE), 'F', new ItemStack(Items.string), });
Materials[] cables = { // Cable material used in the acid gen, diode and energy distributor below
- Materials.Lead, // ULV
- Materials.Tin, // LV
- Materials.AnnealedCopper, // MV
- Materials.Gold, // HV
- Materials.Aluminium, // EV
- Materials.Tungsten, // IV
- Materials.VanadiumGallium, // LuV
- Materials.Naquadah, // ZPM
- Materials.NaquadahAlloy, // UV
- Materials.SuperconductorUV // UHV
+ Materials.Lead, // ULV
+ Materials.Tin, // LV
+ Materials.AnnealedCopper, // MV
+ Materials.Gold, // HV
+ Materials.Aluminium, // EV
+ Materials.Tungsten, // IV
+ Materials.VanadiumGallium, // LuV
+ Materials.Naquadah, // ZPM
+ Materials.NaquadahAlloy, // UV
+ Materials.SuperconductorUV // UHV
};
ISubTagContainer[] hulls = { // Plate material used in the acid gen, diode and energy distributor below
- Materials.WroughtIron, // ULV
- Materials.Steel, // LV
- Materials.Aluminium, // MV
- Materials.StainlessSteel, // HV
- Materials.Titanium, // EV
- Materials.TungstenSteel, // IV
- WerkstoffLoader.LuVTierMaterial, // LuV
- Materials.Iridium, // ZPM
- Materials.Osmium, // UV
- Materials.Naquadah // UHV
+ Materials.WroughtIron, // ULV
+ Materials.Steel, // LV
+ Materials.Aluminium, // MV
+ Materials.StainlessSteel, // HV
+ Materials.Titanium, // EV
+ Materials.TungstenSteel, // IV
+ WerkstoffLoader.LuVTierMaterial, // LuV
+ Materials.Iridium, // ZPM
+ Materials.Osmium, // UV
+ Materials.Naquadah // UHV
};
- ItemStack[] bats = {
- ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_Hull_HV.get(1L)
- };
- ItemStack[] chreac = {
- ItemList.Machine_MV_ChemicalReactor.get(1L),
- ItemList.Machine_HV_ChemicalReactor.get(1L),
- ItemList.Machine_EV_ChemicalReactor.get(1L)
- };
+ ItemStack[] bats = { ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_Hull_MV.get(1L),
+ ItemList.Battery_Hull_HV.get(1L) };
+ ItemStack[] chreac = { ItemList.Machine_MV_ChemicalReactor.get(1L),
+ ItemList.Machine_HV_ChemicalReactor.get(1L), ItemList.Machine_EV_ChemicalReactor.get(1L) };
for (int i = 0; i < 3; i++) {
Materials cable = cables[i + 2];
ItemStack machinehull = ItemList.MACHINE_HULLS[i + 2].get(1L);
- GT_ModHandler.addCraftingRecipe(ItemRegistry.acidGens[i], RecipeLoader.BITSD, new Object[] {
- "HRH",
- "HCH",
- "HKH",
- 'H',
- bats[i],
- 'K',
- GT_OreDictUnificator.get(OrePrefixes.cableGt01, cable, 1L),
- 'C',
- machinehull,
- 'R',
- chreac[i]
- });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.acidGens[i],
+ RecipeLoader.BITSD,
+ new Object[] { "HRH", "HCH", "HKH", 'H', bats[i], 'K',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt01, cable, 1L), 'C', machinehull, 'R',
+ chreac[i] });
}
- GT_ModHandler.addCraftingRecipe(ItemRegistry.acidGensLV, RecipeLoader.BITSD, new Object[] {
- "HRH",
- "KCK",
- "HKH",
- 'H',
- ItemList.Battery_Hull_LV.get(1L),
- 'K',
- GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L),
- 'C',
- ItemList.Hull_LV.get(1L),
- 'R',
- ItemList.Machine_LV_ChemicalReactor.get(1L),
- });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.acidGensLV,
+ RecipeLoader.BITSD,
+ new Object[] { "HRH", "KCK", "HKH", 'H', ItemList.Battery_Hull_LV.get(1L), 'K',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), 'C',
+ ItemList.Hull_LV.get(1L), 'R', ItemList.Machine_LV_ChemicalReactor.get(1L), });
for (int i = 0; i < 9; i++) {
try {
@@ -646,151 +529,81 @@ public class RecipeLoader {
ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.energyDistributor[i], RecipeLoader.BITSD, new Object[] {
- "PWP",
- "WCW",
- "PWP",
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode12A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode12A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode8A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode8A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode4A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode4A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode2A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode2A[i], RecipeLoader.BITSD, new Object[] {
- "WDW",
- "DCD",
- "PDP",
- 'D',
- ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode16A[i], RecipeLoader.BITSD, new Object[] {
- "WHW",
- "DCD",
- "PDP",
- 'H',
- ItemList.Circuit_Parts_Coil.get(1L),
- 'D',
- ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.diode16A[i], RecipeLoader.BITSD, new Object[] {
- "WHW",
- "DCD",
- "PDP",
- 'H',
- ItemList.Circuit_Parts_Coil.get(1L),
- 'D',
- ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L),
- 'P',
- hull,
- 'C',
- machinehull
- });
+ ItemRegistry.energyDistributor[i],
+ RecipeLoader.BITSD,
+ new Object[] { "PWP", "WCW", "PWP", 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode12A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode12A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode8A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode8A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode4A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode4A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode2A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode2A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WDW", "DCD", "PDP", 'D',
+ ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode16A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WHW", "DCD", "PDP", 'H', ItemList.Circuit_Parts_Coil.get(1L), 'D',
+ ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), 'P', hull, 'C',
+ machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.diode16A[i],
+ RecipeLoader.BITSD,
+ new Object[] { "WHW", "DCD", "PDP", 'H', ItemList.Circuit_Parts_Coil.get(1L), 'D',
+ ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), 'P', hull, 'C',
+ machinehull });
} catch (ArrayIndexOutOfBoundsException e) {
// e.printStackTrace();
@@ -798,43 +611,32 @@ public class RecipeLoader {
}
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 64L),
- GT_Utility.getIntegratedCircuit(17)
- },
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 64L),
+ GT_Utility.getIntegratedCircuit(17) },
Materials.Plastic.getMolten(1152L),
new ItemStack(ItemRegistry.BW_BLOCKS[2], 1, 1),
20,
BW_Util.getMachineVoltageFromTier(3));
GT_ModHandler.addCraftingRecipe(
- /*Loader.isModLoaded("tectech") ? new TT_TileEntity_ManualTrafo(ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 1, "bw.manualtrafo", StatCollector.translateToLocal("tile.manutrafo.name")).getStackForm(1L) :*/ new GT_TileEntity_ManualTrafo(
- ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 1,
- "bw.manualtrafo",
- StatCollector.translateToLocal("tile.manutrafo.name"))
- .getStackForm(1L),
+ /*
+ * Loader.isModLoaded("tectech") ? new TT_TileEntity_ManualTrafo(ConfigHandler.IDOffset +
+ * GT_Values.VN.length * 6 + 1, "bw.manualtrafo",
+ * StatCollector.translateToLocal("tile.manutrafo.name")).getStackForm(1L) :
+ */ new GT_TileEntity_ManualTrafo(
+ ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 1,
+ "bw.manualtrafo",
+ StatCollector.translateToLocal("tile.manutrafo.name")).getStackForm(1L),
RecipeLoader.BITSD,
- new Object[] {
- "SCS",
- "CHC",
- "ZCZ",
- 'S',
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
- 'C',
- new ItemStack(ItemRegistry.BW_BLOCKS[2]),
- 'H',
- ItemList.Hull_HV.get(1L),
- 'Z',
- "circuitAdvanced"
- });
+ new Object[] { "SCS", "CHC", "ZCZ", 'S',
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), 'C',
+ new ItemStack(ItemRegistry.BW_BLOCKS[2]), 'H', ItemList.Hull_HV.get(1L), 'Z',
+ "circuitAdvanced" });
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L),
- Materials.Aluminium.getPlates(1),
- ItemList.Circuit_Board_Plastic.get(1L),
- ItemList.Battery_RE_LV_Lithium.get(1L)
- },
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L),
+ Materials.Aluminium.getPlates(1), ItemList.Circuit_Board_Plastic.get(1L),
+ ItemList.Battery_RE_LV_Lithium.get(1L) },
Materials.SolderingAlloy.getMolten(288L),
new ItemStack(ItemRegistry.CIRCUIT_PROGRAMMER),
600,
@@ -842,304 +644,156 @@ public class RecipeLoader {
GT_ModHandler.addCraftingRecipe(
new GT_TileEntity_Windmill(
- ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 2,
- "bw.windmill",
- StatCollector.translateToLocal("tile.bw.windmill.name"))
- .getStackForm(1L),
+ ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 2,
+ "bw.windmill",
+ StatCollector.translateToLocal("tile.bw.windmill.name")).getStackForm(1L),
RecipeLoader.BITSD,
- new Object[] {
- "BHB",
- "WGW",
- "BWB",
- 'B',
- new ItemStack(Blocks.brick_block),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- 'H',
- new ItemStack(Blocks.hopper),
- 'G',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
- });
+ new Object[] { "BHB", "WGW", "BWB", 'B', new ItemStack(Blocks.brick_block), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), 'H',
+ new ItemStack(Blocks.hopper), 'G', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2), });
- String[] stones = {"stone", "stoneSmooth"};
- String[] granites = {"blockGranite", "stoneGranite", "Granite", "granite"};
+ String[] stones = { "stone", "stoneSmooth" };
+ String[] granites = { "blockGranite", "stoneGranite", "Granite", "granite" };
for (String granite : granites) {
for (String stone : stones) {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "SSS",
- "DfD",
- " h ",
- 'S',
- stone,
- 'D',
- new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE),
- });
+ new Object[] { "SSS", "DfD", " h ", 'S', stone, 'D',
+ new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE), });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "hDf",
- "SSS",
- 'S',
- stone,
- 'D',
- new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE),
- });
+ new Object[] { "hDf", "SSS", 'S', stone, 'D',
+ new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE), });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "SSS", "DfD", " h ", 'S', stone, 'D', granite,
- });
+ new Object[] { "SSS", "DfD", " h ", 'S', stone, 'D', granite, });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "hDf", "SSS", 'S', stone, 'D', granite,
- });
+ new Object[] { "hDf", "SSS", 'S', stone, 'D', granite, });
}
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "STS",
- "h f",
- "SBS",
- 'S',
- granite,
- 'T',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
- 'B',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
- });
+ new Object[] { "STS", "h f", "SBS", 'S', granite, 'T',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0), 'B',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1), });
}
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "STS",
- "h f",
- "SBS",
- 'S',
- new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE),
- 'T',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
- 'B',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
- });
+ new Object[] { "STS", "h f", "SBS", 'S',
+ new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE), 'T',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0), 'B',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1), });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WLs", "WLh", "WLf", 'L', new ItemStack(Items.leather), 'W', "logWood",
- });
+ new Object[] { "WLs", "WLh", "WLf", 'L', new ItemStack(Items.leather), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WLs", "WLh", "WLf", 'L', new ItemStack(Blocks.carpet), 'W', "logWood",
- });
+ new Object[] { "WLs", "WLh", "WLf", 'L', new ItemStack(Blocks.carpet), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WLs", "WLh", "WLf", 'L', new ItemStack(Items.paper), 'W', "logWood",
- });
+ new Object[] { "WLs", "WLh", "WLf", 'L', new ItemStack(Items.paper), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WEs",
- "WZh",
- "WDf",
- 'E',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'Z',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'D',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- "logWood",
- });
+ new Object[] { "WEs", "WZh", "WDf", 'E', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'Z',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'D',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WEs",
- "WZh",
- "WDf",
- 'Z',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'E',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'D',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- "logWood",
- });
+ new Object[] { "WEs", "WZh", "WDf", 'Z', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'E',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'D',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WEs",
- "WZh",
- "WDf",
- 'D',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'Z',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'E',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- "logWood",
- });
+ new Object[] { "WEs", "WZh", "WDf", 'D', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'Z',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'E',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WEs",
- "WZh",
- "WDf",
- 'E',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'D',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'Z',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- "logWood",
- });
+ new Object[] { "WEs", "WZh", "WDf", 'E', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'D',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'Z',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {
- "WEs",
- "WZh",
- "WDf",
- 'Z',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'D',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'E',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- "logWood",
- });
+ new Object[] { "WEs", "WZh", "WDf", 'Z', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'D',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'E',
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W', "logWood", });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.LEATHER_ROTOR), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "hPf",
- "PWP",
- "sPr",
- 'P',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- });
+ new ItemStack(ItemRegistry.LEATHER_ROTOR),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "hPf", "PWP", "sPr", 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.WOOL_ROTOR), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "hPf",
- "PWP",
- "sPr",
- 'P',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- });
+ new ItemStack(ItemRegistry.WOOL_ROTOR),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "hPf", "PWP", "sPr", 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.PAPER_ROTOR), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "hPf",
- "PWP",
- "sPr",
- 'P',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- });
+ new ItemStack(ItemRegistry.PAPER_ROTOR),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "hPf", "PWP", "sPr", 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.COMBINED_ROTOR),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[] { "hPf", "PWP", "sPr", 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), });
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.COMBINED_ROTOR), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] {
- "hPf",
- "PWP",
- "sPr",
- 'P',
- new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
- 'W',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- });
- GT_ModHandler.addCraftingRecipe(new ItemStack(ItemRegistry.ROTORBLOCK), RecipeLoader.BITSD, new Object[] {
- "WRW",
- "RGR",
- "WRW",
- 'R',
- GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 1L),
- 'W',
- "plankWood",
- 'G',
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
- });
+ new ItemStack(ItemRegistry.ROTORBLOCK),
+ RecipeLoader.BITSD,
+ new Object[] { "WRW", "RGR", "WRW", 'R',
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 1L), 'W', "plankWood", 'G',
+ GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L), });
GT_TileEntity_THTR.THTRMaterials.registerTHR_Recipes();
- GT_ModHandler.addCraftingRecipe(ItemRegistry.THTR, RecipeLoader.BITSD, new Object[] {
- "BZB",
- "BRB",
- "BZB",
- 'B',
- new ItemStack(GregTech_API.sBlockCasings3, 1, 12),
- 'R',
- GT_ModHandler.getModItem("IC2", "blockGenerator", 1, 5),
- 'Z',
- "circuitUltimate"
- });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.THTR,
+ RecipeLoader.BITSD,
+ new Object[] { "BZB", "BRB", "BZB", 'B', new ItemStack(GregTech_API.sBlockCasings3, 1, 12), 'R',
+ GT_ModHandler.getModItem("IC2", "blockGenerator", 1, 5), 'Z', "circuitUltimate" });
GT_TileEntity_HTGR.HTGRMaterials.registerTHR_Recipes();
- GT_ModHandler.addCraftingRecipe(ItemRegistry.HTGR, RecipeLoader.BITSD, new Object[] {
- "BZB",
- "BRB",
- "BZB",
- 'B',
- new ItemStack(GregTech_API.sBlockCasings8, 1, 5),
- 'R',
- GT_ModHandler.getModItem("IC2", "blockGenerator", 1, 5),
- 'Z',
- "circuitSuperconductor"
- });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.HTGR,
+ RecipeLoader.BITSD,
+ new Object[] { "BZB", "BRB", "BZB", 'B', new ItemStack(GregTech_API.sBlockCasings8, 1, 5), 'R',
+ GT_ModHandler.getModItem("IC2", "blockGenerator", 1, 5), 'Z', "circuitSuperconductor" });
- GT_ModHandler.addCraftingRecipe(ItemRegistry.EIG, RecipeLoader.BITSD, new Object[] {
- "AZA",
- "BRB",
- "AZA",
- 'B',
- new ItemStack(GregTech_API.sBlockCasings4, 1, 1),
- 'R',
- GT_ModHandler.getModItem("EnderIO", "blockFarmStation", 1),
- 'A',
- new ItemStack(GregTech_API.sBlockMachines, 1, 11104),
- 'Z',
- "circuitUltimate"
- });
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.EIG,
+ RecipeLoader.BITSD,
+ new Object[] { "AZA", "BRB", "AZA", 'B', new ItemStack(GregTech_API.sBlockCasings4, 1, 1), 'R',
+ GT_ModHandler.getModItem("EnderIO", "blockFarmStation", 1), 'A',
+ new ItemStack(GregTech_API.sBlockMachines, 1, 11104), 'Z', "circuitUltimate" });
if (LoaderReference.galacticgreg) {
GT_Values.RA.addAssemblylineRecipe(
ItemList.OreDrill4.get(1L),
BW_Util.getMachineVoltageFromTier(6),
- new Object[] {
- ItemList.OreDrill4.get(1L),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Europium, 9L),
- Materials.Europium.getPlates(3),
- ItemList.Electric_Motor_LuV.get(9L),
- ItemList.Sensor_LuV.get(9L),
- ItemList.Field_Generator_LuV.get(9L),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Europium, 36L)
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Neon.getFluidOrGas(20000),
- },
+ new Object[] { ItemList.OreDrill4.get(1L),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Europium, 9L),
+ Materials.Europium.getPlates(3), ItemList.Electric_Motor_LuV.get(9L),
+ ItemList.Sensor_LuV.get(9L), ItemList.Field_Generator_LuV.get(9L),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Europium, 36L) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440),
+ WerkstoffLoader.Neon.getFluidOrGas(20000), },
ItemRegistry.voidminer[0].copy(),
108000,
BW_Util.getMachineVoltageFromTier(6));
@@ -1150,18 +804,13 @@ public class RecipeLoader {
GT_Values.RA.addAssemblylineRecipe(
ItemRegistry.voidminer[0].copy(),
BW_Util.getMachineVoltageFromTier(7),
- new Object[] {
- ItemRegistry.voidminer[0].copy(),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 9L),
- Materials.BlackPlutonium.getPlates(3),
- ItemList.Electric_Motor_ZPM.get(9L),
- ItemList.Sensor_ZPM.get(9L),
- ItemList.Field_Generator_ZPM.get(9L),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.BlackPlutonium, 36L)
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Krypton.getFluidOrGas(20000)
- },
+ new Object[] { ItemRegistry.voidminer[0].copy(),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 9L),
+ Materials.BlackPlutonium.getPlates(3), ItemList.Electric_Motor_ZPM.get(9L),
+ ItemList.Sensor_ZPM.get(9L), ItemList.Field_Generator_ZPM.get(9L),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.BlackPlutonium, 36L) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440),
+ WerkstoffLoader.Krypton.getFluidOrGas(20000) },
ItemRegistry.voidminer[1].copy(),
216000,
BW_Util.getMachineVoltageFromTier(7));
@@ -1169,18 +818,13 @@ public class RecipeLoader {
GT_Values.RA.addAssemblylineRecipe(
ItemRegistry.voidminer[1].copy(),
BW_Util.getMachineVoltageFromTier(8),
- new Object[] {
- ItemRegistry.voidminer[1].copy(),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 9L),
- Materials.Neutronium.getPlates(3),
- ItemList.Electric_Motor_UV.get(9L),
- ItemList.Sensor_UV.get(9L),
- ItemList.Field_Generator_UV.get(9L),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 36L)
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Oganesson.getFluidOrGas(20000)
- },
+ new Object[] { ItemRegistry.voidminer[1].copy(),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 9L),
+ Materials.Neutronium.getPlates(3), ItemList.Electric_Motor_UV.get(9L),
+ ItemList.Sensor_UV.get(9L), ItemList.Field_Generator_UV.get(9L),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 36L) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440),
+ WerkstoffLoader.Oganesson.getFluidOrGas(20000) },
ItemRegistry.voidminer[2].copy(),
432000,
BW_Util.getMachineVoltageFromTier(8));
@@ -1188,19 +832,14 @@ public class RecipeLoader {
GT_Values.RA.addAssemblylineRecipe(
ItemList.Machine_Multi_ImplosionCompressor.get(1L),
24000,
- new ItemStack[] {
- ItemList.Machine_Multi_ImplosionCompressor.get(1L),
- Materials.Neutronium.getBlocks(5),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmium, 64),
- GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Osmium, 64),
- GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 64),
- ItemList.Electric_Piston_UV.get(64),
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440),
- Materials.Osmium.getMolten(1440),
- Materials.Neutronium.getMolten(1440)
- },
+ new ItemStack[] { ItemList.Machine_Multi_ImplosionCompressor.get(1L),
+ Materials.Neutronium.getBlocks(5),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmium, 64),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Osmium, 64),
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 64),
+ ItemList.Electric_Piston_UV.get(64), },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440), Materials.Osmium.getMolten(1440),
+ Materials.Neutronium.getMolten(1440) },
ItemRegistry.eic.copy(),
240000,
BW_Util.getMachineVoltageFromTier(8));
@@ -1209,28 +848,24 @@ public class RecipeLoader {
ItemStack[][] input = ItemRegistry.TecTechLaserAdditions[1];
ItemStack[][] dynamo = ItemRegistry.TecTechLaserAdditions[2];
- ItemList[] emitters = {
- ItemList.Emitter_EV, ItemList.Emitter_IV, ItemList.Emitter_LuV, ItemList.Emitter_ZPM
- };
+ ItemList[] emitters = { ItemList.Emitter_EV, ItemList.Emitter_IV, ItemList.Emitter_LuV,
+ ItemList.Emitter_ZPM };
- ItemList[] sensors = {ItemList.Sensor_EV, ItemList.Sensor_IV, ItemList.Sensor_LuV, ItemList.Sensor_ZPM};
+ ItemList[] sensors = { ItemList.Sensor_EV, ItemList.Sensor_IV, ItemList.Sensor_LuV,
+ ItemList.Sensor_ZPM };
- OrePrefixes[] prefixes = {
- WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt04 : OrePrefixes.wireGt04,
- WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt08 : OrePrefixes.wireGt08,
- WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt12 : OrePrefixes.wireGt12,
- WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt16 : OrePrefixes.cableGt12
- };
+ OrePrefixes[] prefixes = { WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt04 : OrePrefixes.wireGt04,
+ WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt08 : OrePrefixes.wireGt08,
+ WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt12 : OrePrefixes.wireGt12,
+ WerkstoffLoader.gtnhGT ? OrePrefixes.cableGt16 : OrePrefixes.cableGt12 };
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- ItemList.Circuit_Parts_GlassFiber.get(32),
- GT_OreDictUnificator.get(
- WerkstoffLoader.gtnhGT ? OrePrefixes.foil : OrePrefixes.plateDouble,
- Materials.Electrum,
- WerkstoffLoader.gtnhGT ? 8 : 1),
- WerkstoffLoader.CubicZirconia.get(OrePrefixes.gemExquisite, 2)
- },
+ new ItemStack[] { ItemList.Circuit_Parts_GlassFiber.get(32),
+ GT_OreDictUnificator.get(
+ WerkstoffLoader.gtnhGT ? OrePrefixes.foil : OrePrefixes.plateDouble,
+ Materials.Electrum,
+ WerkstoffLoader.gtnhGT ? 8 : 1),
+ WerkstoffLoader.CubicZirconia.get(OrePrefixes.gemExquisite, 2) },
Materials.Polytetrafluoroethylene.getMolten(72),
new ItemStack(
ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
@@ -1248,46 +883,41 @@ public class RecipeLoader {
int solderingAmount = Math.max(144 * i, 72) * (j + 1);
GT_Values.RA.addAssemblerRecipe(
new ItemStack[] {
- new ItemStack(
- ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
- ((j + 1) * 16),
- ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
- WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
- GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
- emitters[i].get(2 * (j + 1)),
- sensors[i].get(2 * (j + 1)),
- ItemList.TRANSFORMERS[4 + i].get(2 * (j + 1)),
- },
+ new ItemStack(
+ ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
+ ((j + 1) * 16),
+ ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
+ WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
+ GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
+ emitters[i].get(2 * (j + 1)), sensors[i].get(2 * (j + 1)),
+ ItemList.TRANSFORMERS[4 + i].get(2 * (j + 1)), },
Materials.SolderingAlloy.getMolten(solderingAmount),
converter,
200 * (j + 1),
BW_Util.getMachineVoltageFromTier(4 + i));
GT_Values.RA.addAssemblerRecipe(
new ItemStack[] {
- new ItemStack(
- ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
- ((j + 1) * 16),
- ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
- WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
- GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
- sensors[i].get(2 * (j + 1)),
- ItemList.HATCHES_ENERGY[4 + i].get(2 * (j + 1)),
- },
+ new ItemStack(
+ ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
+ ((j + 1) * 16),
+ ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
+ WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
+ GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
+ sensors[i].get(2 * (j + 1)), ItemList.HATCHES_ENERGY[4 + i].get(2 * (j + 1)), },
Materials.SolderingAlloy.getMolten(solderingAmount),
eInput,
200 * (j + 1),
BW_Util.getMachineVoltageFromTier(4 + i));
GT_Values.RA.addAssemblerRecipe(
new ItemStack[] {
- new ItemStack(
- ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
- ((j + 1) * 16),
- ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
- WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
- GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
- emitters[i].get(2 * (j + 1)),
- ItemList.HATCHES_DYNAMO[4 + i].get(2 * (j + 1)),
- },
+ new ItemStack(
+ ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
+ ((j + 1) * 16),
+ ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()),
+ WerkstoffLoader.CubicZirconia.get(OrePrefixes.lens),
+ GT_OreDictUnificator.get(prefixes[j], cables[i + 4], 8),
+ emitters[i].get(2 * (j + 1)),
+ ItemList.HATCHES_DYNAMO[4 + i].get(2 * (j + 1)), },
Materials.SolderingAlloy.getMolten(solderingAmount),
eDynamo,
200 * (j + 1),
@@ -1296,46 +926,39 @@ public class RecipeLoader {
}
}
- GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {
- ItemList.Hatch_Input_HV.get(64),
- Materials.LiquidAir.getCells(1),
- GT_Utility.getIntegratedCircuit(17)
- },
- new ItemStack[] {ItemRegistry.compressedHatch.copy()},
- null,
- null,
- null,
- null,
- 300,
- BW_Util.getMachineVoltageFromTier(3),
- 0));
- GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {ItemList.Hatch_Output_HV.get(64), GT_Utility.getIntegratedCircuit(17)},
- new ItemStack[] {ItemRegistry.giantOutputHatch.copy()},
- null,
- null,
- null,
- null,
- 300,
- BW_Util.getMachineVoltageFromTier(3),
- 0));
+ GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { ItemList.Hatch_Input_HV.get(64), Materials.LiquidAir.getCells(1),
+ GT_Utility.getIntegratedCircuit(17) },
+ new ItemStack[] { ItemRegistry.compressedHatch.copy() },
+ null,
+ null,
+ null,
+ null,
+ 300,
+ BW_Util.getMachineVoltageFromTier(3),
+ 0));
+ GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { ItemList.Hatch_Output_HV.get(64), GT_Utility.getIntegratedCircuit(17) },
+ new ItemStack[] { ItemRegistry.giantOutputHatch.copy() },
+ null,
+ null,
+ null,
+ null,
+ 300,
+ BW_Util.getMachineVoltageFromTier(3),
+ 0));
GT_Values.RA.addAssemblylineRecipe(
ItemList.Machine_LuV_CircuitAssembler.get(1L),
24000,
- new ItemStack[] {
- ItemList.Machine_LuV_CircuitAssembler.get(1L),
- ItemList.Robot_Arm_LuV.get(4L),
- ItemList.Electric_Motor_LuV.get(4L),
- ItemList.Field_Generator_LuV.get(1L),
- ItemList.Emitter_LuV.get(1L),
- ItemList.Sensor_LuV.get(1L),
- Materials.Chrome.getPlates(8)
- },
- new FluidStack[] {new FluidStack(solderIndalloy, 1440)},
+ new ItemStack[] { ItemList.Machine_LuV_CircuitAssembler.get(1L), ItemList.Robot_Arm_LuV.get(4L),
+ ItemList.Electric_Motor_LuV.get(4L), ItemList.Field_Generator_LuV.get(1L),
+ ItemList.Emitter_LuV.get(1L), ItemList.Sensor_LuV.get(1L), Materials.Chrome.getPlates(8) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440) },
ItemRegistry.cal.copy(),
24000,
BW_Util.getMachineVoltageFromTier(6));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java
index 26f268f0ef..3f150f46f5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
index 146cf36eac..8ffe956261 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
@@ -1,23 +1,14 @@
/*
- * 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.common.loaders;
@@ -26,6 +17,19 @@ import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_T
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.*;
import static gregtech.api.enums.GT_Values.VN;
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+import org.apache.commons.lang3.StringUtils;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
@@ -37,6 +41,7 @@ import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import com.google.common.collect.ArrayListMultimap;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import gnu.trove.map.hash.TObjectDoubleHashMap;
@@ -48,24 +53,15 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
-import java.lang.reflect.Field;
-import java.util.*;
-import java.util.stream.Collectors;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
-import org.apache.commons.lang3.StringUtils;
public class StaticRecipeChangeLoaders {
private static TObjectDoubleHashMap<Materials> gtEbfGasRecipeTimeMultipliers = null;
private static TObjectDoubleHashMap<Materials> gtEbfGasRecipeConsumptionMultipliers = null;
- public static final List<ItemStack> whitelistForEBFNoGasRecipeDontCheckItemData = Arrays.asList(
- GT_ModHandler.getModItem("TConstruct", "materials", 1L, 12) // Raw Aluminum -> Aluminium Ingot (coremod)
+ public static final List<ItemStack> whitelistForEBFNoGasRecipeDontCheckItemData = Arrays
+ .asList(GT_ModHandler.getModItem("TConstruct", "materials", 1L, 12) // Raw Aluminum -> Aluminium Ingot
+ // (coremod)
);
private StaticRecipeChangeLoaders() {}
@@ -79,8 +75,8 @@ public class StaticRecipeChangeLoaders {
}
if (gtEbfGasRecipeConsumptionMultipliers == null) {
// For Werkstoff gases, use Werkstoff.Stats.setEbfGasRecipeConsumedAmountMultiplier
- gtEbfGasRecipeConsumptionMultipliers =
- new TObjectDoubleHashMap<>(10, 0.5F, 1.0D); // keep default value as 1
+ gtEbfGasRecipeConsumptionMultipliers = new TObjectDoubleHashMap<>(10, 0.5F, 1.0D); // keep default value as
+ // 1
// Example to make Argon recipes use half the gas amount of the primary recipe (1000L->500L, 2000L->1000L
// etc.):
// gtEbfGasRecipeConsumptionMultipliers.put(Materials.Argon, 1.0D / 2.0D);
@@ -90,17 +86,15 @@ public class StaticRecipeChangeLoaders {
}
public static void fixEnergyRequirements() {
- GT_Recipe.GT_Recipe_Map.sMappings.stream()
- .filter(StreamUtils::filterVisualMaps)
- .forEach(gt_recipe_map -> gt_recipe_map.mRecipeList.parallelStream()
- .forEach(gt_recipe -> {
- for (int i = 0; i < (VN.length - 1); i++) {
- if (gt_recipe.mEUt > BW_Util.getMachineVoltageFromTier(i)
- && gt_recipe.mEUt <= BW_Util.getTierVoltage(i)) {
- gt_recipe.mEUt = BW_Util.getMachineVoltageFromTier(i);
- }
- }
- }));
+ GT_Recipe.GT_Recipe_Map.sMappings.stream().filter(StreamUtils::filterVisualMaps)
+ .forEach(gt_recipe_map -> gt_recipe_map.mRecipeList.parallelStream().forEach(gt_recipe -> {
+ for (int i = 0; i < (VN.length - 1); i++) {
+ if (gt_recipe.mEUt > BW_Util.getMachineVoltageFromTier(i)
+ && gt_recipe.mEUt <= BW_Util.getTierVoltage(i)) {
+ gt_recipe.mEUt = BW_Util.getMachineVoltageFromTier(i);
+ }
+ }
+ }));
}
private static void replaceWrongFluidOutput(Werkstoff werkstoff, GT_Recipe recipe, FluidStack wrongNamedFluid) {
@@ -111,32 +105,32 @@ public class StaticRecipeChangeLoaders {
}
}
- private static void replaceWrongFluidInput(
- Werkstoff werkstoff, GT_Recipe.GT_Recipe_Map map, GT_Recipe recipe, FluidStack wrongNamedFluid) {
+ private static void replaceWrongFluidInput(Werkstoff werkstoff, GT_Recipe.GT_Recipe_Map map, GT_Recipe recipe,
+ FluidStack wrongNamedFluid) {
for (int i = 0; i < recipe.mFluidInputs.length; i++) {
if (GT_Utility.areFluidsEqual(recipe.mFluidInputs[i], wrongNamedFluid)) {
Collection<GT_Recipe> col = map.mRecipeFluidMap.get(wrongNamedFluid.getFluid());
map.mRecipeFluidMap.remove(wrongNamedFluid.getFluid());
map.mRecipeFluidMap.put(werkstoff.getFluidOrGas(1).getFluid(), col);
recipe.mFluidInputs[i] = werkstoff.getFluidOrGas(recipe.mFluidInputs[i].amount);
- map.mRecipeFluidNameMap.add(
- werkstoff.getFluidOrGas(1).getFluid().getName());
+ map.mRecipeFluidNameMap.add(werkstoff.getFluidOrGas(1).getFluid().getName());
}
}
}
private static void addConversionRecipe(Werkstoff werkstoff, FluidStack wrongNamedFluid) {
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- null,
- null,
- null,
- null,
- new FluidStack[] {wrongNamedFluid},
- new FluidStack[] {werkstoff.getFluidOrGas(1)},
- 1,
- 1,
- 0));
+ GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ null,
+ null,
+ null,
+ null,
+ new FluidStack[] { wrongNamedFluid },
+ new FluidStack[] { werkstoff.getFluidOrGas(1) },
+ 1,
+ 1,
+ 0));
}
private static FluidStack getWrongNameFluid(Werkstoff werkstoff) {
@@ -167,57 +161,55 @@ public class StaticRecipeChangeLoaders {
oreDictNames.add(werkstoff.getVarName());
StaticRecipeChangeLoaders.runMoltenUnificationEnfocement(werkstoff);
StaticRecipeChangeLoaders.runUnficationDeleter(werkstoff);
- for (String s : oreDictNames)
- for (OrePrefixes prefixes : OrePrefixes.values()) {
- if (!werkstoff.hasItemType(prefixes)) continue;
- String fullOreName = prefixes + s;
- List<ItemStack> ores = OreDictionary.getOres(fullOreName, false);
- if (ores.size() <= 1) // empty or one entry, i.e. no unification needed
+ for (String s : oreDictNames) for (OrePrefixes prefixes : OrePrefixes.values()) {
+ if (!werkstoff.hasItemType(prefixes)) continue;
+ String fullOreName = prefixes + s;
+ List<ItemStack> ores = OreDictionary.getOres(fullOreName, false);
+ if (ores.size() <= 1) // empty or one entry, i.e. no unification needed
continue;
- for (ItemStack toReplace : ores) {
- ItemStack replacement = werkstoff.get(prefixes);
- if (toReplace == null
- || GT_Utility.areStacksEqual(toReplace, replacement)
- || replacement == null
- || replacement.getItem() == null) continue;
- for (GT_Recipe.GT_Recipe_Map map : GT_Recipe.GT_Recipe_Map.sMappings) {
- nextRecipe:
- for (Iterator<GT_Recipe> iterator = map.mRecipeList.iterator(); iterator.hasNext(); ) {
- GT_Recipe recipe = iterator.next();
- boolean removal = map.equals(GT_Recipe_Map.sFluidExtractionRecipes)
- || map.equals(GT_Recipe_Map.sFluidSolidficationRecipes);
- for (int i = 0; i < recipe.mInputs.length; i++) {
- if (!GT_Utility.areStacksEqual(recipe.mInputs[i], toReplace)) continue;
- if (removal) {
- iterator.remove();
- continue nextRecipe;
- }
- recipe.mInputs[i] =
- GT_Utility.copyAmount(recipe.mInputs[i].stackSize, replacement);
+ for (ItemStack toReplace : ores) {
+ ItemStack replacement = werkstoff.get(prefixes);
+ if (toReplace == null || GT_Utility.areStacksEqual(toReplace, replacement)
+ || replacement == null
+ || replacement.getItem() == null)
+ continue;
+ for (GT_Recipe.GT_Recipe_Map map : GT_Recipe.GT_Recipe_Map.sMappings) {
+ nextRecipe: for (Iterator<GT_Recipe> iterator = map.mRecipeList.iterator(); iterator
+ .hasNext();) {
+ GT_Recipe recipe = iterator.next();
+ boolean removal = map.equals(GT_Recipe_Map.sFluidExtractionRecipes)
+ || map.equals(GT_Recipe_Map.sFluidSolidficationRecipes);
+ for (int i = 0; i < recipe.mInputs.length; i++) {
+ if (!GT_Utility.areStacksEqual(recipe.mInputs[i], toReplace)) continue;
+ if (removal) {
+ iterator.remove();
+ continue nextRecipe;
}
- for (int i = 0; i < recipe.mOutputs.length; i++) {
- if (!GT_Utility.areStacksEqual(recipe.mOutputs[i], toReplace)) continue;
- if (removal) {
- iterator.remove();
- continue nextRecipe;
- }
- recipe.mOutputs[i] =
- GT_Utility.copyAmount(recipe.mOutputs[i].stackSize, replacement);
+ recipe.mInputs[i] = GT_Utility.copyAmount(recipe.mInputs[i].stackSize, replacement);
+ }
+ for (int i = 0; i < recipe.mOutputs.length; i++) {
+ if (!GT_Utility.areStacksEqual(recipe.mOutputs[i], toReplace)) continue;
+ if (removal) {
+ iterator.remove();
+ continue nextRecipe;
}
- if (recipe.mSpecialItems instanceof ItemStack) {
- ItemStack specialItemStack = (ItemStack) recipe.mSpecialItems;
- if (!GT_Utility.areStacksEqual(specialItemStack, toReplace)) continue;
- if (removal) {
- iterator.remove();
- continue nextRecipe;
- }
- recipe.mSpecialItems =
- GT_Utility.copyAmount((specialItemStack).stackSize, replacement);
+ recipe.mOutputs[i] = GT_Utility
+ .copyAmount(recipe.mOutputs[i].stackSize, replacement);
+ }
+ if (recipe.mSpecialItems instanceof ItemStack) {
+ ItemStack specialItemStack = (ItemStack) recipe.mSpecialItems;
+ if (!GT_Utility.areStacksEqual(specialItemStack, toReplace)) continue;
+ if (removal) {
+ iterator.remove();
+ continue nextRecipe;
}
+ recipe.mSpecialItems = GT_Utility
+ .copyAmount((specialItemStack).stackSize, replacement);
}
}
}
}
+ }
}
}
}
@@ -232,12 +224,12 @@ public class StaticRecipeChangeLoaders {
Materials.Empty.getCells(1));
Field f = GT_Utility.class.getDeclaredField("sFilledContainerToData");
f.setAccessible(true);
- Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData> sFilledContainerToData =
- (Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData>) f.get(null);
+ Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData> sFilledContainerToData = (Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData>) f
+ .get(null);
HashSet torem = new HashSet<>();
ItemStack toReplace = null;
- for (Map.Entry<GT_ItemStack, FluidContainerRegistry.FluidContainerData> entry :
- sFilledContainerToData.entrySet()) {
+ for (Map.Entry<GT_ItemStack, FluidContainerRegistry.FluidContainerData> entry : sFilledContainerToData
+ .entrySet()) {
final String MODID = GameRegistry.findUniqueIdentifierFor(data.filledContainer.getItem()).modId;
if (MODID.equals(MainMod.MOD_ID) || MODID.equals(BartWorksCrossmod.MOD_ID)) continue;
if (entry.getValue().fluid.equals(data.fluid)
@@ -273,7 +265,7 @@ public class StaticRecipeChangeLoaders {
if (recipe.mSpecialItems instanceof ItemStack) {
if (GT_Utility.areStacksEqual((ItemStack) recipe.mSpecialItems, toReplace)) {
torem.add(recipe);
- // recipe.mSpecialItems = data.filledContainer;
+ // recipe.mSpecialItems = data.filledContainer;
}
}
}
@@ -296,14 +288,13 @@ public class StaticRecipeChangeLoaders {
}
}
- for (OrePrefixes prefixes : OrePrefixes.values())
- if (werkstoff.hasItemType(prefixes)) {
- GT_OreDictUnificator.set(prefixes, werkstoff.getBridgeMaterial(), werkstoff.get(prefixes), true, true);
- for (ItemStack stack : OreDictionary.getOres(prefixes + werkstoff.getVarName())) {
- GT_OreDictUnificator.addAssociation(prefixes, werkstoff.getBridgeMaterial(), stack, false);
- GT_OreDictUnificator.getAssociation(stack).mUnificationTarget = werkstoff.get(prefixes);
- }
+ for (OrePrefixes prefixes : OrePrefixes.values()) if (werkstoff.hasItemType(prefixes)) {
+ GT_OreDictUnificator.set(prefixes, werkstoff.getBridgeMaterial(), werkstoff.get(prefixes), true, true);
+ for (ItemStack stack : OreDictionary.getOres(prefixes + werkstoff.getVarName())) {
+ GT_OreDictUnificator.addAssociation(prefixes, werkstoff.getBridgeMaterial(), stack, false);
+ GT_OreDictUnificator.getAssociation(stack).mUnificationTarget = werkstoff.get(prefixes);
}
+ }
}
private static void runMaterialLinker(Werkstoff werkstoff) {
@@ -326,6 +317,7 @@ public class StaticRecipeChangeLoaders {
/**
* Constructs a list of recipes to change by scanning all EBF recipes for uses of noble gases.
+ *
* @param GasTags list of gas tags to look out for in EBF recipes
* @return A multimap from the gas tag (noble and/or anaerobic) to all the recipes containing a gas with that tag
*/
@@ -337,8 +329,9 @@ public class StaticRecipeChangeLoaders {
if (mat != Materials._NULL) {
for (SubTag tag : GasTags) {
if (mat.contains(tag)) {
- DebugLog.log("Found EBF Recipe to change, Output:"
- + BW_Util.translateGTItemStack(recipe.mOutputs[0]));
+ DebugLog.log(
+ "Found EBF Recipe to change, Output:"
+ + BW_Util.translateGTItemStack(recipe.mOutputs[0]));
toAdd.put(tag, recipe);
}
}
@@ -349,8 +342,8 @@ public class StaticRecipeChangeLoaders {
}
/**
- * Scans EBF recipes for no-gas variants of the recipes present in base.
- * Adds these recipes to the base multimap.
+ * Scans EBF recipes for no-gas variants of the recipes present in base. Adds these recipes to the base multimap.
+ *
* @param base The recipe multimap to scan and modify
* @return Set of item outputs (recipe.mOutputs[0]) of the no-gas recipes
*/
@@ -358,33 +351,27 @@ public class StaticRecipeChangeLoaders {
HashSet<ItemStack> toAdd = new HashSet<>();
ArrayListMultimap<SubTag, GT_Recipe> repToAdd = ArrayListMultimap.create();
for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList) {
- for (SubTag tag : base.keySet())
- recipeLoop:
- for (GT_Recipe baseRe : base.get(tag)) {
- if (recipe.mInputs.length == baseRe.mInputs.length
- && recipe.mOutputs.length == baseRe.mOutputs.length)
- for (int i = 0; i < recipe.mInputs.length; i++) {
- ItemStack tmpInput = recipe.mInputs[i];
- if ((recipe.mFluidInputs == null || recipe.mFluidInputs.length == 0)
- && (whitelistForEBFNoGasRecipeDontCheckItemData.stream()
- .anyMatch(s -> GT_Utility.areStacksEqual(s, tmpInput))
- || (BW_Util.checkStackAndPrefix(recipe.mInputs[i])
- && BW_Util.checkStackAndPrefix(baseRe.mInputs[i])
- && GT_OreDictUnificator.getAssociation(recipe.mInputs[i])
- .mMaterial
- .mMaterial
- .equals(GT_OreDictUnificator.getAssociation(
- baseRe.mInputs[i])
- .mMaterial
- .mMaterial)
- && GT_Utility.areStacksEqual(
- recipe.mOutputs[0], baseRe.mOutputs[0])))) {
- toAdd.add(recipe.mOutputs[0]);
- repToAdd.put(tag, recipe);
- continue recipeLoop;
- }
+ for (SubTag tag : base.keySet()) recipeLoop: for (GT_Recipe baseRe : base.get(tag)) {
+ if (recipe.mInputs.length == baseRe.mInputs.length && recipe.mOutputs.length == baseRe.mOutputs.length)
+ for (int i = 0; i < recipe.mInputs.length; i++) {
+ ItemStack tmpInput = recipe.mInputs[i];
+ if ((recipe.mFluidInputs == null || recipe.mFluidInputs.length == 0)
+ && (whitelistForEBFNoGasRecipeDontCheckItemData.stream()
+ .anyMatch(s -> GT_Utility.areStacksEqual(s, tmpInput))
+ || (BW_Util.checkStackAndPrefix(recipe.mInputs[i])
+ && BW_Util.checkStackAndPrefix(baseRe.mInputs[i])
+ && GT_OreDictUnificator
+ .getAssociation(recipe.mInputs[i]).mMaterial.mMaterial.equals(
+ GT_OreDictUnificator.getAssociation(
+ baseRe.mInputs[i]).mMaterial.mMaterial)
+ && GT_Utility
+ .areStacksEqual(recipe.mOutputs[0], baseRe.mOutputs[0])))) {
+ toAdd.add(recipe.mOutputs[0]);
+ repToAdd.put(tag, recipe);
+ continue recipeLoop;
}
- }
+ }
+ }
}
base.putAll(repToAdd);
return toAdd;
@@ -421,91 +408,101 @@ public class StaticRecipeChangeLoaders {
return transformEBFGasRecipeTime(recipe.mDuration, originalGas.getProtons(), 0);
}
- private static void editEBFMaterialRecipes(
- SubTag GasTag, GT_Recipe recipe, Materials originalGas, HashSet<GT_Recipe> toAdd) {
+ private static void editEBFMaterialRecipes(SubTag GasTag, GT_Recipe recipe, Materials originalGas,
+ HashSet<GT_Recipe> toAdd) {
for (Materials newGas : Materials.values()) {
if (newGas.contains(GasTag)) {
int time = transformEBFGasRecipeTime(recipe, originalGas, newGas);
- int gasAmount = Math.max(1, (int) Math.round(
- (double) recipe.mFluidInputs[0].amount * gtEbfGasRecipeConsumptionMultipliers.get(newGas)));
- if (recipe.mFluidInputs != null
- && recipe.mFluidInputs.length == 1
+ int gasAmount = Math.max(
+ 1,
+ (int) Math.round(
+ (double) recipe.mFluidInputs[0].amount
+ * gtEbfGasRecipeConsumptionMultipliers.get(newGas)));
+ if (recipe.mFluidInputs != null && recipe.mFluidInputs.length == 1
&& recipe.mFluidInputs[0].isFluidEqual(newGas.getGas(0))) {
// preserve original recipe owner
- toAdd.add(new BWRecipes.DynamicGTRecipe(
- false,
- recipe.mInputs,
- recipe.mOutputs,
- recipe.mSpecialItems,
- recipe.mChances,
- new FluidStack[] {newGas.getGas(gasAmount)},
- recipe.mFluidOutputs,
- time,
- recipe.mEUt,
- recipe.mSpecialValue,
- recipe));
+ toAdd.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ recipe.mInputs,
+ recipe.mOutputs,
+ recipe.mSpecialItems,
+ recipe.mChances,
+ new FluidStack[] { newGas.getGas(gasAmount) },
+ recipe.mFluidOutputs,
+ time,
+ recipe.mEUt,
+ recipe.mSpecialValue,
+ recipe));
} else {
// new recipe
- toAdd.add(new BWRecipes.DynamicGTRecipe(
- false,
- recipe.mInputs,
- recipe.mOutputs,
- recipe.mSpecialItems,
- recipe.mChances,
- new FluidStack[] {newGas.getGas(gasAmount)},
- recipe.mFluidOutputs,
- time,
- recipe.mEUt,
- recipe.mSpecialValue));
+ toAdd.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ recipe.mInputs,
+ recipe.mOutputs,
+ recipe.mSpecialItems,
+ recipe.mChances,
+ new FluidStack[] { newGas.getGas(gasAmount) },
+ recipe.mFluidOutputs,
+ time,
+ recipe.mEUt,
+ recipe.mSpecialValue));
}
}
}
}
- private static void editEBFWerkstoffRecipes(
- SubTag GasTag, GT_Recipe recipe, Materials originalGas, HashSet<GT_Recipe> toAdd) {
+ private static void editEBFWerkstoffRecipes(SubTag GasTag, GT_Recipe recipe, Materials originalGas,
+ HashSet<GT_Recipe> toAdd) {
for (Werkstoff newGas : Werkstoff.werkstoffHashMap.values()) {
if (newGas.contains(GasTag)) {
int time = transformEBFGasRecipeTime(recipe, originalGas, newGas);
- int gasAmount = Math.max(1, (int) Math.round((double) recipe.mFluidInputs[0].amount
- * newGas.getStats().getEbfGasRecipeConsumedAmountMultiplier()));
- if (recipe.mFluidInputs != null
- && recipe.mFluidInputs.length == 1
- && recipe.mFluidInputs[0].isFluidEqual(
- new FluidStack(Objects.requireNonNull(fluids.get(newGas)), 0))) {
+ int gasAmount = Math.max(
+ 1,
+ (int) Math.round(
+ (double) recipe.mFluidInputs[0].amount
+ * newGas.getStats().getEbfGasRecipeConsumedAmountMultiplier()));
+ if (recipe.mFluidInputs != null && recipe.mFluidInputs.length == 1
+ && recipe.mFluidInputs[0]
+ .isFluidEqual(new FluidStack(Objects.requireNonNull(fluids.get(newGas)), 0))) {
// preserve original recipe owner
- toAdd.add(new BWRecipes.DynamicGTRecipe(
- false,
- recipe.mInputs,
- recipe.mOutputs,
- recipe.mSpecialItems,
- recipe.mChances,
- new FluidStack[] {new FluidStack(Objects.requireNonNull(fluids.get(newGas)), gasAmount)},
- recipe.mFluidOutputs,
- time,
- recipe.mEUt,
- recipe.mSpecialValue,
- recipe));
+ toAdd.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ recipe.mInputs,
+ recipe.mOutputs,
+ recipe.mSpecialItems,
+ recipe.mChances,
+ new FluidStack[] {
+ new FluidStack(Objects.requireNonNull(fluids.get(newGas)), gasAmount) },
+ recipe.mFluidOutputs,
+ time,
+ recipe.mEUt,
+ recipe.mSpecialValue,
+ recipe));
} else {
// new recipe
- toAdd.add(new BWRecipes.DynamicGTRecipe(
- false,
- recipe.mInputs,
- recipe.mOutputs,
- recipe.mSpecialItems,
- recipe.mChances,
- new FluidStack[] {new FluidStack(Objects.requireNonNull(fluids.get(newGas)), gasAmount)},
- recipe.mFluidOutputs,
- time,
- recipe.mEUt,
- recipe.mSpecialValue));
+ toAdd.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ recipe.mInputs,
+ recipe.mOutputs,
+ recipe.mSpecialItems,
+ recipe.mChances,
+ new FluidStack[] {
+ new FluidStack(Objects.requireNonNull(fluids.get(newGas)), gasAmount) },
+ recipe.mFluidOutputs,
+ time,
+ recipe.mEUt,
+ recipe.mSpecialValue));
}
}
}
}
- private static void editEBFNoGasRecipes(
- GT_Recipe recipe, Materials originalGas, HashSet<GT_Recipe> toAdd, HashSet<ItemStack> noGas) {
+ private static void editEBFNoGasRecipes(GT_Recipe recipe, Materials originalGas, HashSet<GT_Recipe> toAdd,
+ HashSet<ItemStack> noGas) {
for (ItemStack is : noGas) {
byte circuitConfiguration = 1;
if (GT_Utility.areStacksEqual(is, recipe.mOutputs[0])) {
@@ -514,32 +511,27 @@ public class StaticRecipeChangeLoaders {
if (!GT_Utility.areStacksEqual(GT_Utility.getIntegratedCircuit(11), stack)
&& !GT_Utility.areStacksEqual(GT_Utility.getIntegratedCircuit(14), stack)
&& !GT_Utility.areStacksEqual(GT_Utility.getIntegratedCircuit(19), stack)) {
- if (BW_Util.checkStackAndPrefix(stack))
- circuitConfiguration = (byte)
- (GT_OreDictUnificator.getAssociation(stack)
- .mPrefix
- .equals(OrePrefixes.dustSmall)
- ? 4
- : GT_OreDictUnificator.getAssociation(stack)
- .mPrefix
- .equals(OrePrefixes.dustTiny)
- ? 9
- : 1);
- inputs.add(stack);
- }
+ if (BW_Util.checkStackAndPrefix(stack))
+ circuitConfiguration = (byte) (GT_OreDictUnificator.getAssociation(stack).mPrefix
+ .equals(OrePrefixes.dustSmall) ? 4
+ : GT_OreDictUnificator.getAssociation(stack).mPrefix
+ .equals(OrePrefixes.dustTiny) ? 9 : 1);
+ inputs.add(stack);
+ }
inputs.add(GT_Utility.getIntegratedCircuit(circuitConfiguration));
- toAdd.add(new BWRecipes.DynamicGTRecipe(
- false,
- inputs.toArray(new ItemStack[0]),
- recipe.mOutputs,
- recipe.mSpecialItems,
- recipe.mChances,
- null,
- recipe.mFluidOutputs,
- transformEBFNoGasRecipeTime(recipe, originalGas),
- recipe.mEUt,
- recipe.mSpecialValue,
- recipe));
+ toAdd.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ inputs.toArray(new ItemStack[0]),
+ recipe.mOutputs,
+ recipe.mSpecialItems,
+ recipe.mChances,
+ null,
+ recipe.mFluidOutputs,
+ transformEBFNoGasRecipeTime(recipe, originalGas),
+ recipe.mEUt,
+ recipe.mSpecialValue,
+ recipe));
break;
}
}
@@ -549,12 +541,12 @@ public class StaticRecipeChangeLoaders {
HashSet<GT_Recipe> duplicates = new HashSet<>();
for (GT_Recipe recipe : toAdd) {
for (GT_Recipe recipe2 : toAdd) {
- if (recipe.mEUt != recipe2.mEUt
- || recipe.mDuration != recipe2.mDuration
+ if (recipe.mEUt != recipe2.mEUt || recipe.mDuration != recipe2.mDuration
|| recipe.mSpecialValue != recipe2.mSpecialValue
|| recipe == recipe2
|| recipe.mInputs.length != recipe2.mInputs.length
- || recipe.mFluidInputs.length != recipe2.mFluidInputs.length) continue;
+ || recipe.mFluidInputs.length != recipe2.mFluidInputs.length)
+ continue;
boolean isSame = true;
for (int i = 0; i < recipe.mInputs.length; i++) {
if (!GT_Utility.areStacksEqual(recipe.mInputs[i], recipe2.mInputs[i])) isSame = false;
@@ -577,8 +569,9 @@ public class StaticRecipeChangeLoaders {
}
private static void editRecipes(ArrayListMultimap<SubTag, GT_Recipe> base, HashSet<ItemStack> noGas) {
- if (GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeFluidNameMap.contains(
- Objects.requireNonNull(fluids.get(Oganesson)).getName())) return;
+ if (GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeFluidNameMap
+ .contains(Objects.requireNonNull(fluids.get(Oganesson)).getName()))
+ return;
HashSet<GT_Recipe> toAdd = new HashSet<>();
@@ -604,31 +597,27 @@ public class StaticRecipeChangeLoaders {
public static void addElectricImplosionCompressorRecipes() {
if (eicMap == null) {
eicMap = new GT_Recipe.GT_Recipe_Map(
- new HashSet<>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()),
- "gt.recipe.electricimplosioncompressor",
- "Electric Implosion Compressor",
- (String) null,
- "gregtech:textures/gui/basicmachines/Default",
- 2,
- 2,
- 0,
- 0,
- 1,
- "",
- 1,
- "",
- true,
- true)
- .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_IMPLOSION)
- .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT);
- GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.stream()
- .filter(e -> e.mInputs != null)
- .forEach(recipe -> eicMap.addRecipe(
+ new HashSet<>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()),
+ "gt.recipe.electricimplosioncompressor",
+ "Electric Implosion Compressor",
+ (String) null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 2,
+ 2,
+ 0,
+ 0,
+ 1,
+ "",
+ 1,
+ "",
+ true,
+ true).setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_IMPLOSION)
+ .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT);
+ GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.stream().filter(e -> e.mInputs != null).forEach(
+ recipe -> eicMap.addRecipe(
true,
- Arrays.stream(recipe.mInputs)
- .filter(e -> !StaticRecipeChangeLoaders.checkForExplosives(e))
- .distinct()
- .toArray(ItemStack[]::new),
+ Arrays.stream(recipe.mInputs).filter(e -> !StaticRecipeChangeLoaders.checkForExplosives(e))
+ .distinct().toArray(ItemStack[]::new),
recipe.mOutputs,
null,
null,
@@ -644,11 +633,11 @@ public class StaticRecipeChangeLoaders {
// 72L SpaceTime -> 1 Eternal singularity.
eicMap.addRecipe(
false,
- new ItemStack[] {GT_Values.NI},
- new ItemStack[] {GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L)},
+ new ItemStack[] { GT_Values.NI },
+ new ItemStack[] { GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L) },
null,
- new FluidStack[] {Materials.SpaceTime.getMolten(72L)},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { Materials.SpaceTime.getMolten(72L) },
+ new FluidStack[] { GT_Values.NF },
100 * 20,
128_000_000,
1); // aSpecialVaue has no meaning here.
@@ -659,14 +648,13 @@ public class StaticRecipeChangeLoaders {
// Raw Exposed Optical Chip
eicMap.addRecipe(
false,
- new ItemStack[] {
- ItemList.Circuit_Silicon_Wafer7.get(1L),
- GT_ModHandler.getModItem("universalsingularities", "universal.general.singularity", 1L, 20)
- },
- new ItemStack[] {ItemList.Circuit_Chip_Optical.get(16L)},
+ new ItemStack[] { ItemList.Circuit_Silicon_Wafer7.get(1L),
+ GT_ModHandler
+ .getModItem("universalsingularities", "universal.general.singularity", 1L, 20) },
+ new ItemStack[] { ItemList.Circuit_Chip_Optical.get(16L) },
null,
- new FluidStack[] {GT_Values.NF},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { GT_Values.NF },
+ new FluidStack[] { GT_Values.NF },
5 * 20,
125_829_120,
1);
@@ -674,33 +662,33 @@ public class StaticRecipeChangeLoaders {
eicMap.addRecipe(
false,
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityPlutoniumNugget", 5L)},
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityPlutonium", 1L)},
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityPlutoniumNugget", 5L) },
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityPlutonium", 1L) },
null,
- new FluidStack[] {Materials.Infinity.getMolten(9L)},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { Materials.Infinity.getMolten(9L) },
+ new FluidStack[] { GT_Values.NF },
1,
7_864_320,
1);
eicMap.addRecipe(
false,
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityUraniumNugget", 5L)},
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityUranium", 1L)},
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityUraniumNugget", 5L) },
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityUranium", 1L) },
null,
- new FluidStack[] {Materials.Infinity.getMolten(9L)},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { Materials.Infinity.getMolten(9L) },
+ new FluidStack[] { GT_Values.NF },
1,
7_864_320,
1);
eicMap.addRecipe(
false,
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityThoriumNugget", 5L)},
- new ItemStack[] {GT_ModHandler.getModItem("GoodGenerator", "highDensityThorium", 1L)},
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityThoriumNugget", 5L) },
+ new ItemStack[] { GT_ModHandler.getModItem("GoodGenerator", "highDensityThorium", 1L) },
null,
- new FluidStack[] {Materials.Infinity.getMolten(9L)},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { Materials.Infinity.getMolten(9L) },
+ new FluidStack[] { GT_Values.NF },
1,
7_864_320,
1);
@@ -731,8 +719,8 @@ public class StaticRecipeChangeLoaders {
return ret;
}
- private static int getLogicFuntion(
- GT_Recipe.GT_Recipe_Map gt_recipe_map, GT_Recipe recipe, Pair<Integer, Integer> counts) {
+ private static int getLogicFuntion(GT_Recipe.GT_Recipe_Map gt_recipe_map, GT_Recipe recipe,
+ Pair<Integer, Integer> counts) {
if (gt_recipe_map == GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes)
return getChemicalLogic(recipe, counts);
else if (gt_recipe_map == GT_Recipe.GT_Recipe_Map.sBlastRecipes) return getBlastLogic(recipe);
@@ -750,8 +738,8 @@ public class StaticRecipeChangeLoaders {
return toSet.getValue() * 10 + toSet.getKey();
}
- private static void transformCircuitRecipes(
- GT_Recipe.GT_Recipe_Map gtRecipeMap, Map<GT_Recipe, Pair<Integer, Integer>> mapGtRecipeCounts) {
+ private static void transformCircuitRecipes(GT_Recipe.GT_Recipe_Map gtRecipeMap,
+ Map<GT_Recipe, Pair<Integer, Integer>> mapGtRecipeCounts) {
mapGtRecipeCounts.forEach(
(recipe, counts) -> StaticRecipeChangeLoaders.rewriteForCorrectCircuit(gtRecipeMap, recipe, counts));
@@ -786,14 +774,14 @@ public class StaticRecipeChangeLoaders {
private static Map<GT_Recipe.GT_Recipe_Map, Map<GT_Recipe, Pair<Integer, Integer>>> getRecipesByCircuitID(
GT_Recipe.GT_Recipe_Map[] ref) {
- return Arrays.stream(ref)
- .collect(Collectors.toMap(
+ return Arrays.stream(ref).collect(
+ Collectors.toMap(
k -> k,
k -> getArrayListMultiMapFromRecipeList(gatherNoCircuitRecipes(new HashSet<>(k.mRecipeList)))));
}
- private static GT_Recipe rewriteForCorrectCircuit(
- GT_Recipe.GT_Recipe_Map gt_recipe_map, GT_Recipe recipe, Pair<Integer, Integer> counts) {
+ private static GT_Recipe rewriteForCorrectCircuit(GT_Recipe.GT_Recipe_Map gt_recipe_map, GT_Recipe recipe,
+ Pair<Integer, Integer> counts) {
ItemStack[] old = BW_Util.copyAndRemoveNulls(recipe.mInputs, ItemStack.class);
ItemStack[] nu = Arrays.copyOf(old, old.length + 1);
@@ -813,8 +801,7 @@ public class StaticRecipeChangeLoaders {
newColl = new HashSet<>();
}
- recipeloop:
- for (GT_Recipe r : mRecipeList) {
+ recipeloop: for (GT_Recipe r : mRecipeList) {
for (int i = 0; i < r.mInputs.length; i++)
if (GT_Utility.areStacksEqual(GT_Utility.getIntegratedCircuit(Short.MAX_VALUE), r.mInputs[i])) {
continue recipeloop;
@@ -827,15 +814,11 @@ public class StaticRecipeChangeLoaders {
private static Map<GT_Recipe, Pair<Integer, Integer>> getArrayListMultiMapFromRecipeList(
Collection<GT_Recipe> mRecipeList) {
- return mRecipeList.stream()
- .collect(Collectors.toMap(
+ return mRecipeList.stream().collect(
+ Collectors.toMap(
recipe -> recipe,
recipe -> new Pair<>(
- (int) Arrays.stream(recipe.mInputs)
- .filter(Objects::nonNull)
- .count(),
- (int) Arrays.stream(recipe.mFluidInputs)
- .filter(Objects::nonNull)
- .count())));
+ (int) Arrays.stream(recipe.mInputs).filter(Objects::nonNull).count(),
+ (int) Arrays.stream(recipe.mFluidInputs).filter(Objects::nonNull).count())));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java
index 212cc0ae20..a1d7d23c46 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java
@@ -1,29 +1,31 @@
/*
- * 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.common.net;
+import java.util.EnumMap;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+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;
@@ -38,13 +40,6 @@ 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 javax.annotation.Nonnull;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
/*
* Original GT File slightly Modified
@@ -58,24 +53,16 @@ public class BW_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
public BW_Network() {
this.mChannel = NetworkRegistry.INSTANCE.newChannel("BartWorks", this, new BW_Network.HandlerShared());
- this.mSubChannels = new GT_Packet[] {
- new RendererPacket(),
- new CircuitProgrammerPacket(),
- new MetaBlockPacket(),
- new OreDictCachePacket(),
- new ServerJoinedPackage(),
- new EICPacket(),
- new EIGPacket()
- };
+ this.mSubChannels = new GT_Packet[] { new RendererPacket(), new CircuitProgrammerPacket(),
+ new MetaBlockPacket(), new OreDictCachePacket(), new ServerJoinedPackage(), new EICPacket(),
+ new EIGPacket() };
}
protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception {
- aOutput.add(new FMLProxyPacket(
- Unpooled.buffer()
- .writeByte(aPacket.getPacketID())
- .writeBytes(aPacket.encode())
- .copy(),
- (String) aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get()));
+ aOutput.add(
+ new FMLProxyPacket(
+ Unpooled.buffer().writeByte(aPacket.getPacketID()).writeBytes(aPacket.encode()).copy(),
+ (String) aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get()));
}
protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput)
@@ -85,40 +72,33 @@ public class BW_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
}
public void sendToPlayer(@Nonnull GT_Packet aPacket, @Nonnull EntityPlayerMP aPlayer) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET)
.set(FMLOutboundHandler.OutboundTarget.PLAYER);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
.set(aPlayer);
((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket);
}
public void sendToAllPlayersinWorld(@Nonnull GT_Packet aPacket, World world) {
for (String name : FMLServerHandler.instance().getServer().getAllUsernames()) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET)
.set(FMLOutboundHandler.OutboundTarget.PLAYER);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
.set(world.getPlayerEntityByName(name));
((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket);
}
}
public void sendToAllAround(@Nonnull GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGET)
.set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
- ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER))
- .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
.set(aPosition);
((FMLEmbeddedChannel) this.mChannel.get(Side.SERVER)).writeAndFlush(aPacket);
}
public void sendToServer(@Nonnull GT_Packet aPacket) {
- ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT))
- .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ ((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).attr(FMLOutboundHandler.FML_MESSAGETARGET)
.set(FMLOutboundHandler.OutboundTarget.TOSERVER);
((FMLEmbeddedChannel) this.mChannel.get(Side.CLIENT)).writeAndFlush(aPacket);
}
@@ -133,8 +113,7 @@ public class BW_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
EntityPlayerMP tPlayer = (EntityPlayerMP) tObject;
Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ);
- if (tPlayer.getServerForPlayer()
- .getPlayerManager()
+ if (tPlayer.getServerForPlayer().getPlayerManager()
.isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
this.sendToPlayer(aPacket, tPlayer);
}
@@ -144,6 +123,7 @@ public class BW_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
@Sharable
static final class HandlerShared extends SimpleChannelInboundHandler<GT_Packet> {
+
HandlerShared() {}
protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) throws Exception {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java
index 11e0ed1352..0e428285e4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java
@@ -1,31 +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.common.net;
-import com.github.bartimaeusnek.bartworks.common.items.Circuit_Programmer;
-import com.google.common.io.ByteArrayDataInput;
-import gregtech.api.net.GT_Packet;
import java.nio.ByteBuffer;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -34,6 +23,10 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
+import com.github.bartimaeusnek.bartworks.common.items.Circuit_Programmer;
+import com.google.common.io.ByteArrayDataInput;
+import gregtech.api.net.GT_Packet;
+
public class CircuitProgrammerPacket extends GT_Packet {
private int dimID, playerID;
@@ -59,11 +52,8 @@ public class CircuitProgrammerPacket extends GT_Packet {
@Override
public byte[] encode() {
- return ByteBuffer.allocate(9)
- .putInt(0, this.dimID)
- .putInt(4, this.playerID)
- .put(8, (this.hasChip ? this.chipCfg : -1))
- .array();
+ return ByteBuffer.allocate(9).putInt(0, this.dimID).putInt(4, this.playerID)
+ .put(8, (this.hasChip ? this.chipCfg : -1)).array();
}
@Override
@@ -89,9 +79,9 @@ public class CircuitProgrammerPacket extends GT_Packet {
nbt.setBoolean("HasChip", this.hasChip);
if (this.hasChip) nbt.setByte("ChipConfig", this.chipCfg);
stack.setTagCompound(nbt);
- ((EntityPlayer) w.getEntityByID(this.playerID))
- .inventory.setInventorySlotContents(
- ((EntityPlayer) w.getEntityByID(this.playerID)).inventory.currentItem, stack);
+ ((EntityPlayer) w.getEntityByID(this.playerID)).inventory.setInventorySlotContents(
+ ((EntityPlayer) w.getEntityByID(this.playerID)).inventory.currentItem,
+ stack);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java
index b62d880c4c..95a79e9344 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java
@@ -1,17 +1,20 @@
package com.github.bartimaeusnek.bartworks.common.net;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ElectricImplosionCompressor;
import com.github.bartimaeusnek.bartworks.util.Coords;
import com.google.common.io.ByteArrayDataInput;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.net.GT_Packet_New;
import io.netty.buffer.ByteBuf;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
public class EICPacket extends GT_Packet_New {
+
private Coords coords;
private boolean bool;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EIGPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EIGPacket.java
index c65568530b..f21960d65f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EIGPacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EIGPacket.java
@@ -1,17 +1,20 @@
package com.github.bartimaeusnek.bartworks.common.net;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ExtremeIndustrialGreenhouse;
import com.github.bartimaeusnek.bartworks.util.Coords;
import com.google.common.io.ByteArrayDataInput;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.net.GT_Packet_New;
import io.netty.buffer.ByteBuf;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
public class EIGPacket extends GT_Packet_New {
+
private Coords coords;
private int mMaxSlots;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java
index 047631d193..3b454c73ad 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java
@@ -1,36 +1,29 @@
/*
- * 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.common.net;
+import java.nio.ByteBuffer;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Block_TE;
import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.net.GT_Packet;
-import java.nio.ByteBuffer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class MetaBlockPacket extends GT_Packet {
@@ -59,21 +52,11 @@ public class MetaBlockPacket extends GT_Packet {
@Override
public byte[] encode() {
int hash = MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(12)
- .putInt(this.x)
- .putInt(this.z)
- .putShort(this.y)
- .putShort(this.meta)
- .array(),
+ ByteBuffer.allocate(12).putInt(this.x).putInt(this.z).putShort(this.y).putShort(this.meta).array(),
0,
12,
31);
- return ByteBuffer.allocate(16)
- .putInt(this.x)
- .putInt(this.z)
- .putShort(this.y)
- .putShort(this.meta)
- .putInt(hash)
+ return ByteBuffer.allocate(16).putInt(this.x).putInt(this.z).putShort(this.y).putShort(this.meta).putInt(hash)
.array();
}
@@ -87,17 +70,11 @@ public class MetaBlockPacket extends GT_Packet {
this.y = buff.getShort();
this.meta = buff.getShort();
MetaBlockPacket todecode = new MetaBlockPacket(this.x, this.y, this.z, this.meta);
- if (buff.getInt()
- != MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(12)
- .putInt(this.x)
- .putInt(this.z)
- .putShort(this.y)
- .putShort(this.meta)
- .array(),
- 0,
- 12,
- 31)) {
+ if (buff.getInt() != MurmurHash3.murmurhash3_x86_32(
+ ByteBuffer.allocate(12).putInt(this.x).putInt(this.z).putShort(this.y).putShort(this.meta).array(),
+ 0,
+ 12,
+ 31)) {
MainMod.LOGGER.error("PACKET HASH DOES NOT MATCH!");
return null;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java
index 14a974ea21..6d252b8ad4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java
@@ -1,34 +1,27 @@
/*
- * 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.common.net;
+import java.nio.ByteBuffer;
+import java.util.HashSet;
+
+import net.minecraft.world.IBlockAccess;
+
import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.net.GT_Packet;
-import java.nio.ByteBuffer;
-import java.util.HashSet;
-import net.minecraft.world.IBlockAccess;
public class OreDictCachePacket extends GT_Packet {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java
index 5ff6ad1431..0cfb24d44c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java
@@ -1,27 +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.common.net;
+import java.nio.ByteBuffer;
+
+import net.minecraft.world.IBlockAccess;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
@@ -29,8 +24,6 @@ import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
import com.github.bartimaeusnek.bartworks.util.Coords;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.net.GT_Packet;
-import java.nio.ByteBuffer;
-import net.minecraft.world.IBlockAccess;
public class RendererPacket extends GT_Packet {
@@ -60,39 +53,30 @@ public class RendererPacket extends GT_Packet {
byte r = (byte) (((this.integer >> 16) & 0xFF) + Byte.MIN_VALUE);
byte g = (byte) (((this.integer >> 8) & 0xFF) + Byte.MIN_VALUE);
byte b = (byte) (((this.integer) & 0xFF) + Byte.MIN_VALUE);
- byte checksum = (byte) (this.coords.x % 25
- + this.coords.y % 25
+ byte checksum = (byte) (this.coords.x % 25 + this.coords.y % 25
+ this.coords.z % 25
+ this.coords.wID % 25
+ this.integer % 25
+ this.removal);
- return ByteBuffer.allocate(19)
- .putInt(0, this.coords.x)
- .putShort(4, this.coords.y)
- .putInt(6, this.coords.z)
- .putInt(10, this.coords.wID)
- .put(14, r)
- .put(15, g)
- .put(16, b)
- .put(17, this.removal)
- .put(18, checksum)
+ return ByteBuffer.allocate(19).putInt(0, this.coords.x).putShort(4, this.coords.y).putInt(6, this.coords.z)
+ .putInt(10, this.coords.wID).put(14, r).put(15, g).put(16, b).put(17, this.removal).put(18, checksum)
.array();
}
- // /**
- // * only use in a debug enviroment, does not do anything on its own.
- // * @param buffer
- // */
- // public void decodetest (byte[] buffer){
- // this.coords=new
+ // /**
+ // * only use in a debug enviroment, does not do anything on its own.
+ // * @param buffer
+ // */
+ // public void decodetest (byte[] buffer){
+ // this.coords=new
// Coords(ByteBuffer.wrap(buffer).getInt(0),ByteBuffer.wrap(buffer).getShort(4),ByteBuffer.wrap(buffer).getInt(6),ByteBuffer.wrap(buffer).getInt(10));
- // int[] rgb = {ByteBuffer.wrap(buffer).get(14)-Byte.MIN_VALUE,
+ // int[] rgb = {ByteBuffer.wrap(buffer).get(14)-Byte.MIN_VALUE,
// ByteBuffer.wrap(buffer).get(15)-Byte.MIN_VALUE, ByteBuffer.wrap(buffer).get(16)-Byte.MIN_VALUE};
- // this.integer= BW_Util.getColorFromRGBArray(rgb);
- // this.removal=ByteBuffer.wrap(buffer).get(17);
+ // this.integer= BW_Util.getColorFromRGBArray(rgb);
+ // this.removal=ByteBuffer.wrap(buffer).get(17);
//
- // byte checksum = (byte) (coords.x%25+coords.y%25+coords.z%25+coords.wID%25+integer%25+removal);
- // }
+ // byte checksum = (byte) (coords.x%25+coords.y%25+coords.z%25+coords.wID%25+integer%25+removal);
+ // }
@Override
public GT_Packet decode(ByteArrayDataInput dataInput) {
@@ -105,16 +89,12 @@ public class RendererPacket extends GT_Packet {
ByteBuffer.wrap(buffer).getShort(4),
ByteBuffer.wrap(buffer).getInt(6),
ByteBuffer.wrap(buffer).getInt(10));
- int[] rgb = {
- ByteBuffer.wrap(buffer).get(14) - Byte.MIN_VALUE,
- ByteBuffer.wrap(buffer).get(15) - Byte.MIN_VALUE,
- ByteBuffer.wrap(buffer).get(16) - Byte.MIN_VALUE
- };
+ int[] rgb = { ByteBuffer.wrap(buffer).get(14) - Byte.MIN_VALUE,
+ ByteBuffer.wrap(buffer).get(15) - Byte.MIN_VALUE, ByteBuffer.wrap(buffer).get(16) - Byte.MIN_VALUE };
this.integer = BW_ColorUtil.getColorFromRGBArray(rgb);
this.removal = ByteBuffer.wrap(buffer).get(17);
- byte checksum = (byte) (this.coords.x % 25
- + this.coords.y % 25
+ byte checksum = (byte) (this.coords.x % 25 + this.coords.y % 25
+ this.coords.z % 25
+ this.coords.wID % 25
+ this.integer % 25
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java
index a63388ba25..1c48d28528 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java
@@ -1,32 +1,24 @@
/*
- * 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.common.net;
+import net.minecraft.world.IBlockAccess;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.google.common.io.ByteArrayDataInput;
import gregtech.api.net.GT_Packet;
-import net.minecraft.world.IBlockAccess;
public class ServerJoinedPackage extends GT_Packet {
@@ -38,10 +30,8 @@ public class ServerJoinedPackage extends GT_Packet {
public ServerJoinedPackage(Object obj) {
super(false);
- this.config = (byte)
- (ConfigHandler.classicMode && ConfigHandler.disableExtraGassesForEBF
- ? 3
- : ConfigHandler.classicMode ? 2 : ConfigHandler.disableExtraGassesForEBF ? 1 : 0);
+ this.config = (byte) (ConfigHandler.classicMode && ConfigHandler.disableExtraGassesForEBF ? 3
+ : ConfigHandler.classicMode ? 2 : ConfigHandler.disableExtraGassesForEBF ? 1 : 0);
}
@Override
@@ -51,7 +41,7 @@ public class ServerJoinedPackage extends GT_Packet {
@Override
public byte[] encode() {
- return new byte[] {this.config};
+ return new byte[] { this.config };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java
index 3d643349c0..208bd24c29 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java
@@ -1,27 +1,19 @@
/*
- * 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.common.tileentities.classic;
import net.minecraft.tileentity.TileEntity;
-public class BWTileEntityDimIDBridge extends TileEntity {}
+public class BWTileEntityDimIDBridge extends TileEntity {
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java
index a15b043a56..a437dc8285 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java
@@ -1,34 +1,27 @@
/*
- * 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.common.tileentities.classic;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.entity.player.EntityPlayer;
+
import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_RotorBlock;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator;
import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.entity.player.EntityPlayer;
public class BW_RotorBlock extends TileEntityWindKineticGenerator {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java
index 625352aa82..e735a93dc9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java
@@ -1,42 +1,35 @@
/*
- * 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.common.tileentities.classic;
import static net.minecraftforge.common.util.ForgeDirection.*;
-import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
-import com.github.bartimaeusnek.bartworks.util.Coords;
import java.util.Comparator;
import java.util.PriorityQueue;
+
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.TileFluidHandler;
+import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
+import com.github.bartimaeusnek.bartworks.util.Coords;
+
public class BW_TileEntity_ExperimentalFloodGate extends TileFluidHandler implements ITileAddsInformation {
- private static final ForgeDirection[] allowed_directions = new ForgeDirection[] {DOWN, WEST, EAST, SOUTH, NORTH};
+ private static final ForgeDirection[] allowed_directions = new ForgeDirection[] { DOWN, WEST, EAST, SOUTH, NORTH };
private PriorityQueue<Coords> breadthFirstQueue = new PriorityQueue<>(Comparator.comparingInt(x -> x.y));
private boolean wasInited = false;
@@ -117,6 +110,6 @@ public class BW_TileEntity_ExperimentalFloodGate extends TileFluidHandler implem
@Override
public String[] getInfoData() {
- return new String[] {"Experimental Machine to fill Holes with Fluids"};
+ return new String[] { "Experimental Machine to fill Holes with Fluids" };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
index 6bf5546ce6..8641a78adf 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
@@ -1,27 +1,32 @@
/*
- * 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.common.tileentities.classic;
+import java.util.Arrays;
+import java.util.Optional;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityFurnace;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.*;
+
import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
@@ -36,28 +41,12 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Pollution;
-import java.util.Arrays;
-import java.util.Optional;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntityFurnace;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.*;
-public class BW_TileEntity_HeatedWaterPump extends TileEntity
- implements ITileDropsContent,
- IFluidHandler,
- IFluidTank,
- ITileWithModularUI,
- ITileAddsInformation,
- ITileHasDifferentTextureSides {
+public class BW_TileEntity_HeatedWaterPump extends TileEntity implements ITileDropsContent, IFluidHandler, IFluidTank,
+ ITileWithModularUI, ITileAddsInformation, ITileHasDifferentTextureSides {
public static final int FUELSLOT = 0;
public static final Fluid WATER = FluidRegistry.WATER;
@@ -139,29 +128,32 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
private void pushWaterToAdjacentTiles() {
Arrays.stream(ForgeDirection.values(), 0, 6) // All but Unknown
- .forEach(direction -> Optional.ofNullable(this.worldObj.getTileEntity(
- this.xCoord + direction.offsetX,
- this.yCoord + direction.offsetY,
- this.zCoord + direction.offsetZ))
- .ifPresent(te -> {
- if (te instanceof IFluidHandler) {
- IFluidHandler tank = (IFluidHandler) te;
- if (tank.canFill(direction.getOpposite(), this.outputstack.getFluid())) {
- int drainage;
- if ((drainage = tank.fill(direction.getOpposite(), this.outputstack, false)) > 0) {
- tank.fill(direction.getOpposite(), this.outputstack, true);
- this.drain(drainage, true);
+ .forEach(
+ direction -> Optional.ofNullable(
+ this.worldObj.getTileEntity(
+ this.xCoord + direction.offsetX,
+ this.yCoord + direction.offsetY,
+ this.zCoord + direction.offsetZ))
+ .ifPresent(te -> {
+ if (te instanceof IFluidHandler) {
+ IFluidHandler tank = (IFluidHandler) te;
+ if (tank.canFill(direction.getOpposite(), this.outputstack.getFluid())) {
+ int drainage;
+ if ((drainage = tank.fill(direction.getOpposite(), this.outputstack, false))
+ > 0) {
+ tank.fill(direction.getOpposite(), this.outputstack, true);
+ this.drain(drainage, true);
+ }
+ }
+ } else if (te instanceof IFluidTank) {
+ IFluidTank tank = (IFluidTank) te;
+ int drainage;
+ if ((drainage = tank.fill(this.outputstack, false)) > 0) {
+ tank.fill(this.outputstack, true);
+ this.drain(drainage, true);
+ }
}
- }
- } else if (te instanceof IFluidTank) {
- IFluidTank tank = (IFluidTank) te;
- int drainage;
- if ((drainage = tank.fill(this.outputstack, false)) > 0) {
- tank.fill(this.outputstack, true);
- this.drain(drainage, true);
- }
- }
- }));
+ }));
}
private void causePollution() {
@@ -175,7 +167,7 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
@Override
public int[] getAccessibleSlotsFromSide(int side) {
- return new int[] {0};
+ return new int[] { 0 };
}
@Override
@@ -201,9 +193,9 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
@Override
public ItemStack decrStackSize(int slot, int ammount) {
- if (slot != BW_TileEntity_HeatedWaterPump.FUELSLOT
- || this.fuelstack == null
- || ammount > this.fuelstack.stackSize) return null;
+ if (slot != BW_TileEntity_HeatedWaterPump.FUELSLOT || this.fuelstack == null
+ || ammount > this.fuelstack.stackSize)
+ return null;
return this.fuelstack.splitStack(ammount);
}
@@ -284,8 +276,15 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
if (ret.amount == 0) ret = null;
if (doDrain) {
this.outputstack.amount -= actualdrain;
- FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(
- this.outputstack, this.getWorldObj(), this.xCoord, this.yCoord, this.zCoord, this, actualdrain));
+ FluidEvent.fireEvent(
+ new FluidEvent.FluidDrainingEvent(
+ this.outputstack,
+ this.getWorldObj(),
+ this.xCoord,
+ this.yCoord,
+ this.zCoord,
+ this,
+ actualdrain));
}
return ret;
}
@@ -297,9 +296,9 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
@Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
- if (resource != null
- && resource.getFluid() == BW_TileEntity_HeatedWaterPump.WATER
- && this.drain(resource.amount, false) != null) return this.drain(resource.amount, doDrain);
+ if (resource != null && resource.getFluid() == BW_TileEntity_HeatedWaterPump.WATER
+ && this.drain(resource.amount, false) != null)
+ return this.drain(resource.amount, doDrain);
return null;
}
@@ -320,30 +319,29 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
@Override
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
- return new FluidTankInfo[] {this.getInfo()};
+ return new FluidTankInfo[] { this.getInfo() };
}
@Override
public String[] getInfoData() {
return new String[] {
- StatCollector.translateToLocal("tooltip.tile.waterpump.0.name") + " "
- + GT_Utility.formatNumbers(ConfigHandler.mbWaterperSec)
- + String.format(
- StatCollector.translateToLocal("tooltip.tile.waterpump.1.name"),
- ConfigHandler.pollutionHeatedWaterPumpSecond),
- StatCollector.translateToLocal("tooltip.tile.waterpump.2.name")
- };
+ StatCollector.translateToLocal("tooltip.tile.waterpump.0.name") + " "
+ + GT_Utility.formatNumbers(ConfigHandler.mbWaterperSec)
+ + String.format(
+ StatCollector.translateToLocal("tooltip.tile.waterpump.1.name"),
+ ConfigHandler.pollutionHeatedWaterPumpSecond),
+ StatCollector.translateToLocal("tooltip.tile.waterpump.2.name") };
}
@Override
public void registerBlockIcons(IIconRegister par1IconRegister) {
- ITileHasDifferentTextureSides.texture[ForgeDirection.UP.ordinal()] =
- par1IconRegister.registerIcon(MainMod.MOD_ID + ":heatedWaterPumpTop");
- ITileHasDifferentTextureSides.texture[ForgeDirection.DOWN.ordinal()] =
- par1IconRegister.registerIcon(MainMod.MOD_ID + ":heatedWaterPumpDown");
+ ITileHasDifferentTextureSides.texture[ForgeDirection.UP.ordinal()] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpTop");
+ ITileHasDifferentTextureSides.texture[ForgeDirection.DOWN.ordinal()] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpDown");
for (int i = 2; i < 7; i++) {
- ITileHasDifferentTextureSides.texture[i] =
- par1IconRegister.registerIcon(MainMod.MOD_ID + ":heatedWaterPumpSide");
+ ITileHasDifferentTextureSides.texture[i] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpSide");
}
}
@@ -354,16 +352,13 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
builder.bindPlayerInventory(buildContext.getPlayer());
final IItemHandlerModifiable invWrapper = new InvWrapper(this);
- builder.widget(new SlotWidget(invWrapper, 0)
- .setFilter(stack -> TileEntityFurnace.getItemBurnTime(stack) > 0)
+ builder.widget(
+ new SlotWidget(invWrapper, 0).setFilter(stack -> TileEntityFurnace.getItemBurnTime(stack) > 0)
.setPos(55, 52))
- .widget(SlotWidget.phantom(invWrapper, 1).disableInteraction().setPos(85, 32))
- .widget(new ProgressBar()
- .setProgress(() -> (float) fuel / maxfuel)
- .setTexture(BW_UITextures.PROGRESSBAR_FUEL, 14)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(56, 36)
- .setSize(14, 14));
+ .widget(SlotWidget.phantom(invWrapper, 1).disableInteraction().setPos(85, 32)).widget(
+ new ProgressBar().setProgress(() -> (float) fuel / maxfuel)
+ .setTexture(BW_UITextures.PROGRESSBAR_FUEL, 14).setDirection(ProgressBar.Direction.UP)
+ .setPos(56, 36).setSize(14, 14));
return builder.build();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
index 2fcf82d36c..d3160d14a7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.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.common.tileentities.classic;
-import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
+
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.*;
+import gregtech.api.util.GT_Utility;
+
public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank, IFluidHandler {
final ArrayList<FluidStack> INTERNALTANKS = new ArrayList<>();
@@ -123,11 +116,10 @@ public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank
int id = 0;
if (this.canDrain(null, resource.getFluid())) {
- for (FluidStack stack : this.INTERNALTANKS)
- if (GT_Utility.areFluidsEqual(stack, resource)) {
- this.INTERNALTANKS.get(id = this.INTERNALTANKS.indexOf(stack)).amount += resource.amount;
- this.selectedTank = id;
- }
+ for (FluidStack stack : this.INTERNALTANKS) if (GT_Utility.areFluidsEqual(stack, resource)) {
+ this.INTERNALTANKS.get(id = this.INTERNALTANKS.indexOf(stack)).amount += resource.amount;
+ this.selectedTank = id;
+ }
} else {
this.INTERNALTANKS.add(resource);
id = this.INTERNALTANKS.size() - 1;
@@ -148,8 +140,15 @@ public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank
if (ret.amount == 0) ret = null;
if (doDrain) {
outputstack.amount -= actualdrain;
- FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(
- outputstack, this.getWorldObj(), this.xCoord, this.yCoord, this.zCoord, this, actualdrain));
+ FluidEvent.fireEvent(
+ new FluidEvent.FluidDrainingEvent(
+ outputstack,
+ this.getWorldObj(),
+ this.xCoord,
+ this.yCoord,
+ this.zCoord,
+ this,
+ actualdrain));
}
return ret;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
index e5a07a9505..b9b8ba24b3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
@@ -52,437 +52,437 @@
// public class BW_TileEntity_LESU_Redux extends TileEntity implements ITileHasDifferentTextureSides,
// ITileAddsInformation, ITileDropsContent, IEnergyConnected {
//
-// public ConnectedBlocksChecker connectedcells;
-// public ItemStack[] circuits = new ItemStack[5];
-// private long[] storage;
-// private long input;
-// private long output;
-// ByteBuffer eu;
-//
-// @Override
-// public String[] getInfoData() {
-// ArrayList<String> e = new ArrayList<>();
-// String[] dsc = StatCollector.translateToLocal("tooltip.tile.lesu.0.name").split(";");
-// for (int i = 0; i < dsc.length; i++) {
-// e.add(dsc[i]);
-// }
-// e.add(StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " " + ConfigHandler.energyPerCell + "EU");
-// dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name").split(";");
-// for (int i = 0; i < dsc.length; i++) {
-// e.add(dsc[i]);
-// }
-// e.add(ChatColorHelper.RED + StatCollector.translateToLocal("tooltip.tile.lesu.3.name"));
-// e.add(StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks");
-// return e.toArray(new String[0]);
-// }
-//
-// @Override
-// public void registerBlockIcons(IIconRegister par1IconRegister) {
-// par1IconRegister.registerIcon(MainMod.MOD_ID + ":LESU_CASING_" + i);
-// }
-//
-// @Override
-// public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
-// if (inputEnergyFrom(aSide)){
-//
-// }
-// return 0;
-// }
-//
-// @Override
-// public boolean inputEnergyFrom(byte b) {
-// return true;
-// }
-//
-// @Override
-// public boolean outputsEnergyTo(byte b) {
-// return false;
-// }
-//
-// @Override
-// public byte getColorization() {
-// return 0;
-// }
-//
-// @Override
-// public byte setColorization(byte b) {
-// return 0;
-// }
-//
-// @Override
-// public World getWorld() {
-// return null;
-// }
-//
-// @Override
-// public int getXCoord() {
-// return 0;
-// }
-//
-// @Override
-// public short getYCoord() {
-// return 0;
-// }
-//
-// @Override
-// public int getZCoord() {
-// return 0;
-// }
-//
-// @Override
-// public boolean isServerSide() {
-// return !isClientSide();
-// }
-//
-// @Override
-// public boolean isClientSide() {
-// if (getWorld() != null)
-// return getWorld().isRemote;
-// return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
-// }
-//
-// @Override
-// public int getRandomNumber(int i) {
-// return new XSTR().nextInt(i);
-// }
-//
-// @Override
-// public TileEntity getTileEntity(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public TileEntity getTileEntityOffset(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public TileEntity getTileEntityAtSide(byte b) {
-// return null;
-// }
-//
-// @Override
-// public TileEntity getTileEntityAtSideAndDistance(byte b, int i) {
-// return null;
-// }
-//
-// @Override
-// public IInventory getIInventory(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IInventory getIInventoryOffset(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IInventory getIInventoryAtSide(byte b) {
-// return null;
-// }
-//
-// @Override
-// public IInventory getIInventoryAtSideAndDistance(byte b, int i) {
-// return null;
-// }
-//
-// @Override
-// public IFluidHandler getITankContainer(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IFluidHandler getITankContainerOffset(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IFluidHandler getITankContainerAtSide(byte b) {
-// return null;
-// }
-//
-// @Override
-// public IFluidHandler getITankContainerAtSideAndDistance(byte b, int i) {
-// return null;
-// }
-//
-// @Override
-// public IGregTechTileEntity getIGregTechTileEntity(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IGregTechTileEntity getIGregTechTileEntityOffset(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public IGregTechTileEntity getIGregTechTileEntityAtSide(byte b) {
-// return null;
-// }
-//
-// @Override
-// public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte b, int i) {
-// return null;
-// }
-//
-// @Override
-// public Block getBlock(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public Block getBlockOffset(int i, int i1, int i2) {
-// return null;
-// }
-//
-// @Override
-// public Block getBlockAtSide(byte b) {
-// return null;
-// }
-//
-// @Override
-// public Block getBlockAtSideAndDistance(byte b, int i) {
-// return null;
-// }
-//
-// @Override
-// public byte getMetaID(int i, int i1, int i2) {
-// return 0;
-// }
-//
-// @Override
-// public byte getMetaIDOffset(int i, int i1, int i2) {
-// return 0;
-// }
-//
-// @Override
-// public byte getMetaIDAtSide(byte b) {
-// return 0;
-// }
-//
-// @Override
-// public byte getMetaIDAtSideAndDistance(byte b, int i) {
-// return 0;
-// }
-//
-// @Override
-// public byte getLightLevel(int i, int i1, int i2) {
-// return 0;
-// }
-//
-// @Override
-// public byte getLightLevelOffset(int i, int i1, int i2) {
-// return 0;
-// }
-//
-// @Override
-// public byte getLightLevelAtSide(byte b) {
-// return 0;
-// }
-//
-// @Override
-// public byte getLightLevelAtSideAndDistance(byte b, int i) {
-// return 0;
-// }
-//
-// @Override
-// public boolean getOpacity(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getOpacityOffset(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getOpacityAtSide(byte b) {
-// return false;
-// }
-//
-// @Override
-// public boolean getOpacityAtSideAndDistance(byte b, int i) {
-// return false;
-// }
-//
-// @Override
-// public boolean getSky(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getSkyOffset(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getSkyAtSide(byte b) {
-// return false;
-// }
-//
-// @Override
-// public boolean getSkyAtSideAndDistance(byte b, int i) {
-// return false;
-// }
-//
-// @Override
-// public boolean getAir(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getAirOffset(int i, int i1, int i2) {
-// return false;
-// }
-//
-// @Override
-// public boolean getAirAtSide(byte b) {
-// return false;
-// }
-//
-// @Override
-// public boolean getAirAtSideAndDistance(byte b, int i) {
-// return false;
-// }
-//
-// @Override
-// public BiomeGenBase getBiome() {
-// return null;
-// }
-//
-// @Override
-// public BiomeGenBase getBiome(int i, int i1) {
-// return null;
-// }
-//
-// @Override
-// public int getOffsetX(byte b, int i) {
-// return 0;
-// }
-//
-// @Override
-// public short getOffsetY(byte b, int i) {
-// return 0;
-// }
-//
-// @Override
-// public int getOffsetZ(byte b, int i) {
-// return 0;
-// }
-//
-// @Override
-// public boolean isDead() {
-// return false;
-// }
-//
-// @Override
-// public void sendBlockEvent(byte b, byte b1) {
-//
-// }
-//
-// @Override
-// public long getTimer() {
-// return 0;
-// }
-//
-// @Override
-// public void setLightValue(byte b) {
-//
-// }
-//
-// @Override
-// public boolean isInvalidTileEntity() {
-// return false;
-// }
-//
-// @Override
-// public boolean openGUI(EntityPlayer entityPlayer, int i) {
-// return false;
-// }
-//
-// @Override
-// public boolean openGUI(EntityPlayer entityPlayer) {
-// return false;
-// }
-//
-// @Override
-// public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
-// return new int[0];
-// }
-//
-// @Override
-// public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
-// return false;
-// }
-//
-// @Override
-// public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
-// return false;
-// }
-//
-// @Override
-// public int getSizeInventory() {
-// return 0;
-// }
-//
-// @Override
-// public ItemStack getStackInSlot(int p_70301_1_) {
-// return null;
-// }
-//
-// @Override
-// public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
-// return null;
-// }
-//
-// @Override
-// public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
-// return null;
-// }
-//
-// @Override
-// public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
-//
-// }
-//
-// @Override
-// public String getInventoryName() {
-// return null;
-// }
-//
-// @Override
-// public boolean hasCustomInventoryName() {
-// return false;
-// }
-//
-// @Override
-// public int getInventoryStackLimit() {
-// return 0;
-// }
-//
-// @Override
-// public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
-// return false;
-// }
-//
-// @Override
-// public void openInventory() {
-//
-// }
+// public ConnectedBlocksChecker connectedcells;
+// public ItemStack[] circuits = new ItemStack[5];
+// private long[] storage;
+// private long input;
+// private long output;
+// ByteBuffer eu;
+//
+// @Override
+// public String[] getInfoData() {
+// ArrayList<String> e = new ArrayList<>();
+// String[] dsc = StatCollector.translateToLocal("tooltip.tile.lesu.0.name").split(";");
+// for (int i = 0; i < dsc.length; i++) {
+// e.add(dsc[i]);
+// }
+// e.add(StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " " + ConfigHandler.energyPerCell + "EU");
+// dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name").split(";");
+// for (int i = 0; i < dsc.length; i++) {
+// e.add(dsc[i]);
+// }
+// e.add(ChatColorHelper.RED + StatCollector.translateToLocal("tooltip.tile.lesu.3.name"));
+// e.add(StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks");
+// return e.toArray(new String[0]);
+// }
+//
+// @Override
+// public void registerBlockIcons(IIconRegister par1IconRegister) {
+// par1IconRegister.registerIcon(MainMod.MOD_ID + ":LESU_CASING_" + i);
+// }
+//
+// @Override
+// public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
+// if (inputEnergyFrom(aSide)){
+//
+// }
+// return 0;
+// }
+//
+// @Override
+// public boolean inputEnergyFrom(byte b) {
+// return true;
+// }
+//
+// @Override
+// public boolean outputsEnergyTo(byte b) {
+// return false;
+// }
+//
+// @Override
+// public byte getColorization() {
+// return 0;
+// }
+//
+// @Override
+// public byte setColorization(byte b) {
+// return 0;
+// }
+//
+// @Override
+// public World getWorld() {
+// return null;
+// }
+//
+// @Override
+// public int getXCoord() {
+// return 0;
+// }
+//
+// @Override
+// public short getYCoord() {
+// return 0;
+// }
+//
+// @Override
+// public int getZCoord() {
+// return 0;
+// }
+//
+// @Override
+// public boolean isServerSide() {
+// return !isClientSide();
+// }
+//
+// @Override
+// public boolean isClientSide() {
+// if (getWorld() != null)
+// return getWorld().isRemote;
+// return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
+// }
+//
+// @Override
+// public int getRandomNumber(int i) {
+// return new XSTR().nextInt(i);
+// }
+//
+// @Override
+// public TileEntity getTileEntity(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public TileEntity getTileEntityOffset(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public TileEntity getTileEntityAtSide(byte b) {
+// return null;
+// }
+//
+// @Override
+// public TileEntity getTileEntityAtSideAndDistance(byte b, int i) {
+// return null;
+// }
+//
+// @Override
+// public IInventory getIInventory(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IInventory getIInventoryOffset(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IInventory getIInventoryAtSide(byte b) {
+// return null;
+// }
+//
+// @Override
+// public IInventory getIInventoryAtSideAndDistance(byte b, int i) {
+// return null;
+// }
+//
+// @Override
+// public IFluidHandler getITankContainer(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IFluidHandler getITankContainerOffset(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IFluidHandler getITankContainerAtSide(byte b) {
+// return null;
+// }
+//
+// @Override
+// public IFluidHandler getITankContainerAtSideAndDistance(byte b, int i) {
+// return null;
+// }
+//
+// @Override
+// public IGregTechTileEntity getIGregTechTileEntity(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IGregTechTileEntity getIGregTechTileEntityOffset(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public IGregTechTileEntity getIGregTechTileEntityAtSide(byte b) {
+// return null;
+// }
+//
+// @Override
+// public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte b, int i) {
+// return null;
+// }
+//
+// @Override
+// public Block getBlock(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public Block getBlockOffset(int i, int i1, int i2) {
+// return null;
+// }
+//
+// @Override
+// public Block getBlockAtSide(byte b) {
+// return null;
+// }
+//
+// @Override
+// public Block getBlockAtSideAndDistance(byte b, int i) {
+// return null;
+// }
+//
+// @Override
+// public byte getMetaID(int i, int i1, int i2) {
+// return 0;
+// }
+//
+// @Override
+// public byte getMetaIDOffset(int i, int i1, int i2) {
+// return 0;
+// }
+//
+// @Override
+// public byte getMetaIDAtSide(byte b) {
+// return 0;
+// }
+//
+// @Override
+// public byte getMetaIDAtSideAndDistance(byte b, int i) {
+// return 0;
+// }
+//
+// @Override
+// public byte getLightLevel(int i, int i1, int i2) {
+// return 0;
+// }
+//
+// @Override
+// public byte getLightLevelOffset(int i, int i1, int i2) {
+// return 0;
+// }
+//
+// @Override
+// public byte getLightLevelAtSide(byte b) {
+// return 0;
+// }
//
-// @Override
-// public void closeInventory() {
-//
-// }
+// @Override
+// public byte getLightLevelAtSideAndDistance(byte b, int i) {
+// return 0;
+// }
+//
+// @Override
+// public boolean getOpacity(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getOpacityOffset(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getOpacityAtSide(byte b) {
+// return false;
+// }
+//
+// @Override
+// public boolean getOpacityAtSideAndDistance(byte b, int i) {
+// return false;
+// }
+//
+// @Override
+// public boolean getSky(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getSkyOffset(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getSkyAtSide(byte b) {
+// return false;
+// }
+//
+// @Override
+// public boolean getSkyAtSideAndDistance(byte b, int i) {
+// return false;
+// }
+//
+// @Override
+// public boolean getAir(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getAirOffset(int i, int i1, int i2) {
+// return false;
+// }
+//
+// @Override
+// public boolean getAirAtSide(byte b) {
+// return false;
+// }
+//
+// @Override
+// public boolean getAirAtSideAndDistance(byte b, int i) {
+// return false;
+// }
+//
+// @Override
+// public BiomeGenBase getBiome() {
+// return null;
+// }
+//
+// @Override
+// public BiomeGenBase getBiome(int i, int i1) {
+// return null;
+// }
+//
+// @Override
+// public int getOffsetX(byte b, int i) {
+// return 0;
+// }
+//
+// @Override
+// public short getOffsetY(byte b, int i) {
+// return 0;
+// }
+//
+// @Override
+// public int getOffsetZ(byte b, int i) {
+// return 0;
+// }
+//
+// @Override
+// public boolean isDead() {
+// return false;
+// }
+//
+// @Override
+// public void sendBlockEvent(byte b, byte b1) {
+//
+// }
+//
+// @Override
+// public long getTimer() {
+// return 0;
+// }
+//
+// @Override
+// public void setLightValue(byte b) {
//
-// @Override
-// public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
-// return false;
-// }
-//
-// @Override
-// public int[] getDropSlots() {
-// return new int[0];
-// }
+// }
+//
+// @Override
+// public boolean isInvalidTileEntity() {
+// return false;
+// }
+//
+// @Override
+// public boolean openGUI(EntityPlayer entityPlayer, int i) {
+// return false;
+// }
+//
+// @Override
+// public boolean openGUI(EntityPlayer entityPlayer) {
+// return false;
+// }
+//
+// @Override
+// public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
+// return new int[0];
+// }
+//
+// @Override
+// public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
+// return false;
+// }
+//
+// @Override
+// public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
+// return false;
+// }
+//
+// @Override
+// public int getSizeInventory() {
+// return 0;
+// }
+//
+// @Override
+// public ItemStack getStackInSlot(int p_70301_1_) {
+// return null;
+// }
+//
+// @Override
+// public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
+// return null;
+// }
+//
+// @Override
+// public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
+// return null;
+// }
+//
+// @Override
+// public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
+//
+// }
+//
+// @Override
+// public String getInventoryName() {
+// return null;
+// }
+//
+// @Override
+// public boolean hasCustomInventoryName() {
+// return false;
+// }
+//
+// @Override
+// public int getInventoryStackLimit() {
+// return 0;
+// }
+//
+// @Override
+// public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
+// return false;
+// }
+//
+// @Override
+// public void openInventory() {
+//
+// }
+//
+// @Override
+// public void closeInventory() {
+//
+// }
+//
+// @Override
+// public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
+// return false;
+// }
+//
+// @Override
+// public int[] getDropSlots() {
+// return new int[0];
+// }
// }
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
index 4fdf9bb667..95938fc39d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.debug;
@@ -28,16 +19,12 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Scanner;
public class CreativeScanner extends GT_MetaTileEntity_Scanner {
+
public CreativeScanner(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
}
- public CreativeScanner(
- String aName,
- int aTier,
- String[] aDescription,
- ITexture[][][] aTextures,
- String aGUIName,
+ public CreativeScanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName,
String aNEIName) {
super(aName, aTier, aDescription, aTextures, aGUIName, aNEIName);
}
@@ -45,7 +32,12 @@ public class CreativeScanner extends GT_MetaTileEntity_Scanner {
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new CreativeScanner(
- this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java
index 6d3ec8383c..3aeab597fe 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -29,6 +20,26 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -40,6 +51,7 @@ import com.github.bartimaeusnek.bartworks.util.*;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -52,23 +64,6 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import javax.annotation.Nullable;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_BioVat> {
@@ -101,34 +96,29 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
private static final int CASING_INDEX = 49;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_BioVat> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_BioVat>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {"ccccc", "ccccc", "ccccc", "ccccc", "ccccc"},
- {"ggggg", "gaaag", "gaaag", "gaaag", "ggggg"},
- {"ggggg", "gaaag", "gaaag", "gaaag", "ggggg"},
- {"cc~cc", "ccccc", "ccccc", "ccccc", "ccccc"},
- }))
- .addElement(
- 'c',
- ofChain(
- ofHatchAdder(GT_TileEntity_BioVat::addMaintenanceToMachineList, CASING_INDEX, 1),
- ofHatchAdder(GT_TileEntity_BioVat::addOutputToMachineList, CASING_INDEX, 1),
- ofHatchAdder(GT_TileEntity_BioVat::addInputToMachineList, CASING_INDEX, 1),
- ofHatchAdder(GT_TileEntity_BioVat::addRadiationInputToMachineList, CASING_INDEX, 1),
- ofHatchAdder(GT_TileEntity_BioVat::addEnergyInputToMachineList, CASING_INDEX, 1),
- onElementPass(e -> e.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement('a', ofChain(isAir(), ofBlockAnyMeta(FluidLoader.bioFluidBlock)))
- .addElement(
- 'g',
- ofGlassTiered(
- (byte) 1,
- (byte) 127,
- (byte) 0,
- (te, v) -> te.mGlassTier = v,
- te -> te.mGlassTier,
- 1))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_BioVat> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_BioVat>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccccc", "ccccc", "ccccc", "ccccc", "ccccc" },
+ { "ggggg", "gaaag", "gaaag", "gaaag", "ggggg" },
+ { "ggggg", "gaaag", "gaaag", "gaaag", "ggggg" },
+ { "cc~cc", "ccccc", "ccccc", "ccccc", "ccccc" }, }))
+ .addElement(
+ 'c',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_BioVat::addMaintenanceToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(GT_TileEntity_BioVat::addOutputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(GT_TileEntity_BioVat::addInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(GT_TileEntity_BioVat::addRadiationInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(GT_TileEntity_BioVat::addEnergyInputToMachineList, CASING_INDEX, 1),
+ onElementPass(e -> e.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .addElement('a', ofChain(isAir(), ofBlockAnyMeta(FluidLoader.bioFluidBlock)))
+ .addElement(
+ 'g',
+ ofGlassTiered((byte) 1, (byte) 127, (byte) 0, (te, v) -> te.mGlassTier = v, te -> te.mGlassTier, 1))
+ .build();
@Override
public IStructureDefinition<GT_TileEntity_BioVat> getStructureDefinition() {
@@ -143,24 +133,16 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Bacterial Vat")
- .addInfo("Controller block for the Bacterial Vat")
- .addInfo("For maximum efficiency boost keep the Output Hatch always half filled!")
- .addSeparator()
- .beginStructureBlock(5, 4, 5, false)
- .addController("Front bottom center")
+ tt.addMachineType("Bacterial Vat").addInfo("Controller block for the Bacterial Vat")
+ .addInfo("For maximum efficiency boost keep the Output Hatch always half filled!").addSeparator()
+ .beginStructureBlock(5, 4, 5, false).addController("Front bottom center")
.addCasingInfo("Clean Stainless Steel Casings", 19)
.addOtherStructurePart("Glass", "Hollow two middle layers", 2)
.addStructureInfo("The glass can be any glass, i.e. Tinkers Construct Clear Glass")
- .addStructureInfo("Some Recipes need more advanced Glass Types")
- .addMaintenanceHatch("Any casing", 1)
- .addOtherStructurePart("Radio Hatch", "Any casing", 1)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addInputHatch("Any casing", 1)
- .addOutputHatch("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ .addStructureInfo("Some Recipes need more advanced Glass Types").addMaintenanceHatch("Any casing", 1)
+ .addOtherStructurePart("Radio Hatch", "Any casing", 1).addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1).addInputHatch("Any casing", 1).addOutputHatch("Any casing", 1)
+ .addEnergyHatch("Any casing", 1).toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -182,15 +164,11 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
}
private int getInputCapacity() {
- return this.mInputHatches.stream()
- .mapToInt(GT_MetaTileEntity_Hatch_Input::getCapacity)
- .sum();
+ return this.mInputHatches.stream().mapToInt(GT_MetaTileEntity_Hatch_Input::getCapacity).sum();
}
private int getOutputCapacity() {
- return this.mOutputHatches.stream()
- .mapToInt(GT_MetaTileEntity_Hatch_Output::getCapacity)
- .sum();
+ return this.mOutputHatches.stream().mapToInt(GT_MetaTileEntity_Hatch_Output::getCapacity).sum();
}
@Override
@@ -218,8 +196,9 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
/**
* Calculates the expected output multiplier based on the output hatch
+ *
* @param recipeFluidOutput the recipe fluid output
- * @param needEqual if the recipeFluidOutput should be equal to the fluid in the output hatch
+ * @param needEqual if the recipeFluidOutput should be equal to the fluid in the output hatch
* @return the expected output multiplier
*/
private int getExpectedMultiplier(@Nullable FluidStack recipeFluidOutput, boolean needEqual) {
@@ -294,7 +273,13 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
long tEnergy = V[tTier];
GT_Recipe gtRecipe = gtRecipeMap.findRecipe(
- this.getBaseMetaTileEntity(), this.mLastRecipe, false, tEnergy, tFluids, itemStack, tInputs);
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ tEnergy,
+ tFluids,
+ itemStack,
+ tInputs);
if (gtRecipe == null) return false;
@@ -307,9 +292,9 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
this.mNeededSievert = conditions[3];
- if (conditions[2] == 0
- ? (this.mSievert < this.mNeededSievert || this.mGlassTier < conditions[0])
- : (this.mSievert != conditions[3] || this.mGlassTier < conditions[0])) return false;
+ if (conditions[2] == 0 ? (this.mSievert < this.mNeededSievert || this.mGlassTier < conditions[0])
+ : (this.mSievert != conditions[3] || this.mGlassTier < conditions[0]))
+ return false;
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
@@ -328,8 +313,8 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
}
}
- this.mOutputFluids =
- new FluidStack[] {new FluidStack(recipeFluidOutput, recipeFluidOutput.amount * this.mTimes)};
+ this.mOutputFluids = new FluidStack[] {
+ new FluidStack(recipeFluidOutput, recipeFluidOutput.amount * this.mTimes) };
BW_Util.calculateOverclockedNessMulti(gtRecipe.mEUt, gtRecipe.mDuration, 1, tEnergy, this);
@@ -372,8 +357,7 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 3, 0)) return false;
- return this.mCasing >= 19
- && this.mRadHatches.size() <= 1
+ return this.mCasing >= 19 && this.mRadHatches.size() <= 1
&& this.mOutputHatches.size() == 1
&& this.mMaintenanceHatches.size() == 1
&& this.mInputHatches.size() > 0
@@ -398,9 +382,8 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
private void sendAllRequiredRendererPackets() {
int height = this.reCalculateHeight();
if (this.mFluid != null && height > 1 && this.reCalculateFluidAmmount() > 0) {
- for (int x = -1; x < 2; x++)
- for (int y = 1; y < height; y++)
- for (int z = -1; z < 2; z++) this.sendPackagesOrRenewRenderer(x, y, z, this.mCulture);
+ for (int x = -1; x < 2; x++) for (int y = 1; y < height; y++)
+ for (int z = -1; z < 2; z++) this.sendPackagesOrRenewRenderer(x, y, z, this.mCulture);
}
}
@@ -408,11 +391,12 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 2;
int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 2;
- GT_TileEntity_BioVat.staticColorMap.remove(new Coords(
- xDir + x + this.getBaseMetaTileEntity().getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir + z + this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId));
+ GT_TileEntity_BioVat.staticColorMap.remove(
+ new Coords(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord(),
+ this.getBaseMetaTileEntity().getWorld().provider.dimensionId));
GT_TileEntity_BioVat.staticColorMap.put(
new Coords(
xDir + x + this.getBaseMetaTileEntity().getXCoord(),
@@ -462,8 +446,7 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
Chunk tChunk = aWorld.getChunkFromBlockCoords(
this.getBaseMetaTileEntity().getXCoord(),
this.getBaseMetaTileEntity().getZCoord());
- if (tPlayer.getServerForPlayer()
- .getPlayerManager()
+ if (tPlayer.getServerForPlayer().getPlayerManager()
.isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
if (!this.playerMPHashSet.contains(tPlayer)) {
this.playerMPHashSet.add(tPlayer);
@@ -480,39 +463,27 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 2;
int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 2;
this.height = this.reCalculateHeight();
- if (this.mFluid != null && this.height > 1 && this.reCalculateFluidAmmount() > 0)
- for (int x = -1; x < 2; x++) {
- for (int y = 0; y < this.height; y++) {
- for (int z = -1; z < 2; z++) {
- if (this.getBaseMetaTileEntity()
- .getWorld()
- .getBlock(
- xDir + x + this.getBaseMetaTileEntity().getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir + z + this.getBaseMetaTileEntity().getZCoord())
- .equals(Blocks.air))
- this.getBaseMetaTileEntity()
- .getWorld()
- .setBlock(
- xDir
- + x
- + this.getBaseMetaTileEntity()
- .getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir
- + z
- + this.getBaseMetaTileEntity()
- .getZCoord(),
- FluidLoader.bioFluidBlock);
- }
+ if (this.mFluid != null && this.height > 1 && this.reCalculateFluidAmmount() > 0) for (int x = -1; x < 2; x++) {
+ for (int y = 0; y < this.height; y++) {
+ for (int z = -1; z < 2; z++) {
+ if (this.getBaseMetaTileEntity().getWorld()
+ .getBlock(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord())
+ .equals(Blocks.air))
+ this.getBaseMetaTileEntity().getWorld().setBlock(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord(),
+ FluidLoader.bioFluidBlock);
}
}
+ }
}
private int reCalculateFluidAmmount() {
- return this.getStoredFluids().stream()
- .mapToInt(fluidStack -> fluidStack.amount)
- .sum();
+ return this.getStoredFluids().stream().mapToInt(fluidStack -> fluidStack.amount).sum();
}
private int reCalculateHeight() {
@@ -526,14 +497,8 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
if (this.mMachine) {
ItemStack aStack = this.mInventory[1];
BioCulture lCulture = null;
- int xDir = ForgeDirection.getOrientation(
- this.getBaseMetaTileEntity().getBackFacing())
- .offsetX
- * 2;
- int zDir = ForgeDirection.getOrientation(
- this.getBaseMetaTileEntity().getBackFacing())
- .offsetZ
- * 2;
+ int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 2;
+ int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 2;
if (this.getBaseMetaTileEntity().getTimer() % 200 == 0) {
this.check_Chunk();
@@ -541,44 +506,28 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
if (this.needsVisualUpdate
&& this.getBaseMetaTileEntity().getTimer() % GT_TileEntity_BioVat.TIMERDIVIDER == 0) {
- for (int x = -1; x < 2; x++)
- for (int y = 1; y < 3; y++)
- for (int z = -1; z < 2; z++)
- this.getBaseMetaTileEntity()
- .getWorld()
- .setBlockToAir(
- xDir
- + x
- + this.getBaseMetaTileEntity()
- .getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir
- + z
- + this.getBaseMetaTileEntity()
- .getZCoord());
+ for (int x = -1; x < 2; x++) for (int y = 1; y < 3; y++)
+ for (int z = -1; z < 2; z++) this.getBaseMetaTileEntity().getWorld().setBlockToAir(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord());
}
this.height = this.reCalculateHeight();
if (this.mFluid != null && this.height > 1 && this.reCalculateFluidAmmount() > 0) {
- if ((!(BW_Util.areStacksEqualOrNull(aStack, this.mStack)))
- || (this.needsVisualUpdate
- && this.getBaseMetaTileEntity().getTimer() % GT_TileEntity_BioVat.TIMERDIVIDER
- == 1)) {
+ if ((!(BW_Util.areStacksEqualOrNull(aStack, this.mStack))) || (this.needsVisualUpdate
+ && this.getBaseMetaTileEntity().getTimer() % GT_TileEntity_BioVat.TIMERDIVIDER == 1)) {
for (int x = -1; x < 2; x++) {
for (int y = 1; y < this.height; y++) {
for (int z = -1; z < 2; z++) {
if (aStack == null
|| aStack.getItem() instanceof LabParts && aStack.getItemDamage() == 0) {
- if (this.mCulture == null
- || aStack == null
+ if (this.mCulture == null || aStack == null
|| aStack.getTagCompound() == null
- || this.mCulture.getID()
- != aStack.getTagCompound()
- .getInteger("ID")) {
- lCulture = aStack == null || aStack.getTagCompound() == null
- ? null
- : BioCulture.getBioCulture(aStack.getTagCompound()
- .getString("Name"));
+ || this.mCulture.getID() != aStack.getTagCompound().getInteger("ID")) {
+ lCulture = aStack == null || aStack.getTagCompound() == null ? null
+ : BioCulture
+ .getBioCulture(aStack.getTagCompound().getString("Name"));
this.sendPackagesOrRenewRenderer(x, y, z, lCulture);
}
}
@@ -626,8 +575,8 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
aNBT.setString("mCulture", this.mCulture.getName());
else if ((this.mCulture == null || this.mCulture.getName().isEmpty())
&& !aNBT.getString("mCulture").isEmpty()) {
- aNBT.removeTag("mCulture");
- }
+ aNBT.removeTag("mCulture");
+ }
if (this.mFluid != null) aNBT.setString("mFluid", this.mFluid.getName());
aNBT.setInteger("mSievert", this.mSievert);
aNBT.setInteger("mNeededSievert", this.mNeededSievert);
@@ -641,46 +590,35 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
for (int x = -1; x < 2; x++) {
for (int y = 1; y < 3; y++) {
for (int z = -1; z < 2; z++) {
- if (this.getBaseMetaTileEntity()
- .getWorld()
+ if (this.getBaseMetaTileEntity().getWorld()
.getBlock(
xDir + x + this.getBaseMetaTileEntity().getXCoord(),
y + this.getBaseMetaTileEntity().getYCoord(),
zDir + z + this.getBaseMetaTileEntity().getZCoord())
.equals(FluidLoader.bioFluidBlock))
- this.getBaseMetaTileEntity()
- .getWorld()
- .setBlockToAir(
- xDir + x + this.getBaseMetaTileEntity().getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir + z + this.getBaseMetaTileEntity().getZCoord());
+ this.getBaseMetaTileEntity().getWorld().setBlockToAir(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord());
GT_TileEntity_BioVat.staticColorMap.remove(
new Coords(
xDir + x + this.getBaseMetaTileEntity().getXCoord(),
y + this.getBaseMetaTileEntity().getYCoord(),
zDir + z + this.getBaseMetaTileEntity().getZCoord()),
this.getBaseMetaTileEntity().getWorld().provider.dimensionId);
- if (SideReference.Side.Server)
- MainMod.BW_Network_instance.sendPacketToAllPlayersInRange(
- this.getBaseMetaTileEntity().getWorld(),
- new RendererPacket(
- new Coords(
- xDir
- + x
- + this.getBaseMetaTileEntity()
- .getXCoord(),
- y + this.getBaseMetaTileEntity().getYCoord(),
- zDir
- + z
- + this.getBaseMetaTileEntity()
- .getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId),
- this.mCulture == null
- ? BioCulture.NULLCULTURE.getColorRGB()
- : this.mCulture.getColorRGB(),
- true),
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getZCoord());
+ if (SideReference.Side.Server) MainMod.BW_Network_instance.sendPacketToAllPlayersInRange(
+ this.getBaseMetaTileEntity().getWorld(),
+ new RendererPacket(
+ new Coords(
+ xDir + x + this.getBaseMetaTileEntity().getXCoord(),
+ y + this.getBaseMetaTileEntity().getYCoord(),
+ zDir + z + this.getBaseMetaTileEntity().getZCoord(),
+ this.getBaseMetaTileEntity().getWorld().provider.dimensionId),
+ this.mCulture == null ? BioCulture.NULLCULTURE.getColorRGB()
+ : this.mCulture.getColorRGB(),
+ true),
+ this.getBaseMetaTileEntity().getXCoord(),
+ this.getBaseMetaTileEntity().getZCoord());
}
}
}
@@ -708,41 +646,19 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@Override
@@ -759,13 +675,15 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBa
// here we must check the machine is well-formed as otherwise getExpectedMultiplier might error out!
infoData[infoData.length - 2] = StatCollector.translateToLocal("BW.infoData.BioVat.expectedProduction") + ": "
+ EnumChatFormatting.GREEN
- + (mMachine
- ? (mMaxProgresstime <= 0 ? getExpectedMultiplier(null, false) : mExpectedMultiplier) * 100
+ + (mMachine ? (mMaxProgresstime <= 0 ? getExpectedMultiplier(null, false) : mExpectedMultiplier) * 100
: -1)
- + EnumChatFormatting.RESET + " %";
- infoData[infoData.length - 1] =
- StatCollector.translateToLocal("BW.infoData.BioVat.production") + ": " + EnumChatFormatting.GREEN
- + (mMaxProgresstime <= 0 ? 0 : mTimes) * 100 + EnumChatFormatting.RESET + " %";
+ + EnumChatFormatting.RESET
+ + " %";
+ infoData[infoData.length - 1] = StatCollector.translateToLocal("BW.infoData.BioVat.production") + ": "
+ + EnumChatFormatting.GREEN
+ + (mMaxProgresstime <= 0 ? 0 : mTimes) * 100
+ + EnumChatFormatting.RESET
+ + " %";
return infoData;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java
index d3254fc894..01cf3bd854 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -31,6 +22,14 @@ import static gregtech.api.enums.SoundResource.IC2_MACHINES_MAGNETIZER_LOOP;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_Meta_Items;
import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
@@ -40,6 +39,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -54,59 +54,39 @@ import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-public class GT_TileEntity_CircuitAssemblyLine
- extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_CircuitAssemblyLine>
- implements ISurvivalConstructable {
+public class GT_TileEntity_CircuitAssemblyLine extends
+ GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_CircuitAssemblyLine> implements ISurvivalConstructable {
private static final int CASING_INDEX = 16;
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_NEXT = "next";
- private static final IStructureDefinition<GT_TileEntity_CircuitAssemblyLine> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_CircuitAssemblyLine>builder()
- .addShape(STRUCTURE_PIECE_FIRST, transpose(new String[][] {
- {"~", "G", "G"},
- {"g", "l", "g"},
- {"b", "i", "b"},
- }))
- .addShape(STRUCTURE_PIECE_NEXT, transpose(new String[][] {
- {"G", "G", "G"},
- {"g", "l", "g"},
- {"b", "I", "b"},
- }))
- .addElement(
- 'G',
- buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class)
- .atLeast(Energy)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(GregTech_API.sBlockCasings3, 10))
- .addElement('g', ofGlassTieredMixed((byte) 4, (byte) 127, 5))
- .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casings
- .addElement(
- 'b',
- buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class)
- .atLeast(InputHatch, Maintenance)
- .casingIndex(CASING_INDEX)
- .dot(2)
- .buildAndChain(GregTech_API.sBlockCasings2, 0))
- .addElement('i', InputBus.newAny(CASING_INDEX, 3))
- .addElement(
- 'I',
- buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class)
- .atLeast(InputHatch, InputBus, OutputBus)
- .casingIndex(CASING_INDEX)
- .dot(2)
- .buildAndChain(GregTech_API.sBlockCasings2, 0))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_CircuitAssemblyLine> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_CircuitAssemblyLine>builder()
+ .addShape(
+ STRUCTURE_PIECE_FIRST,
+ transpose(new String[][] { { "~", "G", "G" }, { "g", "l", "g" }, { "b", "i", "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_NEXT,
+ transpose(new String[][] { { "G", "G", "G" }, { "g", "l", "g" }, { "b", "I", "b" }, }))
+ .addElement(
+ 'G',
+ buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class).atLeast(Energy).casingIndex(CASING_INDEX)
+ .dot(1).buildAndChain(GregTech_API.sBlockCasings3, 10))
+ .addElement('g', ofGlassTieredMixed((byte) 4, (byte) 127, 5))
+ .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casings
+ .addElement(
+ 'b',
+ buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class).atLeast(InputHatch, Maintenance)
+ .casingIndex(CASING_INDEX).dot(2).buildAndChain(GregTech_API.sBlockCasings2, 0))
+ .addElement('i', InputBus.newAny(CASING_INDEX, 3))
+ .addElement(
+ 'I',
+ buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class).atLeast(InputHatch, InputBus, OutputBus)
+ .casingIndex(CASING_INDEX).dot(2).buildAndChain(GregTech_API.sBlockCasings2, 0))
+ .build();
@Override
public IStructureDefinition<GT_TileEntity_CircuitAssemblyLine> getStructureDefinition() {
@@ -115,15 +95,12 @@ public class GT_TileEntity_CircuitAssemblyLine
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Circuit Assembler")
- .addInfo("Controller block for the Circuit Assembly Line")
+ tt.addMachineType("Circuit Assembler").addInfo("Controller block for the Circuit Assembly Line")
.addInfo("Imprint this machine with a Circuit Imprint,")
.addInfo("by putting the imprint in the controller")
.addInfo("Every Circuit Assembly Line can only be imprinted ONCE")
- .addInfo("Does not lose efficiency when overclocked")
- .addInfo(BW_Tooltip_Reference.TT_BLUEPRINT)
- .addSeparator()
- .beginVariableStructureBlock(2, 7, 3, 3, 3, 3, false)
+ .addInfo("Does not lose efficiency when overclocked").addInfo(BW_Tooltip_Reference.TT_BLUEPRINT)
+ .addSeparator().beginVariableStructureBlock(2, 7, 3, 3, 3, 3, false)
.addStructureInfo("From Bottom to Top, Left to Right")
.addStructureInfo(
"Layer 1 - Solid Steel Machine Casing, Input bus (Last Output bus), Solid Steel Machine Casing")
@@ -132,9 +109,10 @@ public class GT_TileEntity_CircuitAssemblyLine
.addStructureInfo("Up to 7 repeating slices, last is Output Bus")
.addController("Layer 3 first slice front")
.addOtherStructurePart(
- "1x " + StatCollector.translateToLocal("GT5U.MBTT.EnergyHatch"), "Any layer 3 casing", 1)
- .addInputHatch("Any layer 1 casing", 2)
- .addInputBus("As specified on layer 1", 3, 4)
+ "1x " + StatCollector.translateToLocal("GT5U.MBTT.EnergyHatch"),
+ "Any layer 3 casing",
+ 1)
+ .addInputHatch("Any layer 1 casing", 2).addInputBus("As specified on layer 1", 3, 4)
.addOutputBus("As specified in final slice on layer 1", 4)
.addOtherStructurePart("EV+ Tier Glass", "As specified on layer 2", 5)
.addMaintenanceHatch("Any layer 1 casing", 2)
@@ -162,8 +140,7 @@ public class GT_TileEntity_CircuitAssemblyLine
private boolean imprintMachine(ItemStack itemStack) {
if (!this.type.equals(new NBTTagCompound())) return true;
if (!GT_Utility.isStackValid(itemStack)) return false;
- if (itemStack.getItem() instanceof BW_Meta_Items.BW_GT_MetaGenCircuits
- && itemStack.getItemDamage() == 0
+ if (itemStack.getItem() instanceof BW_Meta_Items.BW_GT_MetaGenCircuits && itemStack.getItemDamage() == 0
&& itemStack.getTagCompound() != null
&& this.type.equals(new NBTTagCompound())) {
this.type = itemStack.getTagCompound();
@@ -211,12 +188,11 @@ public class GT_TileEntity_CircuitAssemblyLine
public boolean checkRecipe(ItemStack itemStack) {
if (this.type.equals(new NBTTagCompound())) if (!this.imprintMachine(itemStack)) return false;
- if (this.bufferedRecipe != null
- && this.bufferedRecipe.isRecipeInputEqual(
- true,
- false,
- BW_Util.getFluidsFromInputHatches(this),
- getStoredInputs().toArray(new ItemStack[0]))) {
+ if (this.bufferedRecipe != null && this.bufferedRecipe.isRecipeInputEqual(
+ true,
+ false,
+ BW_Util.getFluidsFromInputHatches(this),
+ getStoredInputs().toArray(new ItemStack[0]))) {
setRecipeStats();
return true;
}
@@ -238,7 +214,8 @@ public class GT_TileEntity_CircuitAssemblyLine
true,
false,
BW_Util.getFluidsFromInputHatches(this),
- getStoredInputs().toArray(new ItemStack[0]))) this.bufferedRecipe = recipe;
+ getStoredInputs().toArray(new ItemStack[0])))
+ this.bufferedRecipe = recipe;
else continue;
this.setRecipeStats();
@@ -249,7 +226,10 @@ public class GT_TileEntity_CircuitAssemblyLine
private void setRecipeStats() {
calculatePerfectOverclockedNessMulti(
- this.bufferedRecipe.mEUt, this.bufferedRecipe.mDuration, 1, this.getMaxInputVoltage());
+ this.bufferedRecipe.mEUt,
+ this.bufferedRecipe.mDuration,
+ 1,
+ this.getMaxInputVoltage());
if (this.mEUt > 0) this.mEUt = -this.mEUt;
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
@@ -349,48 +329,24 @@ public class GT_TileEntity_CircuitAssemblyLine
String[] oldInfo = super.getInfoData();
infoDataBuffer = new String[oldInfo.length + 1];
System.arraycopy(oldInfo, 0, infoDataBuffer, 0, oldInfo.length);
- infoDataBuffer[oldInfo.length] = "Imprinted with: "
- + GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(
- CircuitImprintLoader.getStackFromTag(this.type)));
+ infoDataBuffer[oldInfo.length] = "Imprinted with: " + GT_LanguageManager.getTranslation(
+ GT_LanguageManager.getTranslateableItemStackName(CircuitImprintLoader.getStackFromTag(this.type)));
return infoDataBuffer;
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CrackingDistillTower.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CrackingDistillTower.java
index 268a26686d..2f14088a3d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CrackingDistillTower.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CrackingDistillTower.java
@@ -1,37 +1,31 @@
/*
- * 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.common.tileentities.multis;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.bartworks.util.MathUtils;
+
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DistillationTower;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_CrackingDistillTower extends GT_MetaTileEntity_DistillationTower {
@@ -57,11 +51,14 @@ public class GT_TileEntity_CrackingDistillTower extends GT_MetaTileEntity_Distil
array = fluidInputs.toArray(array);
GT_Recipe.GT_Recipe_Map rMapCracking = GT_Recipe.GT_Recipe_Map.sCrakingRecipes;
GT_Recipe.GT_Recipe_Map rMapDistillTower = GT_Recipe.GT_Recipe_Map.sDistillationRecipes;
- GT_Recipe recipeCracking = rMapCracking.findRecipe(
- this.getBaseMetaTileEntity(), false, this.getMaxInputVoltage(), array, itemStack);
+ GT_Recipe recipeCracking = rMapCracking
+ .findRecipe(this.getBaseMetaTileEntity(), false, this.getMaxInputVoltage(), array, itemStack);
if (recipeCracking == null) return false;
GT_Recipe recipeDistill = rMapDistillTower.findRecipe(
- this.getBaseMetaTileEntity(), false, this.getMaxInputVoltage(), recipeCracking.mFluidOutputs);
+ this.getBaseMetaTileEntity(),
+ false,
+ this.getMaxInputVoltage(),
+ recipeCracking.mFluidOutputs);
if (recipeDistill == null) return false;
float ratio = (float) recipeCracking.mFluidOutputs[0].amount / (float) recipeDistill.mFluidInputs[0].amount;
FluidStack[] nuoutputs = new FluidStack[recipeDistill.mFluidOutputs.length];
@@ -84,7 +81,11 @@ public class GT_TileEntity_CrackingDistillTower extends GT_MetaTileEntity_Distil
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
BW_Util.calculateOverclockedNessMulti(
- combined.mEUt, combined.mDuration, 1, this.getMaxInputVoltage(), this);
+ combined.mEUt,
+ combined.mDuration,
+ 1,
+ this.getMaxInputVoltage(),
+ this);
if (this.mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) return false;
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
index a420fa6933..90cbda832b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -25,7 +16,17 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis;
import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
import static gregtech.api.enums.GT_Values.VN;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -38,15 +39,9 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
+
private static float nulearHeatMod = 2f;
private byte mMode;
private byte mTier;
@@ -69,12 +64,8 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
Field f = c.getDeclaredField("huOutputModifier");
f.setAccessible(true);
GT_TileEntity_DEHP.nulearHeatMod = f.getFloat(f);
- } catch (SecurityException
- | IllegalArgumentException
- | ExceptionInInitializerError
- | NullPointerException
- | IllegalAccessException
- | NoSuchFieldException e) {
+ } catch (SecurityException | IllegalArgumentException | ExceptionInInitializerError | NullPointerException
+ | IllegalAccessException | NoSuchFieldException e) {
e.printStackTrace();
}
super.onConfigLoad(aConfig);
@@ -103,35 +94,31 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
String casings = getCasingBlockItem().get(0).getDisplayName();
- tt.addMachineType("Geothermal Heat Pump")
- .addInfo("Consumes " + GT_Values.V[this.mTier + 2] + "EU/t")
+ tt.addMachineType("Geothermal Heat Pump").addInfo("Consumes " + GT_Values.V[this.mTier + 2] + "EU/t")
.addInfo("Has 4 Modes, use the Screwdriver to change them:");
if (ConfigHandler.DEHPDirectSteam) {
tt.addInfo("0 Idle, 1 Steam, 2 Superheated Steam (requires Distilled Water), 3 Retract")
.addInfo("Explodes when it runs out of Water/Distilled Water")
- .addInfo("Converts " + (long) (this.mTier * 1200 * 20)
- + "L/s Water(minus 10% per Maintenance Problem) to Steam")
- .addInfo("Converts " + (long) (this.mTier * 600 * 20)
- + "L/s Distilled Water(minus 10% per Maintenance Problem) to SuperheatedSteam");
+ .addInfo(
+ "Converts " + (long) (this.mTier * 1200 * 20)
+ + "L/s Water(minus 10% per Maintenance Problem) to Steam")
+ .addInfo(
+ "Converts " + (long) (this.mTier * 600 * 20)
+ + "L/s Distilled Water(minus 10% per Maintenance Problem) to SuperheatedSteam");
} else {
tt.addInfo("0 Idle, 1 & 2 Coolant Heating Mode (no Difference between them), 3 Retract")
- .addInfo("Explodes when it runs out of Coolant")
- .addInfo("Heats up " + (long) (this.mTier * 24 * ((double) GT_TileEntity_DEHP.nulearHeatMod)) * 20
- + "L/s Coolant(minus 10% per Maintenance Problem)");
+ .addInfo("Explodes when it runs out of Coolant").addInfo(
+ "Heats up " + (long) (this.mTier * 24 * ((double) GT_TileEntity_DEHP.nulearHeatMod)) * 20
+ + "L/s Coolant(minus 10% per Maintenance Problem)");
}
- tt.addSeparator()
- .beginStructureBlock(3, 7, 3, false)
- .addController("Front bottom")
+ tt.addSeparator().beginStructureBlock(3, 7, 3, false).addController("Front bottom")
.addOtherStructurePart(casings, "form the 3x1x3 Base")
.addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
.addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing")
- .addMaintenanceHatch("Any base casing")
- .addInputBus("Mining Pipes, optional, any base casing")
- .addInputHatch("Any base casing")
- .addOutputHatch("Any base casing")
- .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing").addMaintenanceHatch("Any base casing")
+ .addInputBus("Mining Pipes, optional, any base casing").addInputHatch("Any base casing")
+ .addOutputHatch("Any base casing").toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
return tt;
}
@@ -174,22 +161,21 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
if (onlyDistilled) toConsume1 = toConsume2;
long ret = 0;
for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches) {
- if (ih.getFluid().getFluid().equals(toConsume1)
- || ih.getFluid().getFluid().equals(toConsume2)) ret += ih.getFluidAmount();
+ if (ih.getFluid().getFluid().equals(toConsume1) || ih.getFluid().getFluid().equals(toConsume2))
+ ret += ih.getFluidAmount();
}
return ret;
}
@Override
- protected boolean workingUpward(
- ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe,
+ int yHead, int oldYHead) {
if (this.mMode != 3) {
this.isPickingPipes = false;
try {
Field workState = this.getClass().getField("workState");
workState.setInt(this, 0);
- } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException ignored) {
- }
+ } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException ignored) {}
return true;
}
return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
@@ -204,15 +190,14 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
}
- protected boolean workingDownward(
- ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe,
+ int yHead, int oldYHead) {
if (this.mMode == 3) {
this.isPickingPipes = true;
try {
Field workState = this.getClass().getSuperclass().getDeclaredField("workState");
workState.setInt(this, 2);
- } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException ignored) {
- }
+ } catch (NoSuchFieldError | NoSuchFieldException | IllegalAccessException ignored) {}
return true;
}
@@ -247,8 +232,7 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
}
} else {
if (this.mMode == 1 || this.mMode == 2) {
- long coolantConverted = (long) (this.mTier
- * 24
+ long coolantConverted = (long) (this.mTier * 24
* ((double) GT_TileEntity_DEHP.nulearHeatMod)
* this.mEfficiency
/ 10000L);
@@ -276,11 +260,9 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches) {
if (fluid.equals(FluidRegistry.WATER)
? ih.getFluid().getFluid().equals(fluid)
- || ih.getFluid()
- .getFluid()
- .equals(GT_ModHandler.getDistilledWater(1)
- .getFluid())
- : ih.getFluid().getFluid().equals(fluid)) tmp[i] -= ih.drain((int) ammount, true).amount;
+ || ih.getFluid().getFluid().equals(GT_ModHandler.getDistilledWater(1).getFluid())
+ : ih.getFluid().getFluid().equals(fluid))
+ tmp[i] -= ih.drain((int) ammount, true).amount;
if (tmp[i] <= 0) break;
}
}
@@ -292,10 +274,9 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches) {
if (fluid.equals(FluidRegistry.WATER)
? ih.getFluid().getFluid().equals(fluid)
- || ih.getFluid()
- .getFluid()
- .equals(GT_ModHandler.getDistilledWater(1).getFluid())
- : ih.getFluid().getFluid().equals(fluid)) tmp -= ih.drain((int) ammount, true).amount;
+ || ih.getFluid().getFluid().equals(GT_ModHandler.getDistilledWater(1).getFluid())
+ : ih.getFluid().getFluid().equals(fluid))
+ tmp -= ih.drain((int) ammount, true).amount;
if (tmp <= 0) return true;
}
return false;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
index 17ddf53248..c4e89b4105 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -29,6 +20,15 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.client.renderer.BW_EICPistonVisualizer;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -41,6 +41,7 @@ import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -55,13 +56,6 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import net.minecraft.client.Minecraft;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_ElectricImplosionCompressor
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_ElectricImplosionCompressor> {
@@ -82,110 +76,78 @@ public class GT_TileEntity_ElectricImplosionCompressor
private static final int CASING_INDEX = 16;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_ElectricImplosionCompressor> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_ElectricImplosionCompressor>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {"ccc", "cec", "ccc"},
- {"ttt", "tft", "ttt"},
- {"ttt", "tft", "ttt"},
- {"nnn", "nnn", "nnn"},
- {"nNn", "NNN", "nNn"},
- {"nnn", "nnn", "nnn"},
- {"t~t", "tft", "ttt"},
- {"ttt", "tft", "ttt"},
- {"CCC", "CeC", "CCC"},
- }))
- .addElement(
- 'c',
- ofChain(ofBlock(GregTech_API.sBlockCasings2, 0), ofBlock(GregTech_API.sBlockCasings3, 4)))
- .addElement('t', ofBlock(BW_BLOCKS[2], 1))
- .addElement('f', ofBlock(BW_BLOCKS[2], 0))
- .addElement('n', ofBlock(GregTech_API.sBlockMetal5, 2))
- .addElement(
- 'C',
- ofChain(
- ofHatchAdder(
- GT_TileEntity_ElectricImplosionCompressor::addInputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_TileEntity_ElectricImplosionCompressor::addOutputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_TileEntity_ElectricImplosionCompressor::addMaintenanceToMachineList,
- CASING_INDEX,
- 1),
- ofBlock(GregTech_API.sBlockCasings2, 0),
- ofBlock(GregTech_API.sBlockCasings3, 4)))
- .addElement(
- 'e',
+ private static final IStructureDefinition<GT_TileEntity_ElectricImplosionCompressor> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_ElectricImplosionCompressor>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccc", "cec", "ccc" }, { "ttt", "tft", "ttt" }, { "ttt", "tft", "ttt" },
+ { "nnn", "nnn", "nnn" }, { "nNn", "NNN", "nNn" }, { "nnn", "nnn", "nnn" },
+ { "t~t", "tft", "ttt" }, { "ttt", "tft", "ttt" }, { "CCC", "CeC", "CCC" }, }))
+ .addElement('c', ofChain(ofBlock(GregTech_API.sBlockCasings2, 0), ofBlock(GregTech_API.sBlockCasings3, 4)))
+ .addElement('t', ofBlock(BW_BLOCKS[2], 1)).addElement('f', ofBlock(BW_BLOCKS[2], 0))
+ .addElement('n', ofBlock(GregTech_API.sBlockMetal5, 2))
+ .addElement(
+ 'C',
+ ofChain(
ofHatchAdder(
- GT_TileEntity_ElectricImplosionCompressor::addEnergyInputToMachineList,
+ GT_TileEntity_ElectricImplosionCompressor::addInputToMachineList,
CASING_INDEX,
- 2))
- .addElement('N', new IStructureElement<GT_TileEntity_ElectricImplosionCompressor>() {
-
- @Override
- public boolean check(
- GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y, int z) {
- if (!te.piston && !world.isAirBlock(x, y, z)) return false;
- if (te.piston
- && !(world.getBlock(x, y, z) == GregTech_API.sBlockMetal5
- && world.getBlockMetadata(x, y, z) == 2)) return false;
- return true;
- }
-
- @Override
- public boolean spawnHint(
- GT_TileEntity_ElectricImplosionCompressor te,
- World world,
- int x,
- int y,
- int z,
- ItemStack itemStack) {
- if (te.piston) StructureLibAPI.hintParticle(world, x, y, z, GregTech_API.sBlockMetal5, 2);
- return true;
- }
-
- @Override
- public boolean placeBlock(
- GT_TileEntity_ElectricImplosionCompressor te,
- World world,
- int x,
- int y,
- int z,
- ItemStack itemStack) {
- if (te.piston) world.setBlock(x, y, z, GregTech_API.sBlockMetal5, 2, 3);
- else world.setBlockToAir(x, y, z);
- return true;
- }
-
- @Override
- public BlocksToPlace getBlocksToPlace(
- GT_TileEntity_ElectricImplosionCompressor t,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger,
- AutoPlaceEnvironment env) {
- return BlocksToPlace.createEmpty();
- }
-
- @Override
- public PlaceResult survivalPlaceBlock(
- GT_TileEntity_ElectricImplosionCompressor t,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger,
- AutoPlaceEnvironment env) {
- return isAir().survivalPlaceBlock(t, world, x, y, z, trigger, env);
- }
- })
- .build();
+ 1),
+ ofHatchAdder(
+ GT_TileEntity_ElectricImplosionCompressor::addOutputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_TileEntity_ElectricImplosionCompressor::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 1),
+ ofBlock(GregTech_API.sBlockCasings2, 0),
+ ofBlock(GregTech_API.sBlockCasings3, 4)))
+ .addElement(
+ 'e',
+ ofHatchAdder(
+ GT_TileEntity_ElectricImplosionCompressor::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 2))
+ .addElement('N', new IStructureElement<GT_TileEntity_ElectricImplosionCompressor>() {
+
+ @Override
+ public boolean check(GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y, int z) {
+ if (!te.piston && !world.isAirBlock(x, y, z)) return false;
+ if (te.piston && !(world.getBlock(x, y, z) == GregTech_API.sBlockMetal5
+ && world.getBlockMetadata(x, y, z) == 2))
+ return false;
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y, int z,
+ ItemStack itemStack) {
+ if (te.piston) StructureLibAPI.hintParticle(world, x, y, z, GregTech_API.sBlockMetal5, 2);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y,
+ int z, ItemStack itemStack) {
+ if (te.piston) world.setBlock(x, y, z, GregTech_API.sBlockMetal5, 2, 3);
+ else world.setBlockToAir(x, y, z);
+ return true;
+ }
+
+ @Override
+ public BlocksToPlace getBlocksToPlace(GT_TileEntity_ElectricImplosionCompressor t, World world, int x,
+ int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ return BlocksToPlace.createEmpty();
+ }
+
+ @Override
+ public PlaceResult survivalPlaceBlock(GT_TileEntity_ElectricImplosionCompressor t, World world, int x,
+ int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ return isAir().survivalPlaceBlock(t, world, x, y, z, trigger, env);
+ }
+ }).build();
@Override
public IStructureDefinition<GT_TileEntity_ElectricImplosionCompressor> getStructureDefinition() {
@@ -200,23 +162,16 @@ public class GT_TileEntity_ElectricImplosionCompressor
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Implosion Compressor")
- .addInfo("Explosions are fun")
+ tt.addMachineType("Implosion Compressor").addInfo("Explosions are fun")
.addInfo("Controller block for the Electric Implosion Compressor")
- .addInfo("Uses electricity instead of Explosives")
- .addSeparator()
- .beginStructureBlock(3, 9, 3, false)
- .addController("Front 3rd layer center")
- .addCasingInfo("Solid Steel Machine Casing", 8)
+ .addInfo("Uses electricity instead of Explosives").addSeparator().beginStructureBlock(3, 9, 3, false)
+ .addController("Front 3rd layer center").addCasingInfo("Solid Steel Machine Casing", 8)
.addStructureInfo("Casings can be replaced with Explosion Warning Signs")
.addOtherStructurePart("Transformer-Winding Blocks", "Outer layer 2,3,7,8")
.addOtherStructurePart("Nickel-Zinc-Ferrite Blocks", "Inner layer 2,3,7,8")
- .addOtherStructurePart("Neutronium Blocks", "Layer 4,5,6")
- .addMaintenanceHatch("Any bottom casing", 1)
- .addInputBus("Any bottom casing", 1)
- .addInputHatch("Any bottom casing", 1)
- .addOutputBus("Any bottom casing", 1)
- .addEnergyHatch("Bottom and top middle", 2)
+ .addOtherStructurePart("Neutronium Blocks", "Layer 4,5,6").addMaintenanceHatch("Any bottom casing", 1)
+ .addInputBus("Any bottom casing", 1).addInputHatch("Any bottom casing", 1)
+ .addOutputBus("Any bottom casing", 1).addEnergyHatch("Bottom and top middle", 2)
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -224,8 +179,7 @@ public class GT_TileEntity_ElectricImplosionCompressor
@Override
public boolean checkRecipe(ItemStack aStack) {
- if (this.mEnergyHatches.get(0).getEUVar() <= 0
- || this.mEnergyHatches.get(1).getEUVar() <= 0) return false;
+ if (this.mEnergyHatches.get(0).getEUVar() <= 0 || this.mEnergyHatches.get(1).getEUVar() <= 0) return false;
ItemStack[] tItemInputs = getCompactedInputs();
FluidStack[] tFluidInputs = getCompactedFluids();
@@ -256,18 +210,17 @@ public class GT_TileEntity_ElectricImplosionCompressor
private void updateChunkCoordinates() {
chunkCoordinates.clear();
- for (int x = -1; x <= 1; x++)
- for (int z = -1; z <= 1; z++) {
- if (!(Math.abs(x) == 1 && Math.abs(z) == 1)) {
- int[] abc = new int[] {x, -2, z + 1};
- int[] xyz = new int[] {0, 0, 0};
- this.getExtendedFacing().getWorldOffset(abc, xyz);
- xyz[0] += this.getBaseMetaTileEntity().getXCoord();
- xyz[1] += this.getBaseMetaTileEntity().getYCoord();
- xyz[2] += this.getBaseMetaTileEntity().getZCoord();
- chunkCoordinates.add(new ChunkCoordinates(xyz[0], xyz[1], xyz[2]));
- }
+ for (int x = -1; x <= 1; x++) for (int z = -1; z <= 1; z++) {
+ if (!(Math.abs(x) == 1 && Math.abs(z) == 1)) {
+ int[] abc = new int[] { x, -2, z + 1 };
+ int[] xyz = new int[] { 0, 0, 0 };
+ this.getExtendedFacing().getWorldOffset(abc, xyz);
+ xyz[0] += this.getBaseMetaTileEntity().getXCoord();
+ xyz[1] += this.getBaseMetaTileEntity().getYCoord();
+ xyz[2] += this.getBaseMetaTileEntity().getZCoord();
+ chunkCoordinates.add(new ChunkCoordinates(xyz[0], xyz[1], xyz[2]));
}
+ }
}
@Override
@@ -282,7 +235,8 @@ public class GT_TileEntity_ElectricImplosionCompressor
GT_MetaTileEntity_Hatch_Energy h1 = this.mEnergyHatches.get(0), h2 = this.mEnergyHatches.get(1);
if (!isValidMetaTileEntity(h1) || !isValidMetaTileEntity(h2)) return false;
if (!h1.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU / 2, false)
- || !h2.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU / 2, false)) return false;
+ || !h2.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU / 2, false))
+ return false;
return true;
}
@@ -292,17 +246,16 @@ public class GT_TileEntity_ElectricImplosionCompressor
if (pistonEnabled && aBaseMetaTileEntity.isActive() && aTick % 20 == 0) {
if (aBaseMetaTileEntity.isClientSide()) animatePiston(aBaseMetaTileEntity);
- else if (aBaseMetaTileEntity.hasMufflerUpgrade())
- MainMod.BW_Network_instance.sendPacketToAllPlayersInRange(
- aBaseMetaTileEntity.getWorld(),
- new EICPacket(
- new Coords(
- aBaseMetaTileEntity.getXCoord(),
- aBaseMetaTileEntity.getYCoord(),
- aBaseMetaTileEntity.getZCoord()),
- true),
- aBaseMetaTileEntity.getXCoord(),
- aBaseMetaTileEntity.getZCoord());
+ else if (aBaseMetaTileEntity.hasMufflerUpgrade()) MainMod.BW_Network_instance.sendPacketToAllPlayersInRange(
+ aBaseMetaTileEntity.getWorld(),
+ new EICPacket(
+ new Coords(
+ aBaseMetaTileEntity.getXCoord(),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getZCoord()),
+ true),
+ aBaseMetaTileEntity.getXCoord(),
+ aBaseMetaTileEntity.getZCoord());
}
}
@@ -328,8 +281,9 @@ public class GT_TileEntity_ElectricImplosionCompressor
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
if (!aBaseMetaTileEntity.isServerSide()) return;
if (!this.piston) {
- chunkCoordinates.forEach(c ->
- aBaseMetaTileEntity.getWorld().setBlock(c.posX, c.posY, c.posZ, GregTech_API.sBlockMetal5, 2, 3));
+ chunkCoordinates.forEach(
+ c -> aBaseMetaTileEntity.getWorld()
+ .setBlock(c.posX, c.posY, c.posZ, GregTech_API.sBlockMetal5, 2, 3));
this.piston = !this.piston;
}
}
@@ -347,15 +301,14 @@ public class GT_TileEntity_ElectricImplosionCompressor
private void animatePiston(IGregTechTileEntity aBaseMetaTileEntity) {
if (!aBaseMetaTileEntity.getWorld().isRemote) return;
- if (!getBaseMetaTileEntity().hasMufflerUpgrade())
- GT_Utility.doSoundAtClient(
- sound,
- 10,
- 1f,
- 1f,
- chunkCoordinates.get(0).posX,
- chunkCoordinates.get(0).posY,
- chunkCoordinates.get(0).posZ);
+ if (!getBaseMetaTileEntity().hasMufflerUpgrade()) GT_Utility.doSoundAtClient(
+ sound,
+ 10,
+ 1f,
+ 1f,
+ chunkCoordinates.get(0).posX,
+ chunkCoordinates.get(0).posY,
+ chunkCoordinates.get(0).posZ);
spawnVisualPistonBlocks(
aBaseMetaTileEntity.getWorld(),
chunkCoordinates.get(2).posX,
@@ -420,41 +373,19 @@ public class GT_TileEntity_ElectricImplosionCompressor
return new GT_TileEntity_ElectricImplosionCompressor(this.mName);
}
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java
index 7ddfca22b2..28527a171a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java
@@ -1,18 +1,10 @@
/*
- * Copyright (C) 2022 kuba6000
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ * Copyright (C) 2022 kuba6000 This program is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.github.bartimaeusnek.bartworks.common.tileentities.multis;
@@ -23,6 +15,32 @@ import static gregtech.api.enums.GT_Values.AuthorKuba;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.io.IOException;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFlower;
+import net.minecraft.block.BlockStem;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.inventory.InventoryCrafting;
+import net.minecraft.item.*;
+import net.minecraft.item.crafting.CraftingManager;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.IPlantable;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.MainMod;
@@ -43,6 +61,7 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.api.widget.Widget;
import com.gtnewhorizons.modularui.common.widget.*;
+
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -68,30 +87,6 @@ import ic2.api.crops.CropCard;
import ic2.api.crops.Crops;
import ic2.core.Ic2Items;
import ic2.core.crop.TileEntityCrop;
-import java.io.IOException;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockFlower;
-import net.minecraft.block.BlockStem;
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.*;
-import net.minecraft.item.crafting.CraftingManager;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.IPlantable;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_ExtremeIndustrialGreenhouse
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_ExtremeIndustrialGreenhouse> {
@@ -113,63 +108,59 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
private static final String STRUCTURE_PIECE_MAIN = "main";
private static final Item forestryfertilizer = GameRegistry.findItem("Forestry", "fertilizerCompound");
private static final Fluid weedex = Materials.WeedEX9000.mFluid;
- private static final IStructureDefinition<GT_TileEntity_ExtremeIndustrialGreenhouse> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_ExtremeIndustrialGreenhouse>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {"ccccc", "ccccc", "ccccc", "ccccc", "ccccc"},
- {"ccccc", "clllc", "clllc", "clllc", "ccccc"},
- {"ggggg", "g---g", "g---g", "g---g", "ggggg"},
- {"ggggg", "g---g", "g---g", "g---g", "ggggg"},
- {"ccccc", "cdddc", "cdwdc", "cdddc", "ccccc"},
- {"cc~cc", "cCCCc", "cCCCc", "cCCCc", "ccccc"},
- }))
- .addElement(
- 'c',
- ofChain(
- onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)),
- ofHatchAdder(
- GT_TileEntity_ExtremeIndustrialGreenhouse::addEnergyInputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_TileEntity_ExtremeIndustrialGreenhouse::addMaintenanceToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_TileEntity_ExtremeIndustrialGreenhouse::addInputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_TileEntity_ExtremeIndustrialGreenhouse::addOutputToMachineList,
- CASING_INDEX,
- 1)))
- .addElement('C', onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)))
- .addElement(
- 'l',
- LoaderReference.ProjRedIllumination
- ? ofBlock(
- Block.getBlockFromName("ProjRed|Illumination:projectred.illumination.lamp"),
- 10)
- : ofBlock(Blocks.redstone_lamp, 0))
- .addElement(
- 'g',
- debug
- ? ofBlock(Blocks.glass, 0)
- : BorosilicateGlass.ofBoroGlass(
- (byte) 0,
- (byte) 1,
- Byte.MAX_VALUE,
- (te, t) -> te.glasTier = t,
- te -> te.glasTier))
- .addElement(
- 'd',
- ofBlock(
- LoaderReference.RandomThings
- ? Block.getBlockFromName("RandomThings:fertilizedDirt_tilled")
- : Blocks.farmland,
- 0))
- .addElement('w', ofBlock(Blocks.water, 0))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_ExtremeIndustrialGreenhouse> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_ExtremeIndustrialGreenhouse>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccccc", "ccccc", "ccccc", "ccccc", "ccccc" },
+ { "ccccc", "clllc", "clllc", "clllc", "ccccc" },
+ { "ggggg", "g---g", "g---g", "g---g", "ggggg" },
+ { "ggggg", "g---g", "g---g", "g---g", "ggggg" },
+ { "ccccc", "cdddc", "cdwdc", "cdddc", "ccccc" },
+ { "cc~cc", "cCCCc", "cCCCc", "cCCCc", "ccccc" }, }))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)),
+ ofHatchAdder(
+ GT_TileEntity_ExtremeIndustrialGreenhouse::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_TileEntity_ExtremeIndustrialGreenhouse::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_TileEntity_ExtremeIndustrialGreenhouse::addInputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_TileEntity_ExtremeIndustrialGreenhouse::addOutputToMachineList,
+ CASING_INDEX,
+ 1)))
+ .addElement('C', onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)))
+ .addElement(
+ 'l',
+ LoaderReference.ProjRedIllumination
+ ? ofBlock(Block.getBlockFromName("ProjRed|Illumination:projectred.illumination.lamp"), 10)
+ : ofBlock(Blocks.redstone_lamp, 0))
+ .addElement(
+ 'g',
+ debug ? ofBlock(Blocks.glass, 0)
+ : BorosilicateGlass.ofBoroGlass(
+ (byte) 0,
+ (byte) 1,
+ Byte.MAX_VALUE,
+ (te, t) -> te.glasTier = t,
+ te -> te.glasTier))
+ .addElement(
+ 'd',
+ ofBlock(
+ LoaderReference.RandomThings ? Block.getBlockFromName("RandomThings:fertilizedDirt_tilled")
+ : Blocks.farmland,
+ 0))
+ .addElement('w', ofBlock(Blocks.water, 0)).build();
public GT_TileEntity_ExtremeIndustrialGreenhouse(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -201,16 +192,14 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
if (this.setupphase == 3) this.setupphase = 0;
GT_Utility.sendChatToPlayer(
aPlayer,
- "EIG is now running in "
- + (this.setupphase == 1
- ? "setup mode (input)."
- : (this.setupphase == 2 ? "setup mode (output)." : "normal operation.")));
+ "EIG is now running in " + (this.setupphase == 1 ? "setup mode (input)."
+ : (this.setupphase == 2 ? "setup mode (output)." : "normal operation.")));
}
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
isNoHumidity = !isNoHumidity;
GT_Utility.sendChatToPlayer(aPlayer, "Give incoming crops no humidity " + isNoHumidity);
return true;
@@ -238,10 +227,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Crop Farm")
- .addInfo("Controller block for the Extreme Industrial Greenhouse")
- .addInfo(AuthorKuba)
- .addInfo("Grow your crops like a chad !")
+ tt.addMachineType("Crop Farm").addInfo("Controller block for the Extreme Industrial Greenhouse")
+ .addInfo(AuthorKuba).addInfo("Grow your crops like a chad !")
.addInfo("Use screwdriver to enable/change/disable setup mode")
.addInfo("Use screwdriver while sneaking to enable/disable IC2 mode")
.addInfo("Use wire cutters to give incoming IC2 crops 0 humidity")
@@ -249,15 +236,13 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
.addInfo("If there are >= 1000 crops -> Uses 1L of Weed-EX 9000 per crop per second")
.addInfo("Otherwise, around 1% of crops will die each operation")
.addInfo("You can insert fertilizer each operation to get more drops (max +400%)")
- .addInfo("-------------------- SETUP MODE --------------------")
- .addInfo("Does not take power")
+ .addInfo("-------------------- SETUP MODE --------------------").addInfo("Does not take power")
.addInfo("There are two modes: input / output")
.addInfo("Input mode: machine will take seeds from input bus and plant them")
.addInfo("[IC2] You need to also input block that is required under the crop")
.addInfo("Output mode: machine will take planted seeds and output them")
.addInfo("-------------------- NORMAL CROPS --------------------")
- .addInfo("Minimal tier: " + tierString(4))
- .addInfo("Starting with 1 slot")
+ .addInfo("Minimal tier: " + tierString(4)).addInfo("Starting with 1 slot")
.addInfo("Every slot gives 64 crops")
.addInfo("Every tier past " + tierString(4) + ", slots are multiplied by 2")
.addInfo("Base process time: 5 sec")
@@ -266,18 +251,12 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
.addInfo("Will automatically craft seeds if they are not dropped")
.addInfo("1 Fertilizer per 1 crop +200%")
.addInfo("-------------------- IC2 CROPS --------------------")
- .addInfo("Minimal tier: " + tierString(6))
- .addInfo("Need " + tierString(6) + " glass tier")
- .addInfo("Starting with 4 slots")
- .addInfo("Every slot gives 1 crop")
+ .addInfo("Minimal tier: " + tierString(6)).addInfo("Need " + tierString(6) + " glass tier")
+ .addInfo("Starting with 4 slots").addInfo("Every slot gives 1 crop")
.addInfo("Every tier past " + tierString(6) + ", slots are multiplied by 4")
- .addInfo("Process time: 5 sec")
- .addInfo("All crops are accelerated by x32 times")
- .addInfo("1 Fertilizer per 1 crop +10%")
- .addInfo(BW_Tooltip_Reference.TT_BLUEPRINT)
- .addSeparator()
- .beginStructureBlock(5, 6, 5, false)
- .addController("Front bottom center")
+ .addInfo("Process time: 5 sec").addInfo("All crops are accelerated by x32 times")
+ .addInfo("1 Fertilizer per 1 crop +10%").addInfo(BW_Tooltip_Reference.TT_BLUEPRINT).addSeparator()
+ .beginStructureBlock(5, 6, 5, false).addController("Front bottom center")
.addCasingInfo("Clean Stainless Steel Casings", 70)
.addOtherStructurePart("Borosilicate Glass", "Hollow two middle layers")
.addStructureInfo("The glass tier limits the Energy Input tier")
@@ -309,8 +288,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
aNBT.setBoolean("isIC2Mode", isIC2Mode);
aNBT.setBoolean("isNoHumidity", isNoHumidity);
aNBT.setInteger("mStorageSize", mStorage.size());
- for (int i = 0; i < mStorage.size(); i++)
- aNBT.setTag("mStorage." + i, mStorage.get(i).toNBTTagCompound());
+ for (int i = 0; i < mStorage.size(); i++) aNBT.setTag("mStorage." + i, mStorage.get(i).toNBTTagCompound());
}
@Override
@@ -336,8 +314,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isClientSide()) {
if (aBaseMetaTileEntity.isActive() && aTick % 40 == 0) {
- int[] abc = new int[] {0, -2, 2};
- int[] xyz = new int[] {0, 0, 0};
+ int[] abc = new int[] { 0, -2, 2 };
+ int[] xyz = new int[] { 0, 0, 0 };
this.getExtendedFacing().getWorldOffset(abc, xyz);
xyz[0] += aBaseMetaTileEntity.getXCoord();
xyz[1] += aBaseMetaTileEntity.getYCoord();
@@ -384,8 +362,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
updateMaxSlots();
if (oldVersion != EIG_MATH_VERSION) {
- for (GreenHouseSlot slot : mStorage)
- slot.recalculate(this, getBaseMetaTileEntity().getWorld());
+ for (GreenHouseSlot slot : mStorage) slot.recalculate(this, getBaseMetaTileEntity().getWorld());
oldVersion = EIG_MATH_VERSION;
}
@@ -413,8 +390,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
while (mStorage.size() > 0) {
if (!ignoreEmptiness && (emptySlots -= 2) < 0) break;
this.addOutput(this.mStorage.get(0).input.copy());
- if (this.mStorage.get(0).undercrop != null)
- this.addOutput(this.mStorage.get(0).undercrop.copy());
+ if (this.mStorage.get(0).undercrop != null) this.addOutput(this.mStorage.get(0).undercrop.copy());
this.mStorage.remove(0);
}
}
@@ -466,7 +442,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
if (weedexusage > 0 && !this.depleteInput(new FluidStack(weedex, isIC2Mode ? weedexusage * 5 : weedexusage))) {
IGregTechTileEntity baseMTE = this.getBaseMetaTileEntity();
int tokill = baseMTE.getRandomNumber((int) ((double) weedexusage * 0.02d) + 1);
- for (int i = 0; i < tokill; ) {
+ for (int i = 0; i < tokill;) {
GreenHouseSlot removed = mStorage.remove(baseMTE.getRandomNumber(mStorage.size()));
i -= removed.input.stackSize;
}
@@ -474,7 +450,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
// OVERCLOCK
// FERTILIZER IDEA:
- // IC2 +10% per fertilizer per crop per operation
+ // IC2 +10% per fertilizer per crop per operation
// NORMAL +200% per fertilizer per crop per operation
int boost = 0;
@@ -563,98 +539,90 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
private final Function<Widget, Boolean> isFixed = widget -> getIdealStatus() == getRepairStatus() && mMachine;
private static final Function<Integer, IDrawable[]> toggleButtonBackgroundGetter = val -> {
- if (val == 0) return new IDrawable[] {GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS};
- else return new IDrawable[] {GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CHECKMARK};
+ if (val == 0) return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS };
+ else return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CHECKMARK };
};
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(7, 4)
- .setSize(143, 75)
- .setEnabled(widget -> !isFixed.apply(widget)));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 4).setSize(143, 75)
+ .setEnabled(widget -> !isFixed.apply(widget)));
buildContext.addSyncedWindow(CONFIGURATION_WINDOW_ID, this::createConfigurationWindow);
EntityPlayer player = buildContext.getPlayer();
// Slot is not needed
- builder.widget(new DynamicPositionedColumn()
- .setSynced(false)
- .widget(new CycleButtonWidget()
- .setToggle(() -> getBaseMetaTileEntity().isAllowedToWork(), works -> {
+ builder.widget(
+ new DynamicPositionedColumn().setSynced(false).widget(
+ new CycleButtonWidget().setToggle(() -> getBaseMetaTileEntity().isAllowedToWork(), works -> {
if (works) getBaseMetaTileEntity().enableWorking();
else getBaseMetaTileEntity().disableWorking();
if (!(player instanceof EntityPlayerMP)) return;
String tChat = GT_Utility.trans("090", "Machine Processing: ")
- + (works
- ? GT_Utility.trans("088", "Enabled")
+ + (works ? GT_Utility.trans("088", "Enabled")
: GT_Utility.trans("087", "Disabled"));
if (hasAlternativeModeText()) tChat = getAlternativeModeText();
GT_Utility.sendChatToPlayer(player, tChat);
- })
- .addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
- .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
- .setVariableBackgroundGetter(toggleButtonBackgroundGetter)
- .setSize(18, 18)
- .addTooltip("Working status"))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (!widget.isClient()) widget.getContext().openSyncedWindow(CONFIGURATION_WINDOW_ID);
- })
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .addTooltip("Configuration")
- .setSize(18, 18))
- .setPos(151, 4));
+ }).addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
+ .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
+ .setVariableBackgroundGetter(toggleButtonBackgroundGetter).setSize(18, 18)
+ .addTooltip("Working status"))
+ .widget(
+ new ButtonWidget()
+ .setOnClick(
+ (clickData, widget) -> {
+ if (!widget.isClient())
+ widget.getContext().openSyncedWindow(CONFIGURATION_WINDOW_ID);
+ })
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .addTooltip("Configuration").setSize(18, 18))
+ .setPos(151, 4));
final List<ItemStack> drawables = new ArrayList<>(mMaxSlots);
final int perRow = 7;
Scrollable cropsContainer = new Scrollable().setVerticalScroll();
- if (mMaxSlots > 0)
- for (int i = 0, imax = ((mMaxSlots - 1) / perRow); i <= imax; i++) {
- DynamicPositionedRow row = new DynamicPositionedRow().setSynced(false);
- for (int j = 0, jmax = (i == imax ? (mMaxSlots - 1) % perRow : (perRow - 1)); j <= jmax; j++) {
- final int finalI = i * perRow;
- final int finalJ = j;
- final int ID = finalI + finalJ;
- row.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (!(player instanceof EntityPlayerMP)) return;
- if (mStorage.size() <= ID) return;
- if (this.mMaxProgresstime > 0) {
- GT_Utility.sendChatToPlayer(player, "Can't eject while running !");
- return;
- }
- GreenHouseSlot removed = mStorage.remove(ID);
- addOutput(removed.input);
- GT_Utility.sendChatToPlayer(player, "Crop ejected !");
- })
- .setBackground(() -> new IDrawable[] {
- getBaseMetaTileEntity().getGUITextureSet().getItemSlot(),
+ if (mMaxSlots > 0) for (int i = 0, imax = ((mMaxSlots - 1) / perRow); i <= imax; i++) {
+ DynamicPositionedRow row = new DynamicPositionedRow().setSynced(false);
+ for (int j = 0, jmax = (i == imax ? (mMaxSlots - 1) % perRow : (perRow - 1)); j <= jmax; j++) {
+ final int finalI = i * perRow;
+ final int finalJ = j;
+ final int ID = finalI + finalJ;
+ row.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (!(player instanceof EntityPlayerMP)) return;
+ if (mStorage.size() <= ID) return;
+ if (this.mMaxProgresstime > 0) {
+ GT_Utility.sendChatToPlayer(player, "Can't eject while running !");
+ return;
+ }
+ GreenHouseSlot removed = mStorage.remove(ID);
+ addOutput(removed.input);
+ GT_Utility.sendChatToPlayer(player, "Crop ejected !");
+ }).setBackground(
+ () -> new IDrawable[] { getBaseMetaTileEntity().getGUITextureSet().getItemSlot(),
new ItemDrawable(drawables.size() > ID ? drawables.get(ID) : null)
- .withFixedSize(16, 16, 1, 1)
- })
- .dynamicTooltip(() -> {
- if (drawables.size() > ID)
- return Arrays.asList(
- drawables.get(ID).getDisplayName(),
- "Amount: " + drawables.get(ID).stackSize,
- EnumChatFormatting.GRAY + "Left click to eject");
- return Collections.emptyList();
- })
- .setSize(18, 18));
- }
- cropsContainer.widget(row.setPos(0, i * 18).setEnabled(widget -> {
- int y = widget.getPos().y;
- int cy = cropsContainer.getVerticalScrollOffset();
- int ch = cropsContainer.getVisibleHeight();
- return y >= cy - ch && y <= cy + ch;
- }));
+ .withFixedSize(16, 16, 1, 1) })
+ .dynamicTooltip(() -> {
+ if (drawables.size() > ID) return Arrays.asList(
+ drawables.get(ID).getDisplayName(),
+ "Amount: " + drawables.get(ID).stackSize,
+ EnumChatFormatting.GRAY + "Left click to eject");
+ return Collections.emptyList();
+ }).setSize(18, 18));
}
+ cropsContainer.widget(row.setPos(0, i * 18).setEnabled(widget -> {
+ int y = widget.getPos().y;
+ int cy = cropsContainer.getVerticalScrollOffset();
+ int ch = cropsContainer.getVisibleHeight();
+ return y >= cy - ch && y <= cy + ch;
+ }));
+ }
cropsContainer.attachSyncer(
new FakeSyncWidget.ListSyncer<>(
() -> mStorage.stream().map(s -> s.input).collect(Collectors.toList()),
@@ -688,125 +656,102 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
protected ModularWindow createConfigurationWindow(final EntityPlayer player) {
ModularWindow.Builder builder = ModularWindow.builder(200, 100);
builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setPos(5, 5)
- .setSize(16, 16))
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC).setPos(5, 5).setSize(16, 16))
.widget(new TextWidget("Configuration").setPos(25, 9))
.widget(ButtonWidget.closeWindowButton(true).setPos(185, 3))
- .widget(new Column()
- .widget(new CycleButtonWidget()
- .setLength(3)
- .setGetter(() -> setupphase)
- .setSetter(val -> {
+ .widget(
+ new Column().widget(
+ new CycleButtonWidget().setLength(3).setGetter(() -> setupphase).setSetter(val -> {
if (!(player instanceof EntityPlayerMP)) return;
if (this.mMaxProgresstime > 0) {
GT_Utility.sendChatToPlayer(
- player, "You can't enable/disable setup if the machine is working!");
+ player,
+ "You can't enable/disable setup if the machine is working!");
return;
}
this.setupphase = val;
GT_Utility.sendChatToPlayer(
player,
- "EIG is now running in "
- + (this.setupphase == 1
- ? "setup mode (input)."
- : (this.setupphase == 2
- ? "setup mode (output)."
- : "normal operation.")));
- })
- .addTooltip(0, new Text("Operating").color(Color.GREEN.dark(3)))
- .addTooltip(1, new Text("Input").color(Color.YELLOW.dark(3)))
- .addTooltip(2, new Text("Output").color(Color.YELLOW.dark(3)))
- .setVariableBackgroundGetter(i -> new IDrawable[] {
- ModularUITextures.VANILLA_BACKGROUND,
- GT_UITextures.OVERLAY_BUTTON_CYCLIC.withFixedSize(18, 18),
- i == 0
- ? new Text("Operating")
- .color(Color.GREEN.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- : i == 1
- ? new Text("Input")
- .color(Color.YELLOW.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- : new Text("Output")
- .color(Color.YELLOW.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- })
- .setSize(70, 18)
- .addTooltip("Setup mode"))
- .widget(new CycleButtonWidget()
- .setLength(2)
- .setGetter(() -> isIC2Mode ? 1 : 0)
- .setSetter(val -> {
- if (!(player instanceof EntityPlayerMP)) return;
- if (this.mMaxProgresstime > 0) {
- GT_Utility.sendChatToPlayer(
- player, "You can't change IC2 mode if the machine is working!");
- return;
- }
- if (!mStorage.isEmpty()) {
- GT_Utility.sendChatToPlayer(
- player, "You can't change IC2 mode if there are seeds inside!");
- return;
- }
- this.isIC2Mode = val == 1;
- GT_Utility.sendChatToPlayer(
- player, "IC2 mode is now " + (this.isIC2Mode ? "enabled" : "disabled."));
- })
- .addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
- .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
- .setVariableBackgroundGetter(i -> new IDrawable[] {
- ModularUITextures.VANILLA_BACKGROUND,
- GT_UITextures.OVERLAY_BUTTON_CYCLIC.withFixedSize(18, 18),
- i == 0
- ? new Text("Disabled")
- .color(Color.RED.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- : new Text("Enabled")
- .color(Color.GREEN.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- })
- .setSize(70, 18)
- .addTooltip("IC2 mode"))
- .widget(new CycleButtonWidget()
- .setLength(2)
- .setGetter(() -> isNoHumidity ? 1 : 0)
- .setSetter(val -> {
- if (!(player instanceof EntityPlayerMP)) return;
- isNoHumidity = val == 1;
- GT_Utility.sendChatToPlayer(
- player, "Give incoming crops no humidity " + isNoHumidity);
- })
- .addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
- .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
- .setVariableBackgroundGetter(i -> new IDrawable[] {
- ModularUITextures.VANILLA_BACKGROUND,
- GT_UITextures.OVERLAY_BUTTON_CYCLIC.withFixedSize(18, 18),
- i == 0
- ? new Text("Disabled")
- .color(Color.RED.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- : new Text("Enabled")
- .color(Color.GREEN.dark(3))
- .withFixedSize(70 - 18, 18, 15, 0)
- })
- .setSize(70, 18)
- .addTooltip("No Humidity mode"))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive())
- .setPos(10, 30))
- .widget(new Column()
- .widget(new TextWidget("Setup mode").setSize(100, 18))
- .widget(new TextWidget("IC2 mode").setSize(100, 18))
- .widget(new TextWidget("No Humidity mode").setSize(100, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive())
- .setPos(80, 30))
- .widget(new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setSize(18, 18)
- .setPos(10, 30)
- .addTooltip(new Text("Can't change configuration when running !").color(Color.RED.dark(3)))
- .setEnabled(widget -> getBaseMetaTileEntity().isActive()));
+ "EIG is now running in " + (this.setupphase == 1 ? "setup mode (input)."
+ : (this.setupphase == 2 ? "setup mode (output)."
+ : "normal operation.")));
+ }).addTooltip(0, new Text("Operating").color(Color.GREEN.dark(3)))
+ .addTooltip(1, new Text("Input").color(Color.YELLOW.dark(3)))
+ .addTooltip(2, new Text("Output").color(Color.YELLOW.dark(3)))
+ .setVariableBackgroundGetter(
+ i -> new IDrawable[] { ModularUITextures.VANILLA_BACKGROUND,
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC.withFixedSize(18, 18),
+ i == 0 ? new Text("Operating").color(Color.GREEN.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0)
+ : i == 1 ? new Text("Input").color(Color.YELLOW.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0)
+ : new Text("Output").color(Color.YELLOW.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0) })
+ .setSize(70, 18).addTooltip("Setup mode"))
+ .widget(
+ new CycleButtonWidget().setLength(2).setGetter(() -> isIC2Mode ? 1 : 0)
+ .setSetter(val -> {
+ if (!(player instanceof EntityPlayerMP)) return;
+ if (this.mMaxProgresstime > 0) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ "You can't change IC2 mode if the machine is working!");
+ return;
+ }
+ if (!mStorage.isEmpty()) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ "You can't change IC2 mode if there are seeds inside!");
+ return;
+ }
+ this.isIC2Mode = val == 1;
+ GT_Utility.sendChatToPlayer(
+ player,
+ "IC2 mode is now "
+ + (this.isIC2Mode ? "enabled" : "disabled."));
+ }).addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
+ .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
+ .setVariableBackgroundGetter(
+ i -> new IDrawable[] { ModularUITextures.VANILLA_BACKGROUND,
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC
+ .withFixedSize(18, 18),
+ i == 0 ? new Text("Disabled").color(Color.RED.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0)
+ : new Text("Enabled").color(Color.GREEN.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0) })
+ .setSize(70, 18).addTooltip("IC2 mode"))
+ .widget(
+ new CycleButtonWidget().setLength(2).setGetter(() -> isNoHumidity ? 1 : 0)
+ .setSetter(val -> {
+ if (!(player instanceof EntityPlayerMP)) return;
+ isNoHumidity = val == 1;
+ GT_Utility.sendChatToPlayer(
+ player,
+ "Give incoming crops no humidity " + isNoHumidity);
+ }).addTooltip(0, new Text("Disabled").color(Color.RED.dark(3)))
+ .addTooltip(1, new Text("Enabled").color(Color.GREEN.dark(3)))
+ .setVariableBackgroundGetter(
+ i -> new IDrawable[] { ModularUITextures.VANILLA_BACKGROUND,
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC
+ .withFixedSize(18, 18),
+ i == 0 ? new Text("Disabled").color(Color.RED.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0)
+ : new Text("Enabled").color(Color.GREEN.dark(3))
+ .withFixedSize(70 - 18, 18, 15, 0) })
+ .setSize(70, 18).addTooltip("No Humidity mode"))
+ .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(10, 30))
+ .widget(
+ new Column().widget(new TextWidget("Setup mode").setSize(100, 18))
+ .widget(new TextWidget("IC2 mode").setSize(100, 18))
+ .widget(new TextWidget("No Humidity mode").setSize(100, 18))
+ .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(80, 30))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS).setSize(18, 18)
+ .setPos(10, 30)
+ .addTooltip(
+ new Text("Can't change configuration when running !").color(Color.RED.dark(3)))
+ .setEnabled(widget -> getBaseMetaTileEntity().isActive()));
return builder.build();
}
@@ -814,74 +759,79 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
screenElements.setSynced(false).setSpace(0).setPos(10, 7);
- screenElements.widget(new DynamicPositionedRow()
- .setSynced(false)
- .widget(new TextWidget("Status: ").setDefaultColor(COLOR_TEXT_GRAY.get()))
- .widget(new DynamicTextWidget(() -> {
- if (getBaseMetaTileEntity().isActive()) return new Text("Working !").color(Color.GREEN.dark(3));
- else if (getBaseMetaTileEntity().isAllowedToWork())
- return new Text("Enabled").color(Color.GREEN.dark(3));
- else if (getBaseMetaTileEntity().wasShutdown())
- return new Text("Shutdown (CRITICAL)").color(Color.RED.dark(3));
- else return new Text("Disabled").color(Color.RED.dark(3));
- }))
- .setEnabled(isFixed));
+ screenElements.widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(new TextWidget("Status: ").setDefaultColor(COLOR_TEXT_GRAY.get()))
+ .widget(new DynamicTextWidget(() -> {
+ if (getBaseMetaTileEntity().isActive())
+ return new Text("Working !").color(Color.GREEN.dark(3));
+ else if (getBaseMetaTileEntity().isAllowedToWork())
+ return new Text("Enabled").color(Color.GREEN.dark(3));
+ else if (getBaseMetaTileEntity().wasShutdown())
+ return new Text("Shutdown (CRITICAL)").color(Color.RED.dark(3));
+ else return new Text("Disabled").color(Color.RED.dark(3));
+ })).setEnabled(isFixed));
screenElements
- .widget(new TextWidget(GT_Utility.trans("132", "Pipe is loose."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mWrench))
+ .widget(
+ new TextWidget(GT_Utility.trans("132", "Pipe is loose."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mWrench))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mWrench, val -> mWrench = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("133", "Screws are loose."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mScrewdriver))
+ .widget(
+ new TextWidget(GT_Utility.trans("133", "Screws are loose."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mScrewdriver))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mScrewdriver, val -> mScrewdriver = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("134", "Something is stuck."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mSoftHammer))
+ .widget(
+ new TextWidget(GT_Utility.trans("134", "Something is stuck."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mSoftHammer))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mSoftHammer, val -> mSoftHammer = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("135", "Platings are dented."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mHardHammer))
+ .widget(
+ new TextWidget(GT_Utility.trans("135", "Platings are dented."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mHardHammer))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mHardHammer, val -> mHardHammer = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("136", "Circuitry burned out."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mSolderingTool))
+ .widget(
+ new TextWidget(GT_Utility.trans("136", "Circuitry burned out."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mSolderingTool))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mSolderingTool, val -> mSolderingTool = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("137", "That doesn't belong there."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mCrowbar))
+ .widget(
+ new TextWidget(GT_Utility.trans("137", "That doesn't belong there."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mCrowbar))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mCrowbar, val -> mCrowbar = val));
screenElements
- .widget(new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mMachine))
+ .widget(
+ new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mMachine))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val));
}
@Override
public String[] getInfoData() {
- List<String> info = new ArrayList<>(Arrays.asList(
- "Running in mode: " + EnumChatFormatting.GREEN
- + (setupphase == 0
- ? (isIC2Mode ? "IC2 crops" : "Normal crops")
- : ("Setup mode " + (setupphase == 1 ? "(input)" : "(output)")))
- + EnumChatFormatting.RESET,
- "Uses " + waterusage + "L/operation of water",
- "Uses " + weedexusage + "L/second of Weed-EX 9000",
- "Max slots: " + EnumChatFormatting.GREEN + this.mMaxSlots + EnumChatFormatting.RESET,
- "Used slots: " + ((mStorage.size() > mMaxSlots) ? EnumChatFormatting.RED : EnumChatFormatting.GREEN)
- + this.mStorage.size() + EnumChatFormatting.RESET));
+ List<String> info = new ArrayList<>(
+ Arrays.asList(
+ "Running in mode: " + EnumChatFormatting.GREEN
+ + (setupphase == 0 ? (isIC2Mode ? "IC2 crops" : "Normal crops")
+ : ("Setup mode " + (setupphase == 1 ? "(input)" : "(output)")))
+ + EnumChatFormatting.RESET,
+ "Uses " + waterusage + "L/operation of water",
+ "Uses " + weedexusage + "L/second of Weed-EX 9000",
+ "Max slots: " + EnumChatFormatting.GREEN + this.mMaxSlots + EnumChatFormatting.RESET,
+ "Used slots: "
+ + ((mStorage.size() > mMaxSlots) ? EnumChatFormatting.RED : EnumChatFormatting.GREEN)
+ + this.mStorage.size()
+ + EnumChatFormatting.RESET));
HashMap<String, Integer> storageList = new HashMap<>();
for (GreenHouseSlot greenHouseSlot : mStorage) {
if (!greenHouseSlot.isValid) continue;
- StringBuilder a = new StringBuilder(EnumChatFormatting.GREEN + "x" + greenHouseSlot.input.stackSize + " "
- + greenHouseSlot.input.getDisplayName());
+ StringBuilder a = new StringBuilder(
+ EnumChatFormatting.GREEN + "x"
+ + greenHouseSlot.input.stackSize
+ + " "
+ + greenHouseSlot.input.getDisplayName());
if (this.isIC2Mode) {
a.append(" | Humidity: ").append(greenHouseSlot.noHumidity ? 0 : 12);
}
@@ -889,60 +839,36 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
storageList.merge(a.toString(), 1, Integer::sum);
}
storageList.forEach((k, v) -> info.add("x" + v + " " + k));
- if (mStorage.size() > mMaxSlots)
- info.add(EnumChatFormatting.DARK_RED + "There are too many crops inside to run !"
- + EnumChatFormatting.RESET);
+ if (mStorage.size() > mMaxSlots) info.add(
+ EnumChatFormatting.DARK_RED + "There are too many crops inside to run !" + EnumChatFormatting.RESET);
info.addAll(Arrays.asList(super.getInfoData()));
return info.toArray(new String[0]);
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
public final List<GreenHouseSlot> mStorage = new ArrayList<>();
public boolean addCrop(ItemStack input) {
if (!isIC2Mode)
- for (GreenHouseSlot g : mStorage)
- if (g.input.stackSize < 64 && GT_Utility.areStacksEqual(g.input, input)) {
- g.addAll(this.getBaseMetaTileEntity().getWorld(), input);
- if (input.stackSize == 0) return true;
- }
+ for (GreenHouseSlot g : mStorage) if (g.input.stackSize < 64 && GT_Utility.areStacksEqual(g.input, input)) {
+ g.addAll(this.getBaseMetaTileEntity().getWorld(), input);
+ if (input.stackSize == 0) return true;
+ }
GreenHouseSlot h = new GreenHouseSlot(this, input, isIC2Mode, isNoHumidity);
if (h.isValid) {
mStorage.add(h);
@@ -995,12 +921,10 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
if (undercrop != null) aNBT.setTag("undercrop", undercrop.writeToNBT(new NBTTagCompound()));
aNBT.setInteger("generationscount", generations.size());
for (int i = 0; i < generations.size(); i++) {
- aNBT.setInteger(
- "generation." + i + ".count", generations.get(i).size());
- for (int j = 0; j < generations.get(i).size(); j++)
- aNBT.setTag(
- "generation." + i + "." + j,
- generations.get(i).get(j).writeToNBT(new NBTTagCompound()));
+ aNBT.setInteger("generation." + i + ".count", generations.get(i).size());
+ for (int j = 0; j < generations.get(i).size(); j++) aNBT.setTag(
+ "generation." + i + "." + j,
+ generations.get(i).get(j).writeToNBT(new NBTTagCompound()));
}
aNBT.setInteger("growthticks", growthticks);
aNBT.setBoolean("noHumidity", noHumidity);
@@ -1033,10 +957,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
generations = new ArrayList<>();
for (int i = 0; i < aNBT.getInteger("generationscount"); i++) {
generations.add(new ArrayList<>());
- for (int j = 0; j < aNBT.getInteger("generation." + i + ".count"); j++)
- generations
- .get(i)
- .add(ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("generation." + i + "." + j)));
+ for (int j = 0; j < aNBT.getInteger("generation." + i + ".count"); j++) generations.get(i)
+ .add(ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("generation." + i + "." + j)));
}
growthticks = aNBT.getInteger("growthticks");
noHumidity = aNBT.getBoolean("noHumidity");
@@ -1056,14 +978,10 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
public boolean findCropRecipe(World world) {
if (recipe != null) return true;
- out:
- for (ItemStack drop : drops) {
+ out: for (ItemStack drop : drops) {
recipeInput = drop;
- for (int j = 0;
- j < CraftingManager.getInstance().getRecipeList().size();
- j++) {
- recipe = (IRecipe)
- CraftingManager.getInstance().getRecipeList().get(j);
+ for (int j = 0; j < CraftingManager.getInstance().getRecipeList().size(); j++) {
+ recipe = (IRecipe) CraftingManager.getInstance().getRecipeList().get(j);
if (recipe.matches(this, world)
&& GT_Utility.areStacksEqual(recipe.getCraftingResult(this), input)) {
break out;
@@ -1093,10 +1011,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
@Override
public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {}
- public GreenHouseSlot(
- GT_TileEntity_ExtremeIndustrialGreenhouse tileEntity,
- ItemStack input,
- boolean IC2,
+ public GreenHouseSlot(GT_TileEntity_ExtremeIndustrialGreenhouse tileEntity, ItemStack input, boolean IC2,
boolean noHumidity) {
super(null, 3, 3);
World world = tileEntity.getBaseMetaTileEntity().getWorld();
@@ -1158,11 +1073,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
}
}
- public void GreenHouseSlotIC2(
- GT_TileEntity_ExtremeIndustrialGreenhouse tileEntity,
- World world,
- ItemStack input,
- boolean noHumidity) {
+ public void GreenHouseSlotIC2(GT_TileEntity_ExtremeIndustrialGreenhouse tileEntity, World world,
+ ItemStack input, boolean noHumidity) {
if (!ItemList.IC2_Crop_Seeds.isStackEqual(input, true, true)) return;
this.isIC2Crop = true;
recalculate(tileEntity, world);
@@ -1181,7 +1093,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
z,
b,
GT_TileEntity_Ores.getHarvestData(
- tDamage, ((GT_Block_Ores_Abstract) b).getBaseBlockHarvestLevel(tDamage % 16000 / 1000)),
+ tDamage,
+ ((GT_Block_Ores_Abstract) b).getBaseBlockHarvestLevel(tDamage % 16000 / 1000)),
0)) {
return false;
}
@@ -1200,8 +1113,8 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
byte gr = nbt.getByte("growth");
byte ga = nbt.getByte("gain");
byte re = nbt.getByte("resistance");
- int[] abc = new int[] {0, -2, 3};
- int[] xyz = new int[] {0, 0, 0};
+ int[] abc = new int[] { 0, -2, 3 };
+ int[] xyz = new int[] { 0, 0, 0 };
tileEntity.getExtendedFacing().getWorldOffset(abc, xyz);
xyz[0] += tileEntity.getBaseMetaTileEntity().getXCoord();
xyz[1] += tileEntity.getBaseMetaTileEntity().getYCoord();
@@ -1260,8 +1173,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
// GENERATE DROPS
generations = new ArrayList<>();
- out:
- for (int i = 0; i < 10; i++) // get 10 generations
+ out: for (int i = 0; i < 10; i++) // get 10 generations
{
ItemStack[] st = te.harvest_automated(false);
te.setSize((byte) cc.maxSize());
@@ -1323,12 +1235,11 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
if (!dropstacks.containsKey(s.toString())) dropstacks.put(s.toString(), s.copy());
}
copied.clear();
- for (Map.Entry<String, Double> entry : dropprogress.entrySet())
- if (entry.getValue() >= 1d) {
- copied.add(dropstacks.get(entry.getKey()).copy());
- copied.get(copied.size() - 1).stackSize = entry.getValue().intValue();
- entry.setValue(entry.getValue() - (double) entry.getValue().intValue());
- }
+ for (Map.Entry<String, Double> entry : dropprogress.entrySet()) if (entry.getValue() >= 1d) {
+ copied.add(dropstacks.get(entry.getKey()).copy());
+ copied.get(copied.size() - 1).stackSize = entry.getValue().intValue();
+ entry.setValue(entry.getValue() - (double) entry.getValue().intValue());
+ }
return copied;
}
@@ -1338,7 +1249,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
@SuppressWarnings("unchecked")
ArrayList<ItemStack> d = (ArrayList<ItemStack>) customDrops.clone();
for (ItemStack x : drops) {
- for (Iterator<ItemStack> iterator = d.iterator(); iterator.hasNext(); ) {
+ for (Iterator<ItemStack> iterator = d.iterator(); iterator.hasNext();) {
ItemStack y = iterator.next();
if (GT_Utility.areStacksEqual(x, y)) {
x.stackSize += y.stackSize * count;
@@ -1357,12 +1268,10 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
if (crop == null) return count;
for (int i = 0; i < count; i++) {
List<ItemStack> d = crop.getDrops(world, 0, 0, 0, optimalgrowth, 0);
- for (ItemStack x : drops)
- for (ItemStack y : d)
- if (GT_Utility.areStacksEqual(x, y)) {
- x.stackSize += y.stackSize;
- y.stackSize = 0;
- }
+ for (ItemStack x : drops) for (ItemStack y : d) if (GT_Utility.areStacksEqual(x, y)) {
+ x.stackSize += y.stackSize;
+ y.stackSize = 0;
+ }
for (ItemStack x : d) if (x.stackSize > 0) drops.add(x.copy());
}
}
@@ -1442,6 +1351,7 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse
}
private static class GreenHouseRandom extends Random {
+
@Override
public int nextInt(int bound) {
return 0;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java
index aa63d8958d..656d9a38d2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java
@@ -1,18 +1,10 @@
/*
- * Copyright (C) 2022 kuba6000
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ * Copyright (C) 2022 kuba6000 This program is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.github.bartimaeusnek.bartworks.common.tileentities.multis;
@@ -22,6 +14,17 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.GT_Values.AuthorKuba;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
@@ -30,6 +33,7 @@ import com.github.bartimaeusnek.bartworks.util.MathUtils;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -44,215 +48,87 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_HTGR> {
private static final int BASECASINGINDEX = 181;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_HTGR> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_HTGR>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {
- " BBBBBBB ",
- " BBBBBBBBB ",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- " BBBBBBBBB ",
- " BBBBBBB "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " bbb~bbb ",
- " bbbbbbbbb ",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- " bbbbbbbbb ",
- " bbbbbbb "
- },
- }))
- .addElement('c', onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5)))
- .addElement(
- 'b',
- ofChain(
- ofHatchAdder(GT_TileEntity_HTGR::addOutputToMachineList, BASECASINGINDEX, 1),
- ofHatchAdder(GT_TileEntity_HTGR::addMaintenanceToMachineList, BASECASINGINDEX, 1),
- ofHatchAdder(GT_TileEntity_HTGR::addEnergyInputToMachineList, BASECASINGINDEX, 1),
- onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5))))
- .addElement(
- 'B',
- ofChain(
- ofHatchAdder(GT_TileEntity_HTGR::addInputToMachineList, BASECASINGINDEX, 2),
- onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5))))
- // ofHatchAdderOptional(GT_TileEntity_HTGR::addInputToMachineList, BASECASINGINDEX, 2,
- // GregTech_API.sBlockCasings8, 5))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_HTGR> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_HTGR>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " BBBBBBB ", " BBBBBBBBB ", "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB",
+ "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB", " BBBBBBBBB ",
+ " BBBBBBB " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " bbb~bbb ", " bbbbbbbbb ", "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb",
+ "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb", " bbbbbbbbb ",
+ " bbbbbbb " }, }))
+ .addElement('c', onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5)))
+ .addElement(
+ 'b',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_HTGR::addOutputToMachineList, BASECASINGINDEX, 1),
+ ofHatchAdder(GT_TileEntity_HTGR::addMaintenanceToMachineList, BASECASINGINDEX, 1),
+ ofHatchAdder(GT_TileEntity_HTGR::addEnergyInputToMachineList, BASECASINGINDEX, 1),
+ onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5))))
+ .addElement(
+ 'B',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_HTGR::addInputToMachineList, BASECASINGINDEX, 2),
+ onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings8, 5))))
+ // ofHatchAdderOptional(GT_TileEntity_HTGR::addInputToMachineList, BASECASINGINDEX, 2,
+ // GregTech_API.sBlockCasings8, 5))
+ .build();
public static final GT_Recipe.GT_Recipe_Map fakeRecipeMap = new GT_Recipe.GT_Recipe_Map(
- new HashSet<>(),
- "bw.recipe.htgr",
- "High Temperature Gas-cooled Reactor",
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 1,
- 1,
- 1,
- 0,
- 1,
- "",
- 1,
- "",
- false,
- true)
- .useModularUI(true);
+ new HashSet<>(),
+ "bw.recipe.htgr",
+ "High Temperature Gas-cooled Reactor",
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ "",
+ 1,
+ "",
+ false,
+ true).useModularUI(true);
private static final int HELIUM_NEEDED = 730000;
private static final int powerUsage = BW_Util.getMachineVoltageFromTier(6);
private static final int maxcapacity = 720000;
@@ -286,8 +162,7 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Breeder Reactor")
- .addInfo("Controller block for the High Temperature Gas-cooled Reactor (HTGR)")
- .addInfo(AuthorKuba)
+ .addInfo("Controller block for the High Temperature Gas-cooled Reactor (HTGR)").addInfo(AuthorKuba)
.addInfo("You can clear internal buffer by changing the mode with a screwdriver")
.addInfo("Needs a constant supply of coolant while running")
.addInfo("Needs at least 72k Fuel pebbles to start operation (can hold up to 720k pebbles)")
@@ -297,19 +172,13 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
.addInfo("and affects total recipe time (at 100% eff, -50% total recipe time")
.addInfo(
"Reactor will take 4 000L/s of coolant multiplied by efficiency and by fuel coolant value (check tooltips)")
- .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t")
- .addInfo("One Operation takes 1 hour")
- .addSeparator()
- .beginStructureBlock(11, 12, 11, true)
- .addController("Front bottom center")
+ .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t").addInfo("One Operation takes 1 hour")
+ .addSeparator().beginStructureBlock(11, 12, 11, true).addController("Front bottom center")
.addCasingInfo("Europium Reinforced Radiation Proof Casings", 500)
.addStructureInfo("Corners and the 2 touching blocks are air (cylindric)")
- .addInputBus("Any top layer casing", 2)
- .addInputHatch("Any top layer casing", 2)
- .addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("Any bottom layer casing", 1)
- .addEnergyHatch("Any bottom layer casing", 1)
- .addMaintenanceHatch("Any bottom layer casing", 1)
+ .addInputBus("Any top layer casing", 2).addInputHatch("Any top layer casing", 2)
+ .addOutputBus("Any bottom layer casing", 1).addOutputHatch("Any bottom layer casing", 1)
+ .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1)
.toolTipFinisher(MULTIBLOCK_ADDED_VIA_BARTWORKS.apply(ChatColorHelper.GOLD + "kuba6000"));
return tt;
}
@@ -327,8 +196,7 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
this.mCasing = 0;
- return (checkPiece("main", 5, 11, 0)
- && this.mCasing >= 500
+ return (checkPiece("main", 5, 11, 0) && this.mCasing >= 500
&& this.mMaintenanceHatches.size() == 1
&& this.mInputHatches.size() > 0
&& this.mOutputHatches.size() > 0
@@ -421,10 +289,8 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
int meta = (this.fueltype * HTGRMaterials.MATERIALS_PER_FUEL) + HTGRMaterials.BURNED_OUT_FUEL_INDEX;
- this.mOutputItems = new ItemStack[] {
- new ItemStack(HTGRMaterials.aHTGR_Materials, burnedballs, meta),
- new ItemStack(HTGRMaterials.aHTGR_Materials, toReduce, meta + 1)
- };
+ this.mOutputItems = new ItemStack[] { new ItemStack(HTGRMaterials.aHTGR_Materials, burnedballs, meta),
+ new ItemStack(HTGRMaterials.aHTGR_Materials, toReduce, meta + 1) };
// this.updateSlots(); // not needed ?
@@ -538,60 +404,37 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
@Override
public String[] getInfoData() {
- return new String[] {
- "Mode:", this.empty ? "Emptying" : "Normal",
- "Progress:",
- GT_Utility.formatNumbers(this.mProgresstime / 20) + "s / "
- + GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + "s",
- "Fuel type:",
- (this.fueltype == -1
- ? "NONE"
- : ("TRISO (" + HTGRMaterials.sHTGR_Fuel[this.fueltype].sEnglish) + ")"),
- "Fuel amount:", GT_Utility.formatNumbers(this.fuelsupply) + " pcs.",
- "Helium-Level:",
- GT_Utility.formatNumbers(this.HeliumSupply) + "L / "
- + GT_Utility.formatNumbers(GT_TileEntity_HTGR.HELIUM_NEEDED) + "L",
- "Coolant:", GT_Utility.formatNumbers(coolanttaking) + "L/s",
- "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus())
- };
+ return new String[] { "Mode:", this.empty ? "Emptying" : "Normal", "Progress:",
+ GT_Utility.formatNumbers(this.mProgresstime / 20) + "s / "
+ + GT_Utility.formatNumbers(this.mMaxProgresstime / 20)
+ + "s",
+ "Fuel type:",
+ (this.fueltype == -1 ? "NONE" : ("TRISO (" + HTGRMaterials.sHTGR_Fuel[this.fueltype].sEnglish) + ")"),
+ "Fuel amount:", GT_Utility.formatNumbers(this.fuelsupply) + " pcs.", "Helium-Level:",
+ GT_Utility.formatNumbers(this.HeliumSupply) + "L / "
+ + GT_Utility.formatNumbers(GT_TileEntity_HTGR.HELIUM_NEEDED)
+ + "L",
+ "Coolant:", GT_Utility.formatNumbers(coolanttaking) + "L/s", "Problems:",
+ String.valueOf(this.getIdealStatus() - this.getRepairStatus()) };
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
- .extFacing()
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
+ .extFacing().build(),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
+ .extFacing().glow().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER).extFacing()
.build(),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing()
+ .glow().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX) };
}
@Override
@@ -602,12 +445,14 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
this.empty = !this.empty;
GT_Utility.sendChatToPlayer(
- aPlayer, "HTGR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
+ aPlayer,
+ "HTGR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
}
public static class HTGRMaterials {
private static class CustomHTGRSimpleSubItemClass extends SimpleSubItemClass {
+
HashMap<Integer, String> tooltip = null;
public CustomHTGRSimpleSubItemClass(HashMap<Integer, String> tooltip, String... tex) {
@@ -625,6 +470,7 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
private static class Base_ {
+
public String sName;
public String sEnglish;
@@ -635,26 +481,19 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
static class Fuel_ {
+
public String sName;
public String sEnglish;
public ItemStack mainItem;
public ItemStack secondaryItem;
- public ItemStack[] recycledItems = {
- GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI
- };
+ public ItemStack[] recycledItems = { GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI,
+ GT_Values.NI };
public FluidStack recycledFluid;
public int[] recycleChances;
public String tooltip;
- public Fuel_(
- String sName,
- String sEnglish,
- ItemStack mainItem,
- ItemStack secondaryItem,
- FluidStack recycledFluid,
- ItemStack[] recycledItems,
- int[] recycleChances,
- String tooltip) {
+ public Fuel_(String sName, String sEnglish, ItemStack mainItem, ItemStack secondaryItem,
+ FluidStack recycledFluid, ItemStack[] recycledItems, int[] recycleChances, String tooltip) {
this.sName = sName;
this.sEnglish = sEnglish;
this.mainItem = mainItem;
@@ -667,6 +506,7 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
private static class LangEntry_ {
+
public String sName;
public String sEnglish;
@@ -676,65 +516,47 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
}
- static final Base_[] sHTGR_Bases = new Base_[] {
- new Base_("HTGRFuelMixture", "HTGR fuel mixture"),
- new Base_("BISOPebbleCompound", "BISO pebble compound"),
- new Base_("TRISOPebbleCompound", "TRISO pebble compound"),
- new Base_("TRISOBall", "TRISO ball"),
- new Base_("TRISOPebble", "TRISO pebble"),
- new Base_("BurnedOutTRISOBall", "Burned out TRISO Ball"),
- new Base_("BurnedOutTRISOPebble", "Burned out TRISO Pebble"),
- };
+ static final Base_[] sHTGR_Bases = new Base_[] { new Base_("HTGRFuelMixture", "HTGR fuel mixture"),
+ new Base_("BISOPebbleCompound", "BISO pebble compound"),
+ new Base_("TRISOPebbleCompound", "TRISO pebble compound"), new Base_("TRISOBall", "TRISO ball"),
+ new Base_("TRISOPebble", "TRISO pebble"), new Base_("BurnedOutTRISOBall", "Burned out TRISO Ball"),
+ new Base_("BurnedOutTRISOPebble", "Burned out TRISO Pebble"), };
static final int MATERIALS_PER_FUEL = sHTGR_Bases.length;
static final int USABLE_FUEL_INDEX = 4;
static final int BURNED_OUT_FUEL_INDEX = 5;
static final Fuel_[] sHTGR_Fuel = new Fuel_[] {
- new Fuel_(
- "Thorium",
- "Thorium",
- WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 64),
- Materials.Uranium235.getDust(4),
- GT_Values.NF,
- new ItemStack[] {
- Materials.Silicon.getDust(1),
- Materials.Graphite.getDust(1),
- Materials.Carbon.getDust(1),
- Materials.Lutetium.getDust(1),
- WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1)
- },
- new int[] {9900 / 4, 9900 / 4, 9900 / 4, 9900 / 4, 162 / 4},
- "Multiplies coolant by 1"),
- new Fuel_(
- "Uranium",
- "Uranium",
- Materials.Uranium.getDust(64),
- Materials.Uranium235.getDust(8),
- FluidRegistry.getFluidStack("krypton", 4),
- new ItemStack[] {
- Materials.Silicon.getDust(1),
- Materials.Graphite.getDust(1),
- Materials.Carbon.getDust(1),
- Materials.Lead.getDust(1),
- Materials.Uranium.getDust(1)
- },
- new int[] {9900 / 4, 9900 / 4, 9900 / 4, 5000 / 4, 5000 / 4},
- "Multiplies coolant by 1.5"),
- new Fuel_(
- "Plutonium",
- "Plutonium",
- Materials.Plutonium.getDust(64),
- Materials.Plutonium241.getDust(4),
- FluidRegistry.getFluidStack("xenon", 4),
- new ItemStack[] {
- Materials.Silicon.getDust(1),
- Materials.Graphite.getDust(1),
- Materials.Carbon.getDust(1),
- Materials.Lead.getDust(1),
- Materials.Plutonium.getDust(1)
- },
- new int[] {9900 / 4, 9900 / 4, 9900 / 4, 5000 / 4, 5000 / 4},
- "Multiplies coolant by 2"),
- };
+ new Fuel_(
+ "Thorium",
+ "Thorium",
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 64),
+ Materials.Uranium235.getDust(4),
+ GT_Values.NF,
+ new ItemStack[] { Materials.Silicon.getDust(1), Materials.Graphite.getDust(1),
+ Materials.Carbon.getDust(1), Materials.Lutetium.getDust(1),
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1) },
+ new int[] { 9900 / 4, 9900 / 4, 9900 / 4, 9900 / 4, 162 / 4 },
+ "Multiplies coolant by 1"),
+ new Fuel_(
+ "Uranium",
+ "Uranium",
+ Materials.Uranium.getDust(64),
+ Materials.Uranium235.getDust(8),
+ FluidRegistry.getFluidStack("krypton", 4),
+ new ItemStack[] { Materials.Silicon.getDust(1), Materials.Graphite.getDust(1),
+ Materials.Carbon.getDust(1), Materials.Lead.getDust(1), Materials.Uranium.getDust(1) },
+ new int[] { 9900 / 4, 9900 / 4, 9900 / 4, 5000 / 4, 5000 / 4 },
+ "Multiplies coolant by 1.5"),
+ new Fuel_(
+ "Plutonium",
+ "Plutonium",
+ Materials.Plutonium.getDust(64),
+ Materials.Plutonium241.getDust(4),
+ FluidRegistry.getFluidStack("xenon", 4),
+ new ItemStack[] { Materials.Silicon.getDust(1), Materials.Graphite.getDust(1),
+ Materials.Carbon.getDust(1), Materials.Lead.getDust(1),
+ Materials.Plutonium.getDust(1) },
+ new int[] { 9900 / 4, 9900 / 4, 9900 / 4, 5000 / 4, 5000 / 4 },
+ "Multiplies coolant by 2"), };
static final CustomHTGRSimpleSubItemClass aHTGR_Materials;
static final ArrayList<LangEntry_> aHTGR_Localizations = new ArrayList<>();
@@ -742,16 +564,17 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
String[] sHTGR_Materials = new String[sHTGR_Bases.length * sHTGR_Fuel.length];
HashMap<Integer, String> tooltip = new HashMap<>();
int i = 0;
- for (Fuel_ fuel : sHTGR_Fuel)
- for (Base_ base : sHTGR_Bases) {
- sHTGR_Materials[i] = "HTGR" + base.sName + fuel.sName;
- aHTGR_Localizations.add(new LangEntry_(
- "item." + sHTGR_Materials[i] + ".name", base.sEnglish + " (" + fuel.sEnglish + ")"));
- if (((i + 1) % MATERIALS_PER_FUEL == (USABLE_FUEL_INDEX + 1))
- && fuel.tooltip != null
- && !fuel.tooltip.isEmpty()) tooltip.put(i, fuel.tooltip);
- i++;
- }
+ for (Fuel_ fuel : sHTGR_Fuel) for (Base_ base : sHTGR_Bases) {
+ sHTGR_Materials[i] = "HTGR" + base.sName + fuel.sName;
+ aHTGR_Localizations.add(
+ new LangEntry_(
+ "item." + sHTGR_Materials[i] + ".name",
+ base.sEnglish + " (" + fuel.sEnglish + ")"));
+ if (((i + 1) % MATERIALS_PER_FUEL == (USABLE_FUEL_INDEX + 1)) && fuel.tooltip != null
+ && !fuel.tooltip.isEmpty())
+ tooltip.put(i, fuel.tooltip);
+ i++;
+ }
aHTGR_Materials = new CustomHTGRSimpleSubItemClass(tooltip, sHTGR_Materials);
}
@@ -763,11 +586,9 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
public static void registerTHR_Recipes() {
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- new ItemStack(GregTech_API.sBlockCasings3, 1, 12),
- GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Europium, 6),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Europium, 24)
- },
+ new ItemStack[] { new ItemStack(GregTech_API.sBlockCasings3, 1, 12),
+ GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Europium, 6),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Europium, 24) },
Materials.Lead.getMolten(864),
new ItemStack(GregTech_API.sBlockCasings8, 1, 5),
200,
@@ -775,9 +596,9 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
int i = 0;
for (Fuel_ fuel : sHTGR_Fuel) {
GT_Values.RA.addMixerRecipe(
- new ItemStack[] {fuel.mainItem, fuel.secondaryItem, GT_Utility.getIntegratedCircuit(1)},
+ new ItemStack[] { fuel.mainItem, fuel.secondaryItem, GT_Utility.getIntegratedCircuit(1) },
null,
- new ItemStack[] {new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i)},
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i) },
null,
400,
30);
@@ -801,16 +622,12 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
30);
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(
false,
- new ItemStack[] {
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3),
- GT_Utility.getIntegratedCircuit(17)
- },
- new ItemStack[] {
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4)
- },
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3),
+ GT_Utility.getIntegratedCircuit(17) },
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4),
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4) },
null,
null,
null,
@@ -820,11 +637,9 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
0);
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(
false,
- new ItemStack[] {
- new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5),
- GT_Utility.getIntegratedCircuit(17)
- },
- new ItemStack[] {new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 6)},
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5),
+ GT_Utility.getIntegratedCircuit(17) },
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 6) },
null,
null,
null,
@@ -834,8 +649,8 @@ public class GT_TileEntity_HTGR extends GT_MetaTileEntity_EnhancedMultiBlockBase
0);
fakeRecipeMap.addFakeRecipe(
false,
- new ItemStack[] {new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4)},
- new ItemStack[] {new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5)},
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 4) },
+ new ItemStack[] { new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5) },
null,
null,
null,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
index 6ed572e976..9e69a9cb88 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
@@ -1,27 +1,31 @@
/*
- * 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.common.tileentities.multis;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Collections;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -39,6 +43,7 @@ import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -52,17 +57,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
@@ -76,6 +70,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
public ConnectedBlocksChecker connectedcells;
public final ItemStack[] circuits = new ItemStack[5];
private final ItemStackHandler circuitsInventoryHandler = new ItemStackHandler(circuits) {
+
@Override
public int getSlotLimit(int slot) {
return 1;
@@ -110,12 +105,9 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
@Override
public long maxAmperesIn() {
int ret = 0;
- for (int i = 0; i < 5; ++i)
- if (this.circuits[i] != null
- && this.circuits[i]
- .getItem()
- .equals(GT_Utility.getIntegratedCircuit(0).getItem()))
- ret += this.circuits[i].getItemDamage();
+ for (int i = 0; i < 5; ++i) if (this.circuits[i] != null
+ && this.circuits[i].getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem()))
+ ret += this.circuits[i].getItemDamage();
return ret > 0 ? ret : 1;
}
@@ -173,11 +165,12 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
@Override
public String[] getDescription() {
ArrayList<String> e = new ArrayList<>();
- String[] dsc =
- StatCollector.translateToLocal("tooltip.tile.lesu.0.name").split(";");
+ String[] dsc = StatCollector.translateToLocal("tooltip.tile.lesu.0.name").split(";");
Collections.addAll(e, dsc);
- e.add(StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " "
- + GT_Utility.formatNumbers(ConfigHandler.energyPerCell) + "EU");
+ e.add(
+ StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " "
+ + GT_Utility.formatNumbers(ConfigHandler.energyPerCell)
+ + "EU");
dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name").split(";");
Collections.addAll(e, dsc);
e.add(ChatColorHelper.RED + StatCollector.translateToLocal("tooltip.tile.lesu.3.name"));
@@ -192,6 +185,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
GT_TileEntity_LESU.iIcons[i] = aBlockIconRegister.registerIcon(MainMod.MOD_ID + ":LESU_CASING_" + i);
int finalI = i;
GT_TileEntity_LESU.iIconContainers[i] = new IIconContainer() {
+
@Override
public IIcon getIcon() {
return GT_TileEntity_LESU.iIcons[finalI];
@@ -212,29 +206,23 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
public boolean isClientSide() {
if (this.getWorld() != null)
- return this.getWorld().isRemote
- ? FMLCommonHandler.instance().getSide() == Side.CLIENT
+ return this.getWorld().isRemote ? FMLCommonHandler.instance().getSide() == Side.CLIENT
: FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
}
@Override
@SuppressWarnings("ALL")
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
ITexture[] ret = new ITexture[0];
if (this.isClientSide()) {
for (int i = 0; i < GT_TileEntity_LESU.iTextures.length; i++) {
- GT_TileEntity_LESU.iTextures[i][0] = TextureFactory.of(
- GT_TileEntity_LESU.iIconContainers[i], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa));
+ GT_TileEntity_LESU.iTextures[i][0] = TextureFactory
+ .of(GT_TileEntity_LESU.iIconContainers[i], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa));
}
if (aSide == aFacing && this.getBaseMetaTileEntity().getUniversalEnergyStored() <= 0)
@@ -302,10 +290,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
case 1:
return true;
default:
- return p_94041_2_ != null
- && p_94041_2_
- .getItem()
- .equals(GT_Utility.getIntegratedCircuit(0).getItem());
+ return p_94041_2_ != null && p_94041_2_.getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem());
}
}
@@ -389,9 +374,8 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
if (this.connectedcells.get_meta_of_sideblocks(
aBaseMetaTileEntity.getWorld(),
this.getBaseMetaTileEntity().getMetaTileID(),
- new int[] {
- aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()
- },
+ new int[] { aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getZCoord() },
true)) {
this.getBaseMetaTileEntity().disableWorking();
this.getBaseMetaTileEntity().setActive(false);
@@ -403,9 +387,8 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
this.mEfficiency = this.getMaxEfficiency(null);
this.mStorage = (ConfigHandler.energyPerCell * this.connectedcells.hashset.size() >= Long.MAX_VALUE - 1
- || ConfigHandler.energyPerCell * this.connectedcells.hashset.size() < 0)
- ? Long.MAX_VALUE - 1
- : ConfigHandler.energyPerCell * this.connectedcells.hashset.size();
+ || ConfigHandler.energyPerCell * this.connectedcells.hashset.size() < 0) ? Long.MAX_VALUE - 1
+ : ConfigHandler.energyPerCell * this.connectedcells.hashset.size();
this.mMaxProgresstime = 1;
this.mProgresstime = 0;
@@ -421,14 +404,20 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
long finishedTime = System.nanoTime();
// System.out.println("LESU LookUp: "+((finishedTime - startingTime) / 1000000)+"ms");
- if (finishedTime - startingTime > 5000000)
- MainMod.LOGGER.warn("LESU LookUp took longer than 5ms!(" + (finishedTime - startingTime) + "ns / "
- + ((finishedTime - startingTime) / 1000000) + "ms) Owner:"
- + this.getBaseMetaTileEntity().getOwnerName() + " Check at x:"
- + this.getBaseMetaTileEntity().getXCoord() + " y:"
- + this.getBaseMetaTileEntity().getYCoord() + " z:"
- + this.getBaseMetaTileEntity().getZCoord() + " DIM-ID: "
- + this.getBaseMetaTileEntity().getWorld().provider.dimensionId);
+ if (finishedTime - startingTime > 5000000) MainMod.LOGGER.warn(
+ "LESU LookUp took longer than 5ms!(" + (finishedTime - startingTime)
+ + "ns / "
+ + ((finishedTime - startingTime) / 1000000)
+ + "ms) Owner:"
+ + this.getBaseMetaTileEntity().getOwnerName()
+ + " Check at x:"
+ + this.getBaseMetaTileEntity().getXCoord()
+ + " y:"
+ + this.getBaseMetaTileEntity().getYCoord()
+ + " z:"
+ + this.getBaseMetaTileEntity().getZCoord()
+ + " DIM-ID: "
+ + this.getBaseMetaTileEntity().getWorld().provider.dimensionId);
return true;
}
@@ -458,90 +447,91 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
- .setSize(17, 17)
- .setPos(105, 51));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY).setSize(17, 17)
+ .setPos(105, 51));
}
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(7, 4)
- .setSize(118, 67))
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 4).setSize(118, 67))
.widget(new SlotWidget(new BaseSlot(inventoryHandler, 1) {
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
- })
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(127, 13))
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ }).setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN).setPos(127, 13))
.widget(new SlotWidget(new BaseSlot(inventoryHandler, 0) {
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
- })
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER)
- .setPos(127, 49));
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ }).setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER).setPos(127, 49));
for (int i = 0; i < 4; i++) {
- builder.widget(new SlotWidget(circuitsInventoryHandler, i)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
- .setPos(151, 4 + i * 18));
+ builder.widget(
+ new SlotWidget(circuitsInventoryHandler, i)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
+ .setPos(151, 4 + i * 18));
}
final DynamicPositionedColumn screenElements = new DynamicPositionedColumn();
drawTexts(screenElements);
builder.widget(screenElements);
- builder.widget(new DrawableWidget()
- .setDrawable(BW_UITextures.PICTURE_STORED_EU_FRAME)
- .setPos(7, 72)
- .setSize(118, 7))
- .widget(new ProgressBar()
- .setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setDirection(ProgressBar.Direction.RIGHT)
- .setTexture(BW_UITextures.PROGRESSBAR_STORED_EU_116, 116)
- .setPos(8, 73)
- .setSize(116, 5));
+ builder.widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_STORED_EU_FRAME).setPos(7, 72).setSize(118, 7))
+ .widget(
+ new ProgressBar()
+ .setProgress(
+ () -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(BW_UITextures.PROGRESSBAR_STORED_EU_116, 116).setPos(8, 73)
+ .setSize(116, 5));
}
private void drawTexts(DynamicPositionedColumn screenElements) {
screenElements.setSpace(0).setPos(11, 8);
screenElements
- .widget(TextWidget.dynamicString(() -> "EU: "
- + GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getStoredEU()))
- .setDefaultColor(COLOR_TEXT_WHITE.get()))
- .widget(TextWidget.dynamicString(() -> "MAX: "
- + (getBaseMetaTileEntity().isActive()
- ? GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getOutputVoltage())
- + String.valueOf(ConfigHandler.energyPerCell)
- .substring(1)
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "EU: " + GT_Utility.formatNumbers(getBaseMetaTileEntity().getStoredEU()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(
+ TextWidget.dynamicString(
+ () -> "MAX: " + (getBaseMetaTileEntity().isActive()
+ ? GT_Utility.formatNumbers(getBaseMetaTileEntity().getOutputVoltage())
+ + String.valueOf(ConfigHandler.energyPerCell).substring(1)
: Integer.toString(0)))
- .setDefaultColor(COLOR_TEXT_WHITE.get()))
- .widget(TextWidget.dynamicString(() -> "MAX EU/t IN: "
- + GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getInputVoltage()))
- .setDefaultColor(COLOR_TEXT_WHITE.get()))
- .widget(TextWidget.dynamicString(() -> "EU/t OUT: "
- + GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getOutputVoltage()))
- .setDefaultColor(COLOR_TEXT_WHITE.get()))
- .widget(TextWidget.dynamicString(() -> "AMP/t IN/OUT: "
- + GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getInputAmperage()))
- .setDefaultColor(COLOR_TEXT_WHITE.get()))
- .widget(new TextWidget(Text.localised("tooltip.LESU.0.name"))
- .setDefaultColor(Color.YELLOW.getRGB())
- .setEnabled(widget -> maxEUStore() >= Long.MAX_VALUE - 1))
- .widget(new TextWidget(Text.localised("tooltip.LESU.1.name"))
- .setDefaultColor(Color.RED.getRGB())
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()));
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "MAX EU/t IN: "
+ + GT_Utility.formatNumbers(getBaseMetaTileEntity().getInputVoltage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "EU/t OUT: "
+ + GT_Utility.formatNumbers(getBaseMetaTileEntity().getOutputVoltage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "AMP/t IN/OUT: "
+ + GT_Utility.formatNumbers(getBaseMetaTileEntity().getInputAmperage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(
+ new TextWidget(Text.localised("tooltip.LESU.0.name")).setDefaultColor(Color.YELLOW.getRGB())
+ .setEnabled(widget -> maxEUStore() >= Long.MAX_VALUE - 1))
+ .widget(
+ new TextWidget(Text.localised("tooltip.LESU.1.name")).setDefaultColor(Color.RED.getRGB())
+ .setEnabled(widget -> !getBaseMetaTileEntity().isActive()));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java
index 38736f5849..caa178b893 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -30,10 +21,16 @@ import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElementNoPlacement;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -46,10 +43,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_ManualTrafo> {
@@ -70,61 +63,57 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
private static final String STRUCTURE_PIECE_LAYER = "layer";
private static final String STRUCTURE_PIECE_TOP = "top";
private static final String STRUCTURE_PIECE_TAP_LAYER = "taplayer";
- private static final IStructureDefinition<GT_TileEntity_ManualTrafo> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_ManualTrafo>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] {{"b~b", "bbb", "bbb"}}))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] {{"ttt", "tft", "ttt"}}))
- .addShape(STRUCTURE_PIECE_TOP, transpose(new String[][] {{"ooo", "ooo", "ooo"}}))
- .addShape(
- STRUCTURE_PIECE_TAP_LAYER,
- transpose(new String[][] {{" TTT ", "TtttT", "TtftT", "TtttT", " TTT "}}))
- .addElement(
- 'b',
- ofChain(
- ofHatchAdder(
- GT_TileEntity_ManualTrafo::addEnergyInputToMachineList, CASING_INDEX, 1),
- ofHatchAdder(
- GT_TileEntity_ManualTrafo::addMaintenanceToMachineList, CASING_INDEX, 1),
- ofBlock(GregTech_API.sBlockCasings1, 2)))
- .addElement(
- 'o',
- ofHatchAdderOptional(
- GT_TileEntity_ManualTrafo::addDynamoToMachineList,
- CASING_INDEX,
- 2,
- GregTech_API.sBlockCasings1,
- 2))
- .addElement('t', ofBlock(BW_BLOCKS[2], 1))
- .addElement('f', ofBlock(BW_BLOCKS[2], 0))
- .addElement('T', new IStructureElementNoPlacement<GT_TileEntity_ManualTrafo>() {
- @Override
- public boolean check(GT_TileEntity_ManualTrafo te, World world, int x, int y, int z) {
- if (world.isAirBlock(x, y, z)) return true;
- TileEntity tileEntity = world.getTileEntity(x, y, z);
- if (tileEntity == null) return true;
- if (!(tileEntity instanceof IGregTechTileEntity)) return true;
- IMetaTileEntity mte = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
- if (mte instanceof GT_MetaTileEntity_Hatch_Dynamo
- || mte instanceof GT_MetaTileEntity_Hatch_Energy) {
- int intier = te.mEnergyHatches.get(0).mTier;
- if (((GT_MetaTileEntity_TieredMachineBlock) mte).mTier
- == intier + (te.upstep ? te.mTiers : -te.mTiers)) {
- te.addToMachineList((IGregTechTileEntity) tileEntity, CASING_INDEX);
- return true;
- } else return false;
- }
- return true;
- }
-
- @Override
- public boolean spawnHint(
- GT_TileEntity_ManualTrafo te, World world, int x, int y, int z, ItemStack itemStack) {
- StructureLibAPI.hintParticle(
- world, x, y, z, StructureLibAPI.getBlockHint(), 2 /* aDots: 3 */);
+ private static final IStructureDefinition<GT_TileEntity_ManualTrafo> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_ManualTrafo>builder()
+ .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { { "b~b", "bbb", "bbb" } }))
+ .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { { "ttt", "tft", "ttt" } }))
+ .addShape(STRUCTURE_PIECE_TOP, transpose(new String[][] { { "ooo", "ooo", "ooo" } }))
+ .addShape(
+ STRUCTURE_PIECE_TAP_LAYER,
+ transpose(new String[][] { { " TTT ", "TtttT", "TtftT", "TtttT", " TTT " } }))
+ .addElement(
+ 'b',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_ManualTrafo::addEnergyInputToMachineList, CASING_INDEX, 1),
+ ofHatchAdder(GT_TileEntity_ManualTrafo::addMaintenanceToMachineList, CASING_INDEX, 1),
+ ofBlock(GregTech_API.sBlockCasings1, 2)))
+ .addElement(
+ 'o',
+ ofHatchAdderOptional(
+ GT_TileEntity_ManualTrafo::addDynamoToMachineList,
+ CASING_INDEX,
+ 2,
+ GregTech_API.sBlockCasings1,
+ 2))
+ .addElement('t', ofBlock(BW_BLOCKS[2], 1)).addElement('f', ofBlock(BW_BLOCKS[2], 0))
+ .addElement('T', new IStructureElementNoPlacement<GT_TileEntity_ManualTrafo>() {
+
+ @Override
+ public boolean check(GT_TileEntity_ManualTrafo te, World world, int x, int y, int z) {
+ if (world.isAirBlock(x, y, z)) return true;
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ if (tileEntity == null) return true;
+ if (!(tileEntity instanceof IGregTechTileEntity)) return true;
+ IMetaTileEntity mte = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
+ if (mte instanceof GT_MetaTileEntity_Hatch_Dynamo
+ || mte instanceof GT_MetaTileEntity_Hatch_Energy) {
+ int intier = te.mEnergyHatches.get(0).mTier;
+ if (((GT_MetaTileEntity_TieredMachineBlock) mte).mTier
+ == intier + (te.upstep ? te.mTiers : -te.mTiers)) {
+ te.addToMachineList((IGregTechTileEntity) tileEntity, CASING_INDEX);
return true;
- }
- })
- .build();
+ } else return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(GT_TileEntity_ManualTrafo te, World world, int x, int y, int z,
+ ItemStack itemStack) {
+ StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 2 /* aDots: 3 */);
+ return true;
+ }
+ }).build();
@Override
public IStructureDefinition<GT_TileEntity_ManualTrafo> getStructureDefinition() {
@@ -134,23 +123,17 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Transformer")
- .addInfo("Controller block for the Manual Trafo")
- .addInfo("Operates in 4 diffrent modes:")
- .addInfo("Mode 1: Circuit 0 in controller: Direct-Upstep")
+ tt.addMachineType("Transformer").addInfo("Controller block for the Manual Trafo")
+ .addInfo("Operates in 4 diffrent modes:").addInfo("Mode 1: Circuit 0 in controller: Direct-Upstep")
.addInfo("Mode 2: Circuit 1 in controller: Direct-Downstep")
.addInfo("Mode 3: Circuit 2 in controller: Tapped-Upstep (currently disabled)")
- .addInfo("Mode 4: Circuit 2 in controller: Tapped-Downstep (currently disabled)")
- .addSeparator()
- .beginVariableStructureBlock(3, 3, 3, 10, 3, 3, false)
- .addController("Front bottom center")
+ .addInfo("Mode 4: Circuit 2 in controller: Tapped-Downstep (currently disabled)").addSeparator()
+ .beginVariableStructureBlock(3, 3, 3, 10, 3, 3, false).addController("Front bottom center")
.addCasingInfo("MV Machine Casing", 0)
.addOtherStructurePart("Transformer-Winding Blocks", "1 Layer for each tier transformed")
.addOtherStructurePart("Nickel-Zinc-Ferrite Blocks", "Middle of Transformer-Winding Blocks")
- .addMaintenanceHatch("Any bottom layer casing", 1)
- .addEnergyHatch("Any bottom layer casing", 1)
- .addDynamoHatch("Any top layer casing", 2)
- .addStructureInfo("---------TAPPED MODE---------")
+ .addMaintenanceHatch("Any bottom layer casing", 1).addEnergyHatch("Any bottom layer casing", 1)
+ .addDynamoHatch("Any top layer casing", 2).addStructureInfo("---------TAPPED MODE---------")
.addEnergyHatch("Touching Transformer-Winding Blocks", 3)
.addDynamoHatch("Touching Transformer-Winding Blocks", 3)
.addStructureInfo("Hatches touching Transformer-Winding Blocks must be tiered from bottom to top")
@@ -187,9 +170,8 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
return false; // this.onRunningTickTabbedMode(); Tapped mode is disable
}
- return this.drainEnergyInput(this.getInputTier() * 2 * this.mEnergyHatches.size())
- && this.addEnergyOutput(this.getInputTier()
- * 2
+ return this.drainEnergyInput(this.getInputTier() * 2 * this.mEnergyHatches.size()) && this.addEnergyOutput(
+ this.getInputTier() * 2
* this.mEnergyHatches.size()
* (long) this.mEfficiency
/ this.getMaxEfficiency(null));
@@ -216,15 +198,13 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
public long getInputTier() {
if (this.mEnergyHatches.size() > 0)
- return GT_Utility.getTier(
- this.mEnergyHatches.get(0).getBaseMetaTileEntity().getInputVoltage());
+ return GT_Utility.getTier(this.mEnergyHatches.get(0).getBaseMetaTileEntity().getInputVoltage());
else return 0L;
}
public long getOutputTier() {
if (this.mDynamoHatches.size() > 0)
- return GT_Utility.getTier(
- this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage());
+ return GT_Utility.getTier(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage());
else return 0L;
}
@@ -241,8 +221,7 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
this.mProgresstime = 0;
this.mMaxProgresstime = 1;
this.mEfficiency = Math.max(this.mEfficiency, 100);
- return this.upstep
- ? this.getOutputTier() - this.getInputTier() == this.mTiers
+ return this.upstep ? this.getOutputTier() - this.getInputTier() == this.mTiers
: this.getInputTier() - this.getOutputTier() == this.mTiers;
}
@@ -324,47 +303,25 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBl
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing()
+ .glow().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@Override
public void construct(ItemStack itemStack, boolean b) {
- if (this.mInventory[1] == null
- || !this.mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) this.mode = 0;
+ if (this.mInventory[1] == null || !this.mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit"))
+ this.mode = 0;
else this.mode = (byte) Math.min(3, this.mInventory[1].getItemDamage());
int mHeight = Math.min(itemStack.stackSize, 8);
boolean tapmode = this.mode > 1;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java
index af69cef98a..4616dfabf8 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -26,6 +17,14 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTI
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.Arrays;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
@@ -33,6 +32,7 @@ import com.github.bartimaeusnek.bartworks.util.MathUtils;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -49,194 +49,70 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.Arrays;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_THTR> {
private static final int BASECASINGINDEX = 44;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_THTR> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_THTR>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {
- " BBBBBBB ",
- " BBBBBBBBB ",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- "BBBBBBBBBBB",
- " BBBBBBBBB ",
- " BBBBBBB "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " ccccccc ",
- " c-------c ",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- "c---------c",
- " c-------c ",
- " ccccccc "
- },
- {
- " bbb~bbb ",
- " bbbbbbbbb ",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- "bbbbbbbbbbb",
- " bbbbbbbbb ",
- " bbbbbbb "
- },
- }))
- .addElement('c', onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12)))
- .addElement(
- 'b',
- ofChain(
- ofHatchAdder(GT_TileEntity_THTR::addOutputToMachineList, BASECASINGINDEX, 1),
- ofHatchAdder(GT_TileEntity_THTR::addMaintenanceToMachineList, BASECASINGINDEX, 1),
- ofHatchAdder(GT_TileEntity_THTR::addEnergyInputToMachineList, BASECASINGINDEX, 1),
- onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12))))
- .addElement(
- 'B',
- ofChain(
- ofHatchAdder(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2),
- onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12))))
- // ofHatchAdderOptional(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2,
- // GregTech_API.sBlockCasings3, 12))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_THTR> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_THTR>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " BBBBBBB ", " BBBBBBBBB ", "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB",
+ "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB", "BBBBBBBBBBB", " BBBBBBBBB ",
+ " BBBBBBB " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " ccccccc ", " c-------c ", "c---------c", "c---------c", "c---------c",
+ "c---------c", "c---------c", "c---------c", "c---------c", " c-------c ",
+ " ccccccc " },
+ { " bbb~bbb ", " bbbbbbbbb ", "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb",
+ "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb", "bbbbbbbbbbb", " bbbbbbbbb ",
+ " bbbbbbb " }, }))
+ .addElement('c', onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12)))
+ .addElement(
+ 'b',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_THTR::addOutputToMachineList, BASECASINGINDEX, 1),
+ ofHatchAdder(GT_TileEntity_THTR::addMaintenanceToMachineList, BASECASINGINDEX, 1),
+ ofHatchAdder(GT_TileEntity_THTR::addEnergyInputToMachineList, BASECASINGINDEX, 1),
+ onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12))))
+ .addElement(
+ 'B',
+ ofChain(
+ ofHatchAdder(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2),
+ onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings3, 12))))
+ // ofHatchAdderOptional(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2,
+ // GregTech_API.sBlockCasings3, 12))
+ .build();
private static final int HELIUM_NEEDED = 730000;
private static final int powerUsage = BW_Util.getMachineVoltageFromTier(5) / 2;
@@ -277,19 +153,13 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
.addInfo(
"Efficiency is calculated exponentially depending on the amount of pebbles in the internal buffer")
.addInfo("Reactor will take 4 800L/t of coolant multiplied by efficiency")
- .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t")
- .addInfo("One Operation takes 9 hour")
- .addSeparator()
- .beginStructureBlock(11, 12, 11, true)
- .addController("Front bottom center")
+ .addInfo("Uses " + GT_Utility.formatNumbers(powerUsage) + " EU/t").addInfo("One Operation takes 9 hour")
+ .addSeparator().beginStructureBlock(11, 12, 11, true).addController("Front bottom center")
.addCasingInfo("Radiation Proof Casings", 500)
.addStructureInfo("Corners and the 2 touching blocks are air (cylindric)")
- .addInputBus("Any top layer casing", 2)
- .addInputHatch("Any top layer casing", 2)
- .addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("Any bottom layer casing", 1)
- .addEnergyHatch("Any bottom layer casing", 1)
- .addMaintenanceHatch("Any bottom layer casing", 1)
+ .addInputBus("Any top layer casing", 2).addInputHatch("Any top layer casing", 2)
+ .addOutputBus("Any bottom layer casing", 1).addOutputHatch("Any bottom layer casing", 1)
+ .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1)
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -307,8 +177,7 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
this.mCasing = 0;
- return (checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0)
- && this.mCasing >= 500
+ return (checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && this.mCasing >= 500
&& this.mMaintenanceHatches.size() == 1
&& this.mInputHatches.size() > 0
&& this.mOutputHatches.size() > 0
@@ -382,14 +251,8 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
if (!(this.HeliumSupply >= GT_TileEntity_THTR.HELIUM_NEEDED && this.fuelsupply >= mincapacity)) return false;
double eff = Math.min(
- Math.pow(
- (double) (this.fuelsupply - mincapacity)
- / ((maxcapacity - mincapacity) / 10D),
- 2D)
- + 1,
- 100D)
- / 100D
- - ((double) (getIdealStatus() - getRepairStatus()) / 10D);
+ Math.pow((double) (this.fuelsupply - mincapacity) / ((maxcapacity - mincapacity) / 10D), 2D) + 1,
+ 100D) / 100D - ((double) (getIdealStatus() - getRepairStatus()) / 10D);
if (eff <= 0D) return false;
int toReduce = MathUtils.floorInt((double) this.fuelsupply * 0.005D * eff);
@@ -400,10 +263,8 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
int meta = THTRMaterials.MATERIAL_USED_FUEL_INDEX;
- this.mOutputItems = new ItemStack[] {
- new ItemStack(THTRMaterials.aTHTR_Materials, burnedballs, meta),
- new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1)
- };
+ this.mOutputItems = new ItemStack[] { new ItemStack(THTRMaterials.aTHTR_Materials, burnedballs, meta),
+ new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1) };
// this.updateSlots(); not needed ?
@@ -478,57 +339,39 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
@Override
public String[] getInfoData() {
- return new String[] {
- "Progress:",
- GT_Utility.formatNumbers(this.mProgresstime / 20) + "secs /"
- + GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + "secs",
- "TRISO-Pebbles:",
- GT_Utility.formatNumbers(this.fuelsupply) + "pcs. / " + GT_Utility.formatNumbers(this.fuelsupply)
- + "psc.",
- "Helium-Level:",
- GT_Utility.formatNumbers(this.HeliumSupply) + "L / "
- + GT_Utility.formatNumbers(GT_TileEntity_THTR.HELIUM_NEEDED) + "L",
- "Coolant/t:", GT_Utility.formatNumbers(this.mProgresstime == 0 ? 0 : coolanttaking) + "L/t",
- "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus())
- };
+ return new String[] { "Progress:",
+ GT_Utility.formatNumbers(this.mProgresstime / 20) + "secs /"
+ + GT_Utility.formatNumbers(this.mMaxProgresstime / 20)
+ + "secs",
+ "TRISO-Pebbles:",
+ GT_Utility.formatNumbers(this.fuelsupply) + "pcs. / "
+ + GT_Utility.formatNumbers(this.fuelsupply)
+ + "psc.",
+ "Helium-Level:",
+ GT_Utility.formatNumbers(this.HeliumSupply) + "L / "
+ + GT_Utility.formatNumbers(GT_TileEntity_THTR.HELIUM_NEEDED)
+ + "L",
+ "Coolant/t:", GT_Utility.formatNumbers(this.mProgresstime == 0 ? 0 : coolanttaking) + "L/t",
+ "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus()) };
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
- .extFacing()
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
+ .extFacing().build(),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
+ .extFacing().glow().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER).extFacing()
.build(),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing()
+ .glow().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX) };
}
@Override
@@ -539,10 +382,12 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
}
this.empty = !this.empty;
GT_Utility.sendChatToPlayer(
- aPlayer, "THTR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
+ aPlayer,
+ "THTR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
}
public static class THTRMaterials {
+
static final SimpleSubItemClass aTHTR_Materials = new SimpleSubItemClass(
"BISOPelletCompound", // 0
"BISOPelletBall", // 1
@@ -551,7 +396,7 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
"TRISOPellet", // 4
"BurnedOutTRISOPelletBall", // 5
"BurnedOutTRISOPellet" // 6
- );
+ );
public static final int MATERIAL_FUEL_INDEX = 4;
public static final int MATERIAL_USED_FUEL_INDEX = 5;
@@ -571,14 +416,12 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1),
WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1),
GT_Values.NI,
- new int[] {800, 375, 22, 22, 5},
+ new int[] { 800, 375, 22, 22, 5 },
10000,
BW_Util.getMachineVoltageFromTier(4));
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Lead, 6),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1)
- },
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Lead, 6),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1) },
Materials.Concrete.getMolten(1296),
new ItemStack(GregTech_API.sBlockCasings3, 1, 12),
40,
@@ -615,10 +458,8 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
Arrays.fill(pellets, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 64, 4));
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(
false,
- new ItemStack[] {
- new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3),
- GT_Utility.getIntegratedCircuit(17)
- },
+ new ItemStack[] { new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3),
+ GT_Utility.getIntegratedCircuit(17) },
pellets,
null,
null,
@@ -629,11 +470,9 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
0);
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(
false,
- new ItemStack[] {
- new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 5),
- GT_Utility.getIntegratedCircuit(17)
- },
- new ItemStack[] {new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 64, 6)},
+ new ItemStack[] { new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 5),
+ GT_Utility.getIntegratedCircuit(17) },
+ new ItemStack[] { new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 64, 6) },
null,
null,
null,
@@ -652,7 +491,7 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_EnhancedMultiBlockBase
GT_Values.NI,
GT_Values.NI,
GT_Values.NI,
- new int[] {300},
+ new int[] { 300 },
1200,
30);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
index 93b003e1b8..8c54264fb7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis;
@@ -26,6 +17,23 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTI
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.GT_Values.V;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityDispenser;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.items.BW_Stonage_Rotors;
@@ -47,6 +55,7 @@ import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -66,21 +75,6 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntityDispenser;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_Windmill>
implements ISurvivalConstructable, IGetTitleColor {
@@ -104,95 +98,76 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
}
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_Windmill> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_Windmill>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {" ", " ", " ", " p ", " ", " ", " "},
- {" ", " ", " ppp ", " p p ", " ppp ", " ", " "},
- {" ", " ppppp ", " p p ", " p p ", " p p ", " ppppp ", " "},
- {" ppppp ", "p p", "p p", "p p", "p p", "p p", " ppppp "},
- {" ppspp ", "p p", "p p", "p p", "p p", "p p", " ppppp "},
- {" ppppp ", "p p", "p p", "p p", "p p", "p p", " ppppp "},
- {" ", " ppppp ", " p p ", " p p ", " p p ", " ppppp ", " "},
- {" ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " "},
- {" ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " "},
- {" ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " "},
- {" ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " "},
- {" bb~bb ", "bbbbbbb", "bbbbbbb", "bbbbbbb", "bbbbbbb", "bbbbbbb", " bbbbb "},
- }))
- .addElement('p', ofBlockAnyMeta(Blocks.planks))
- .addElement(
- 'c',
- ofChain(
- onElementPass(t -> t.mHardenedClay++, ofBlock(Blocks.hardened_clay, 0)),
- ofTileAdder(
- GT_TileEntity_Windmill::addDispenserToOutputSet, Blocks.hardened_clay, 0),
- onElementPass(
- t -> t.mDoor++, new IStructureElementNoPlacement<GT_TileEntity_Windmill>() {
- private final IStructureElement<GT_TileEntity_Windmill> delegate =
- ofBlock(Blocks.wooden_door, 0);
-
- @Override
- public boolean check(
- GT_TileEntity_Windmill gt_tileEntity_windmill,
- World world,
- int x,
- int y,
- int z) {
- return delegate.check(gt_tileEntity_windmill, world, x, y, z);
- }
-
- @Override
- public boolean spawnHint(
- GT_TileEntity_Windmill gt_tileEntity_windmill,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger) {
- return delegate.spawnHint(
- gt_tileEntity_windmill, world, x, y, z, trigger);
- }
- })))
- .addElement('b', ofBlock(Blocks.brick_block, 0))
- .addElement('s', new IStructureElement<GT_TileEntity_Windmill>() {
- @Override
- public boolean check(GT_TileEntity_Windmill t, World world, int x, int y, int z) {
- TileEntity tileEntity = world.getTileEntity(x, y, z);
- return t.setRotorBlock(tileEntity);
- }
+ private static final IStructureDefinition<GT_TileEntity_Windmill> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_Windmill>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " ", " ", " ", " p ", " ", " ", " " },
+ { " ", " ", " ppp ", " p p ", " ppp ", " ", " " },
+ { " ", " ppppp ", " p p ", " p p ", " p p ", " ppppp ", " " },
+ { " ppppp ", "p p", "p p", "p p", "p p", "p p", " ppppp " },
+ { " ppspp ", "p p", "p p", "p p", "p p", "p p", " ppppp " },
+ { " ppppp ", "p p", "p p", "p p", "p p", "p p", " ppppp " },
+ { " ", " ppppp ", " p p ", " p p ", " p p ", " ppppp ", " " },
+ { " ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " " },
+ { " ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " " },
+ { " ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " " },
+ { " ", " ccc ", " c c ", " c c ", " c c ", " ccc ", " " },
+ { " bb~bb ", "bbbbbbb", "bbbbbbb", "bbbbbbb", "bbbbbbb", "bbbbbbb", " bbbbb " }, }))
+ .addElement('p', ofBlockAnyMeta(Blocks.planks))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(t -> t.mHardenedClay++, ofBlock(Blocks.hardened_clay, 0)),
+ ofTileAdder(GT_TileEntity_Windmill::addDispenserToOutputSet, Blocks.hardened_clay, 0),
+ onElementPass(t -> t.mDoor++, new IStructureElementNoPlacement<GT_TileEntity_Windmill>() {
+
+ private final IStructureElement<GT_TileEntity_Windmill> delegate = ofBlock(
+ Blocks.wooden_door,
+ 0);
+
+ @Override
+ public boolean check(GT_TileEntity_Windmill gt_tileEntity_windmill, World world, int x,
+ int y, int z) {
+ return delegate.check(gt_tileEntity_windmill, world, x, y, z);
+ }
- @Override
- public boolean spawnHint(
- GT_TileEntity_Windmill t, World world, int x, int y, int z, ItemStack trigger) {
- StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 0);
- return true;
- }
+ @Override
+ public boolean spawnHint(GT_TileEntity_Windmill gt_tileEntity_windmill, World world,
+ int x, int y, int z, ItemStack trigger) {
+ return delegate.spawnHint(gt_tileEntity_windmill, world, x, y, z, trigger);
+ }
+ })))
+ .addElement('b', ofBlock(Blocks.brick_block, 0))
+ .addElement('s', new IStructureElement<GT_TileEntity_Windmill>() {
+
+ @Override
+ public boolean check(GT_TileEntity_Windmill t, World world, int x, int y, int z) {
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ return t.setRotorBlock(tileEntity);
+ }
- @Override
- public boolean placeBlock(
- GT_TileEntity_Windmill gt_tileEntity_windmill,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger) {
- return false;
- }
+ @Override
+ public boolean spawnHint(GT_TileEntity_Windmill t, World world, int x, int y, int z,
+ ItemStack trigger) {
+ StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 0);
+ return true;
+ }
- @Override
- public BlocksToPlace getBlocksToPlace(
- GT_TileEntity_Windmill gt_tileEntity_windmill,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger,
- AutoPlaceEnvironment env) {
- return BlocksToPlace.create(new ItemStack(ItemRegistry.ROTORBLOCK));
- }
- })
- .build();
+ @Override
+ public boolean placeBlock(GT_TileEntity_Windmill gt_tileEntity_windmill, World world, int x, int y,
+ int z, ItemStack trigger) {
+ return false;
+ }
+
+ @Override
+ public BlocksToPlace getBlocksToPlace(GT_TileEntity_Windmill gt_tileEntity_windmill, World world, int x,
+ int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ return BlocksToPlace.create(new ItemStack(ItemRegistry.ROTORBLOCK));
+ }
+ }).build();
@Override
public IStructureDefinition<GT_TileEntity_Windmill> getStructureDefinition() {
@@ -207,22 +182,16 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Windmill")
- .addInfo("Controller block for the Windmill")
+ tt.addMachineType("Windmill").addInfo("Controller block for the Windmill")
.addInfo("A primitive Grinder powered by Kinetic energy")
.addInfo("Speed and output will be affected by wind speed, recipe and rotor")
- .addInfo("Please use the Primitive Rotor")
- .addInfo("Macerates 16 items at a time")
+ .addInfo("Please use the Primitive Rotor").addInfo("Macerates 16 items at a time")
.addInfo("The structure is too complex!")
- .addInfo("Follow the StructureLib hologram projector to build the main structure.")
- .addSeparator()
- .beginStructureBlock(7, 12, 7, false)
- .addController("Front bottom center")
- .addCasingInfo("Hardened Clay block", 40)
- .addOtherStructurePart("Dispenser", "Any Hardened Clay block")
+ .addInfo("Follow the StructureLib hologram projector to build the main structure.").addSeparator()
+ .beginStructureBlock(7, 12, 7, false).addController("Front bottom center")
+ .addCasingInfo("Hardened Clay block", 40).addOtherStructurePart("Dispenser", "Any Hardened Clay block")
.addOtherStructurePart("0-1 Wooden door", "Any Hardened Clay block")
- .addStructureHint("Primitive Kinetic Shaftbox", 1)
- .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ .addStructureHint("Primitive Kinetic Shaftbox", 1).toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -252,10 +221,11 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
private float[] multiplierRecipe(ItemStack itemStack) {
// will return max and min value of the multiplier, the average of these is used to calculate the multiplier.
- if (itemStack.getItem().equals(Items.wheat)) return new float[] {1.13f, 1.5f};
+ if (itemStack.getItem().equals(Items.wheat)) return new float[] { 1.13f, 1.5f };
else if (itemStack.getItem().equals(Items.bone)
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.glowstone)
- || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.pumpkin)) return new float[] {0.8f, 1f};
+ || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.pumpkin))
+ return new float[] { 0.8f, 1f };
else if (Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.gravel)
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.cobblestone)
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.stone)
@@ -266,16 +236,14 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.wool)
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.netherrack)
|| Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.log)
- || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.log2)) return new float[] {1f, 1.5f};
+ || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.log2))
+ return new float[] { 1f, 1.5f };
else if (GT_OreDictUnificator.getAssociation(itemStack) == null
|| GT_OreDictUnificator.getAssociation(itemStack).mPrefix == null
|| GT_OreDictUnificator.getAssociation(itemStack).mMaterial == null
|| GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial == null
- || GT_OreDictUnificator.getAssociation(itemStack)
- .mMaterial
- .mMaterial
- .getDust(1)
- == null) return new float[] {1f, 1f};
+ || GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial.getDust(1) == null)
+ return new float[] { 1f, 1f };
else if (OrePrefixes.ore.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.oreNetherrack.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.oreEndstone.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
@@ -283,7 +251,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
|| OrePrefixes.oreRedgranite.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.oreMarble.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.oreBasalt.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix))
- return new float[] {0.5f, 1f};
+ return new float[] { 0.5f, 1f };
else if (OrePrefixes.stone.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.stoneBricks.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.stoneChiseled.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
@@ -293,8 +261,8 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
|| OrePrefixes.stoneMossyBricks.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.stoneSmooth.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix)
|| OrePrefixes.cobblestone.equals(GT_OreDictUnificator.getAssociation(itemStack).mPrefix))
- return new float[] {1f, 1.5f};
- return new float[] {1f, 1f};
+ return new float[] { 1f, 1.5f };
+ return new float[] { 1f, 1f };
}
@Override
@@ -324,8 +292,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
mRecipe[1],
Math.max(
mRecipe[0],
- 2f
- * ((float) Math.sqrt((float) 1 / (this.rotorBlock.getWindStrength() + 1)))
+ 2f * ((float) Math.sqrt((float) 1 / (this.rotorBlock.getWindStrength() + 1)))
* OutputMultiplier(rotorBlock)
* (mRecipe[0] + mRecipe[1])));
int amount = (int) Math.floor(multiper * (this.mOutputItems[0].stackSize * this.mMulti));
@@ -376,9 +343,8 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
for (TileEntityDispenser tHatch : this.tileEntityDispensers) {
for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getStackInSlot(i) == null
- || GT_Utility.areStacksEqual(tHatch.getStackInSlot(i), aStack)
- && aStack.stackSize + tHatch.getStackInSlot(i).stackSize <= 64) {
+ if (tHatch.getStackInSlot(i) == null || GT_Utility.areStacksEqual(tHatch.getStackInSlot(i), aStack)
+ && aStack.stackSize + tHatch.getStackInSlot(i).stackSize <= 64) {
if (GT_Utility.areStacksEqual(tHatch.getStackInSlot(i), aStack)) {
ItemStack merge = tHatch.getStackInSlot(i).copy();
merge.stackSize = aStack.stackSize + tHatch.getStackInSlot(i).stackSize;
@@ -461,12 +427,9 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
@Override
public String[] getInfoData() {
- return new String[] {
- "Progress:",
- this.mProgresstime + " Grindings of " + this.mMaxProgresstime + " needed Grindings",
- "GrindPower:",
- this.rotorBlock.getGrindPower() + "KU/t"
- };
+ return new String[] { "Progress:",
+ this.mProgresstime + " Grindings of " + this.mMaxProgresstime + " needed Grindings", "GrindPower:",
+ this.rotorBlock.getGrindPower() + "KU/t" };
}
@SideOnly(Side.CLIENT)
@@ -474,6 +437,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
public void registerIcons(IIconRegister aBlockIconRegister) {
GT_TileEntity_Windmill.iIcons[0] = Blocks.brick_block.getIcon(0, 0);
GT_TileEntity_Windmill.iIconContainers[0] = new IIconContainer() {
+
@Override
public IIcon getIcon() {
return GT_TileEntity_Windmill.iIcons[0];
@@ -492,6 +456,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
GT_TileEntity_Windmill.iIcons[1] = aBlockIconRegister.registerIcon(MainMod.MOD_ID + ":windmill_top");
GT_TileEntity_Windmill.iIconContainers[1] = new IIconContainer() {
+
@Override
public IIcon getIcon() {
return GT_TileEntity_Windmill.iIcons[1];
@@ -510,13 +475,8 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
ITexture[] ret = new ITexture[6];
@@ -537,10 +497,9 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
}
public boolean isClientSide() {
- if (this.getBaseMetaTileEntity().getWorld() != null)
- return this.getBaseMetaTileEntity().getWorld().isRemote
- ? FMLCommonHandler.instance().getSide() == Side.CLIENT
- : FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
+ if (this.getBaseMetaTileEntity().getWorld() != null) return this.getBaseMetaTileEntity().getWorld().isRemote
+ ? FMLCommonHandler.instance().getSide() == Side.CLIENT
+ : FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
}
@@ -582,10 +541,8 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
@Override
public GUITextureSet getGUITextureSet() {
- return new GUITextureSet()
- .setMainBackground(BW_UITextures.BACKGROUND_BROWN)
- .setItemSlot(BW_UITextures.SLOT_BROWN)
- .setTitleTab(
+ return new GUITextureSet().setMainBackground(BW_UITextures.BACKGROUND_BROWN)
+ .setItemSlot(BW_UITextures.SLOT_BROWN).setTitleTab(
BW_UITextures.TAB_TITLE_BROWN,
BW_UITextures.TAB_TITLE_DARK_BROWN,
BW_UITextures.TAB_TITLE_ANGULAR_BROWN);
@@ -593,10 +550,8 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21)
- .setSize(47, 21)
- .setPos(123, 59));
+ builder.widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21).setSize(47, 21).setPos(123, 59));
}
@Override
@@ -606,48 +561,48 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inventoryHandler, 1)
- .setBackground(getGUITextureSet().getItemSlot())
- .setPos(59, 35))
- .widget(
- new DrawableWidget() {
- private static final int DIVIDER = 125;
-
- @Override
- public void onScreenUpdate() {
- super.onScreenUpdate();
- if (mMaxProgresstime > 0) {
- if (System.currentTimeMillis() / DIVIDER % 40 == 30)
- setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[3]);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 20)
- setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[2]);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 10)
- setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[1]);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 0)
- setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[0]);
- } else {
- setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY);
- }
- }
- }.setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY)
- .setPos(85, 27)
- .setSize(32, 32))
+ builder.widget(
+ new SlotWidget(inventoryHandler, 1).setBackground(getGUITextureSet().getItemSlot()).setPos(59, 35))
+ .widget(new DrawableWidget() {
+
+ private static final int DIVIDER = 125;
+
+ @Override
+ public void onScreenUpdate() {
+ super.onScreenUpdate();
+ if (mMaxProgresstime > 0) {
+ if (System.currentTimeMillis() / DIVIDER % 40 == 30)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[3]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 20)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[2]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 10)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[1]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 0)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[0]);
+ } else {
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY);
+ }
+ }
+ }.setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY).setPos(85, 27).setSize(32, 32))
.widget(new FakeSyncWidget.IntegerSyncer(() -> mMaxProgresstime, val -> mMaxProgresstime = val))
- .widget(new ItemDrawable(
+ .widget(
+ new ItemDrawable(
() -> mMachine && !getBaseMetaTileEntity().isActive()
? GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SOFTMALLET, 1, null, null, null)
- : null)
- .asWidget()
- .setPos(66, 66))
- .widget(new FakeSyncWidget.BooleanSyncer(
- () -> getBaseMetaTileEntity().isActive(),
- val -> getBaseMetaTileEntity().setActive(val)))
- .widget(new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setMaxWidth(150)
- .setEnabled(widget -> !mMachine)
- .setPos(92, 22))
+ GT_MetaGenerated_Tool_01.SOFTMALLET,
+ 1,
+ null,
+ null,
+ null)
+ : null).asWidget().setPos(66, 66))
+ .widget(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(
+ new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setMaxWidth(150)
+ .setEnabled(widget -> !mMachine).setPos(92, 22))
.widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
index 845ba95beb..bb00ef8063 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis.mega;
@@ -33,6 +24,16 @@ import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -44,6 +45,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IItemSource;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
@@ -57,14 +59,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.*;
-import java.util.stream.Collectors;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -74,51 +68,46 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
implements ISurvivalConstructable {
private static final int CASING_INDEX = 11;
- private static final IStructureDefinition<GT_TileEntity_MegaBlastFurnace> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_MegaBlastFurnace>builder()
- .addShape("main", createShape())
- .addElement('=', StructureElementAirNoHint.getInstance())
- .addElement(
- 't',
- buildHatchAdder(GT_TileEntity_MegaBlastFurnace.class)
- .atLeast(OutputHatch.withAdder(
- GT_TileEntity_MegaBlastFurnace::addOutputHatchToTopList)
+ private static final IStructureDefinition<GT_TileEntity_MegaBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_MegaBlastFurnace>builder().addShape("main", createShape())
+ .addElement('=', StructureElementAirNoHint.getInstance())
+ .addElement(
+ 't',
+ buildHatchAdder(GT_TileEntity_MegaBlastFurnace.class)
+ .atLeast(
+ OutputHatch.withAdder(GT_TileEntity_MegaBlastFurnace::addOutputHatchToTopList)
.withCount(t -> t.mPollutionOutputHatches.size()))
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- withChannel(
- "coil",
- ofCoil(
- GT_TileEntity_MegaBlastFurnace::setCoilLevel,
- GT_TileEntity_MegaBlastFurnace::getCoilLevel)))
- .addElement(
- 'g',
- withChannel(
- "glass",
- BorosilicateGlass.ofBoroGlass(
- (byte) 0,
- (byte) 1,
- Byte.MAX_VALUE,
- (te, t) -> te.glasTier = t,
- te -> te.glasTier)))
- .addElement(
- 'b',
- buildHatchAdder(GT_TileEntity_MegaBlastFurnace.class)
- .atLeast(
- InputHatch,
- OutputHatch,
- InputBus,
- OutputBus,
- Maintenance,
- TTEnabledEnergyHatchElement.INSTANCE)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .build();
+ .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
+ .addElement('m', Muffler.newAny(CASING_INDEX, 2))
+ .addElement(
+ 'C',
+ withChannel(
+ "coil",
+ ofCoil(
+ GT_TileEntity_MegaBlastFurnace::setCoilLevel,
+ GT_TileEntity_MegaBlastFurnace::getCoilLevel)))
+ .addElement(
+ 'g',
+ withChannel(
+ "glass",
+ BorosilicateGlass.ofBoroGlass(
+ (byte) 0,
+ (byte) 1,
+ Byte.MAX_VALUE,
+ (te, t) -> te.glasTier = t,
+ te -> te.glasTier)))
+ .addElement(
+ 'b',
+ buildHatchAdder(GT_TileEntity_MegaBlastFurnace.class)
+ .atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ TTEnabledEnergyHatchElement.INSTANCE)
+ .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
+ .build();
private static String[][] createShape() {
String[][] raw = new String[20][];
@@ -160,11 +149,8 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
private HeatingCoilLevel mCoilLevel;
protected final ArrayList<GT_MetaTileEntity_Hatch_Output> mPollutionOutputHatches = new ArrayList<>();
- protected final FluidStack[] pollutionFluidStacks = {
- Materials.CarbonDioxide.getGas(1000),
- Materials.CarbonMonoxide.getGas(1000),
- Materials.SulfurDioxide.getGas(1000)
- };
+ protected final FluidStack[] pollutionFluidStacks = { Materials.CarbonDioxide.getGas(1000),
+ Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) };
private int mHeatingCapacity;
private byte glasTier;
private int polPtick = ConfigHandler.basePollutionMBFSecond / 20 * ConfigHandler.megaMachinesMax;
@@ -186,28 +172,21 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Blast Furnace")
- .addInfo("Controller block for the Mega Blast Furnace")
+ tt.addMachineType("Blast Furnace").addInfo("Controller block for the Mega Blast Furnace")
.addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
.addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
.addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
.addInfo(
"For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
.addInfo("Additionally gives +100K for every tier past MV")
- .addPollutionAmount(20 * getPollutionPerTick(null))
- .addSeparator()
- .beginStructureBlock(15, 20, 15, true)
- .addController("3rd layer center")
- .addCasingInfo("Heat Proof Machine Casing", 0)
+ .addPollutionAmount(20 * getPollutionPerTick(null)).addSeparator().beginStructureBlock(15, 20, 15, true)
+ .addController("3rd layer center").addCasingInfo("Heat Proof Machine Casing", 0)
.addOtherStructurePart("864x Heating Coils", "Inner 13x18x13 (Hollow)")
.addOtherStructurePart("1007x Borosilicate Glass", "Outer 15x18x15")
.addStructureInfo("The glass tier limits the Energy Input tier")
- .addEnergyHatch("Any bottom layer casing")
- .addMaintenanceHatch("Any bottom layer casing")
- .addMufflerHatch("Top middle 13x13")
- .addInputBus("Any bottom layer casing")
- .addInputHatch("Any bottom layer casing")
- .addOutputBus("Any bottom layer casing")
+ .addEnergyHatch("Any bottom layer casing").addMaintenanceHatch("Any bottom layer casing")
+ .addMufflerHatch("Top middle 13x13").addInputBus("Any bottom layer casing")
+ .addInputHatch("Any bottom layer casing").addOutputBus("Any bottom layer casing")
.addOutputHatch("Gasses, Any top layer casing")
.addStructureInfo("Recovery amount scales with Muffler Hatch tier")
.addOutputHatch("Platline fluids, Any bottom layer casing")
@@ -245,8 +224,8 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
if (aPlayer.isSneaking()) {
mUseMultiparallelMode = !mUseMultiparallelMode;
if (mUseMultiparallelMode) {
@@ -258,47 +237,26 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
} else {
isBussesSeparate = !isBussesSeparate;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
return true;
}
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing()
+ .glow().build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {casingTexturePages[0][CASING_INDEX]};
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@Override
@@ -346,8 +304,8 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
public boolean checkRecipe(ItemStack itemStack) {
ItemStack[] tInputs = null;
FluidStack[] tFluids = this.getStoredFluids().toArray(new FluidStack[0]);
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
byte tTier = (byte) Math.max(1, Math.min(GT_Utility.getTier(nominalV), V.length - 1));
GT_Recipe tRecipe = null;
@@ -364,36 +322,35 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
}
}
}
- tInputs =
- Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size());
+ tInputs = Arrays
+ .copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size());
tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ this.getBaseMetaTileEntity(),
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ tFluids,
+ tInputs);
if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(false, tFluids, tInputs))) {
break;
}
}
} else {
tInputs = this.getStoredInputs().toArray(new ItemStack[0]);
- if (circuitMode > 0
- && Arrays.stream(tInputs)
- .anyMatch(e ->
- GT_Utility.areStacksEqual(e, GT_Utility.getIntegratedCircuit(circuitMode), true))) {
- List<ItemStack> modInputs = Arrays.stream(tInputs)
- .filter(Objects::nonNull)
- .filter(e -> !e.getItem()
- .equals(GT_Utility.getIntegratedCircuit(circuitMode)
- .getItem()))
+ if (circuitMode > 0 && Arrays.stream(tInputs)
+ .anyMatch(e -> GT_Utility.areStacksEqual(e, GT_Utility.getIntegratedCircuit(circuitMode), true))) {
+ List<ItemStack> modInputs = Arrays.stream(tInputs).filter(Objects::nonNull)
+ .filter(e -> !e.getItem().equals(GT_Utility.getIntegratedCircuit(circuitMode).getItem()))
.collect(Collectors.toList());
modInputs.add(GT_Utility.getIntegratedCircuit(circuitMode));
tInputs = modInputs.toArray(new ItemStack[0]);
}
- tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
+ tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes
+ .findRecipe(this.getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
if (tRecipe == null) {
if (circuitMode == 0) return false;
tInputs = this.getStoredInputs().toArray(new ItemStack[0]);
- tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
+ tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes
+ .findRecipe(this.getBaseMetaTileEntity(), false, V[tTier], tFluids, tInputs);
}
}
@@ -415,8 +372,9 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
float tBatchMultiplier = 1.0f;
if (this.mHeatingCapacity >= tRecipe.mSpecialValue) {
int tCurrentPara = handleParallelRecipe(tRecipe, tFluids, tInputs, (int) tMaxPara);
- tBatchMultiplier =
- mUseMultiparallelMode ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f) : 1.0f;
+ tBatchMultiplier = mUseMultiparallelMode
+ ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f)
+ : 1.0f;
this.updateSlots();
if (tCurrentPara <= 0) return false;
processed = Math.min(tCurrentPara, ConfigHandler.megaMachinesMax);
@@ -430,16 +388,10 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setParallel(processed)
- .setDuration(tRecipe.mDuration)
- .setEUt(nominalV)
- .setRecipeHeat(tRecipe.mSpecialValue)
- .setMultiHeat(mHeatingCapacity)
- .enableHeatOC()
- .enableHeatDiscount()
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setParallel(processed).setDuration(tRecipe.mDuration).setEUt(nominalV)
+ .setRecipeHeat(tRecipe.mSpecialValue).setMultiHeat(mHeatingCapacity).enableHeatOC()
+ .enableHeatDiscount().calculate();
this.mMaxProgresstime = calculator.getDuration();
this.lEUt = calculator.getConsumption();
@@ -546,15 +498,15 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
if (mMaintenanceHatches.size() != 1) return false;
if (LoaderReference.tectech && this.glasTier < 8)
- if (!areLazorsLowPowa()
- || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
- || areThingsNotProperlyTiered(this.getTecTechEnergyMultis())) return false;
+ if (!areLazorsLowPowa() || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
+ || areThingsNotProperlyTiered(this.getTecTechEnergyMultis()))
+ return false;
if (this.glasTier < 8 && !this.mEnergyHatches.isEmpty())
for (GT_MetaTileEntity_Hatch_Energy hatchEnergy : this.mEnergyHatches)
if (this.glasTier < hatchEnergy.mTier) return false;
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
this.mHeatingCapacity = (int) getCoilLevel().getHeat() + 100 * (BW_Util.getTier(nominalV) - 2);
return true;
@@ -563,9 +515,8 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
@SuppressWarnings("rawtypes")
@Optional.Method(modid = "tectech")
private boolean areThingsNotProperlyTiered(Collection collection) {
- if (!collection.isEmpty())
- for (Object tecTechEnergyMulti : collection)
- if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
+ if (!collection.isEmpty()) for (Object tecTechEnergyMulti : collection)
+ if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
return false;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
index c9e2a9d3f9..b8dda555e6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis.mega;
@@ -31,6 +22,16 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -41,6 +42,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IItemSource;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
@@ -53,14 +55,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.Collection;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -82,26 +76,17 @@ public class GT_TileEntity_MegaChemicalReactor
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Chemical Reactor")
- .addInfo("Controller block for the Chemical Reactor")
+ tt.addMachineType("Chemical Reactor").addInfo("Controller block for the Chemical Reactor")
.addInfo("What molecule do you want to synthesize")
- .addInfo("Or you want to replace something in this molecule")
- .addInfo("The structure is too complex!")
- .addInfo("Follow the Structure Lib hologram projector to build the main structure.")
- .addSeparator()
- .beginStructureBlock(5, 5, 9, false)
- .addController("Front center")
+ .addInfo("Or you want to replace something in this molecule").addInfo("The structure is too complex!")
+ .addInfo("Follow the Structure Lib hologram projector to build the main structure.").addSeparator()
+ .beginStructureBlock(5, 5, 9, false).addController("Front center")
.addStructureInfo("46x Chemically Inert Machine Casing (minimum)")
- .addStructureInfo("7x Fusion Coil Block")
- .addStructureInfo("28x PTFE Pipe Casing")
+ .addStructureInfo("7x Fusion Coil Block").addStructureInfo("28x PTFE Pipe Casing")
.addStructureInfo("64x Borosilicate Glass Block (any tier)")
- .addStructureInfo("The glass tier limits the Energy Input tier")
- .addEnergyHatch("Hint block ", 3)
- .addMaintenanceHatch("Hint block ", 2)
- .addInputHatch("Hint block ", 1)
- .addInputBus("Hint block ", 1)
- .addOutputBus("Hint block ", 1)
- .addOutputHatch("Hint block ", 1)
+ .addStructureInfo("The glass tier limits the Energy Input tier").addEnergyHatch("Hint block ", 3)
+ .addMaintenanceHatch("Hint block ", 2).addInputHatch("Hint block ", 1).addInputBus("Hint block ", 1)
+ .addOutputBus("Hint block ", 1).addOutputHatch("Hint block ", 1)
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -112,41 +97,19 @@ public class GT_TileEntity_MegaChemicalReactor
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- casingTexturePages[1][48],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- casingTexturePages[1][48],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { casingTexturePages[1][48],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).extFacing()
+ .glow().build() };
+ return new ITexture[] { casingTexturePages[1][48],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {casingTexturePages[1][48]};
+ return new ITexture[] { casingTexturePages[1][48] };
}
@Override
@@ -169,8 +132,8 @@ public class GT_TileEntity_MegaChemicalReactor
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
if (aPlayer.isSneaking()) {
mUseMultiparallelMode = !mUseMultiparallelMode;
if (mUseMultiparallelMode) {
@@ -190,13 +153,13 @@ public class GT_TileEntity_MegaChemicalReactor
ArrayList<ItemStack> outputItems = new ArrayList<>();
ArrayList<FluidStack> outputFluids = new ArrayList<>();
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
byte tTier = (byte) Math.max(1, Math.min(GT_Utility.getTier(nominalV), V.length - 1));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, V[tTier], tInputFluids, tInputs);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes
+ .findRecipe(this.getBaseMetaTileEntity(), false, V[tTier], tInputFluids, tInputs);
boolean found_Recipe = false;
int processed = 0;
float tBatchMultiplier = 1.0f;
@@ -209,8 +172,9 @@ public class GT_TileEntity_MegaChemicalReactor
}
int tCurrentPara = handleParallelRecipe(tRecipe, tInputFluids, tInputs, (int) tMaxPara);
- tBatchMultiplier =
- mUseMultiparallelMode ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f) : 1.0f;
+ tBatchMultiplier = mUseMultiparallelMode
+ ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f)
+ : 1.0f;
this.updateSlots();
if (tCurrentPara <= 0) {
@@ -226,12 +190,8 @@ public class GT_TileEntity_MegaChemicalReactor
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setParallel(processed)
- .setDuration(tRecipe.mDuration)
- .setEUt(nominalV)
- .enablePerfectOC()
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setParallel(processed).setDuration(tRecipe.mDuration).setEUt(nominalV).enablePerfectOC()
.calculate();
this.mMaxProgresstime = calculator.getDuration();
@@ -285,9 +245,9 @@ public class GT_TileEntity_MegaChemicalReactor
if (mMaintenanceHatches.size() != 1) return false;
if (LoaderReference.tectech && this.glasTier < 8)
- if (!areLazorsLowPowa()
- || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
- || areThingsNotProperlyTiered(this.getTecTechEnergyMultis())) return false;
+ if (!areLazorsLowPowa() || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
+ || areThingsNotProperlyTiered(this.getTecTechEnergyMultis()))
+ return false;
if (this.glasTier < 8 && !this.mEnergyHatches.isEmpty())
for (GT_MetaTileEntity_Hatch_Energy hatchEnergy : this.mEnergyHatches)
@@ -298,38 +258,41 @@ public class GT_TileEntity_MegaChemicalReactor
private static final int CASING_INDEX = 176;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_MegaChemicalReactor> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_MegaChemicalReactor>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {"ttttt", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "ttttt"},
- {"tgggt", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", "teeet"},
- {"tg~gt", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", "teret"},
- {"tgggt", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", "teeet"},
- {"ttttt", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "ttttt"},
- }))
- .addElement('p', ofBlock(GregTech_API.sBlockCasings8, 1))
- .addElement('t', ofBlock(GregTech_API.sBlockCasings8, 0))
- .addElement(
- 'd',
- buildHatchAdder(GT_TileEntity_MegaChemicalReactor.class)
- .atLeast(InputBus, InputHatch, OutputBus, OutputHatch)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(GregTech_API.sBlockCasings8, 0))
- .addElement('r', Maintenance.newAny(CASING_INDEX, 2))
- .addElement(
- 'e',
- ofChain(
- TTEnabledEnergyHatchElement.INSTANCE.newAny(CASING_INDEX, 3),
- ofBlock(GregTech_API.sBlockCasings8, 0)))
- .addElement(
- 'c',
- ofChain(ofBlock(GregTech_API.sBlockCasings4, 7), ofBlock(GregTech_API.sBlockCasings5, 13)))
- .addElement(
- 'g',
- BorosilicateGlass.ofBoroGlass(
- (byte) 0, (byte) 1, Byte.MAX_VALUE, (te, t) -> te.glasTier = t, te -> te.glasTier))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_MegaChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_MegaChemicalReactor>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ttttt", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "ttttt" },
+ { "tgggt", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", "teeet" },
+ { "tg~gt", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", " gcg ", "teret" },
+ { "tgggt", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", " ggg ", "teeet" },
+ { "ttttt", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd", "dptpd",
+ "ttttt" }, }))
+ .addElement('p', ofBlock(GregTech_API.sBlockCasings8, 1))
+ .addElement('t', ofBlock(GregTech_API.sBlockCasings8, 0))
+ .addElement(
+ 'd',
+ buildHatchAdder(GT_TileEntity_MegaChemicalReactor.class)
+ .atLeast(InputBus, InputHatch, OutputBus, OutputHatch).casingIndex(CASING_INDEX).dot(1)
+ .buildAndChain(GregTech_API.sBlockCasings8, 0))
+ .addElement('r', Maintenance.newAny(CASING_INDEX, 2))
+ .addElement(
+ 'e',
+ ofChain(
+ TTEnabledEnergyHatchElement.INSTANCE.newAny(CASING_INDEX, 3),
+ ofBlock(GregTech_API.sBlockCasings8, 0)))
+ .addElement('c', ofChain(ofBlock(GregTech_API.sBlockCasings4, 7), ofBlock(GregTech_API.sBlockCasings5, 13)))
+ .addElement(
+ 'g',
+ BorosilicateGlass.ofBoroGlass(
+ (byte) 0,
+ (byte) 1,
+ Byte.MAX_VALUE,
+ (te, t) -> te.glasTier = t,
+ te -> te.glasTier))
+ .build();
@Override
public IStructureDefinition<GT_TileEntity_MegaChemicalReactor> getStructureDefinition() {
@@ -339,9 +302,8 @@ public class GT_TileEntity_MegaChemicalReactor
@SuppressWarnings("rawtypes")
@Optional.Method(modid = "tectech")
private boolean areThingsNotProperlyTiered(Collection collection) {
- if (!collection.isEmpty())
- for (Object tecTechEnergyMulti : collection)
- if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
+ if (!collection.isEmpty()) for (Object tecTechEnergyMulti : collection)
+ if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
return false;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
index 85cfa191b1..2cc880e4b0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis.mega;
@@ -31,6 +22,17 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
@@ -41,6 +43,7 @@ import com.gtnewhorizon.structurelib.structure.IItemSource;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElementCheckOnly;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -55,15 +58,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -71,6 +65,7 @@ import net.minecraftforge.fluids.FluidStack;
striprefs = true)
public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaDistillTower>
implements ISurvivalConstructable {
+
protected static final int CASING_INDEX = 49;
protected static final String STRUCTURE_PIECE_BASE = "base";
protected static final String STRUCTURE_PIECE_LAYER = "layer";
@@ -78,203 +73,70 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
private static final IStructureDefinition<GT_TileEntity_MegaDistillTower> STRUCTURE_DEFINITION;
static {
- IHatchElement<GT_TileEntity_MegaDistillTower> layeredOutputHatch = OutputHatch.withCount(
- GT_TileEntity_MegaDistillTower::getCurrentLayerOutputHatchCount)
+ IHatchElement<GT_TileEntity_MegaDistillTower> layeredOutputHatch = OutputHatch
+ .withCount(GT_TileEntity_MegaDistillTower::getCurrentLayerOutputHatchCount)
.withAdder(GT_TileEntity_MegaDistillTower::addLayerOutputHatch);
- STRUCTURE_DEFINITION = StructureDefinition.<GT_TileEntity_MegaDistillTower>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] {
- {
- "bbbbbbb~bbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb",
- "bbbbbbbbbbbbbbb"
- },
- }))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] {
- {
- "lllllllllllllll",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lcccccccccccccl",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- }))
- .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] {
- {
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- {
- "lllllllllllllll",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "l=============l",
- "lllllllllllllll"
- },
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GT_TileEntity_MegaDistillTower>builder().addShape(
+ STRUCTURE_PIECE_BASE,
+ transpose(
+ new String[][] { { "bbbbbbb~bbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb",
+ "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb",
+ "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb",
+ "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb", "bbbbbbbbbbbbbbb" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAYER,
+ transpose(
+ new String[][] { { "lllllllllllllll", "lcccccccccccccl", "lcccccccccccccl",
+ "lcccccccccccccl", "lcccccccccccccl", "lcccccccccccccl", "lcccccccccccccl",
+ "lcccccccccccccl", "lcccccccccccccl", "lcccccccccccccl", "lcccccccccccccl",
+ "lcccccccccccccl", "lcccccccccccccl", "lcccccccccccccl", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" }, }))
+ .addShape(
+ STRUCTURE_PIECE_TOP_HINT,
+ transpose(
+ new String[][] { { "lllllllllllllll", "lllllllllllllll", "lllllllllllllll",
+ "lllllllllllllll", "lllllllllllllll", "lllllllllllllll", "lllllllllllllll",
+ "lllllllllllllll", "lllllllllllllll", "lllllllllllllll", "lllllllllllllll",
+ "lllllllllllllll", "lllllllllllllll", "lllllllllllllll", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" },
+ { "lllllllllllllll", "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "l=============l", "l=============l",
+ "l=============l", "lllllllllllllll" }, }))
.addElement('=', StructureElementAirNoHint.getInstance())
.addElement(
'b',
@@ -286,20 +148,18 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
OutputBus,
Maintenance,
TTEnabledEnergyHatchElement.INSTANCE)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(onElementPass(
- GT_TileEntity_MegaDistillTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .casingIndex(CASING_INDEX).dot(1).buildAndChain(
+ onElementPass(
+ GT_TileEntity_MegaDistillTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
.addElement(
'l',
buildHatchAdder(GT_TileEntity_MegaDistillTower.class)
.atLeast(layeredOutputHatch, Maintenance, TTEnabledEnergyHatchElement.INSTANCE)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(onElementPass(
- GT_TileEntity_MegaDistillTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .casingIndex(CASING_INDEX).dot(1).buildAndChain(
+ onElementPass(
+ GT_TileEntity_MegaDistillTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
.addElement('c', (IStructureElementCheckOnly<GT_TileEntity_MegaDistillTower>) (t, world, x, y, z) -> {
if (world.isAirBlock(x, y, z)) {
if (t.mTopState < 1) {
@@ -331,8 +191,7 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
} else {
return false;
}
- })
- .build();
+ }).build();
}
protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
@@ -361,15 +220,14 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
}
protected int getCurrentLayerOutputHatchCount() {
- return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0
- ? 0
+ return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
: mOutputHatchesByLayer.get(mHeight - 1).size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null
- || aTileEntity.isDead()
- || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) return false;
+ if (aTileEntity == null || aTileEntity.isDead()
+ || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output))
+ return false;
while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>());
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
@@ -382,41 +240,19 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
+ .build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@Override
@@ -427,17 +263,12 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Distillery")
- .addInfo("Controller block for the Distillation Tower")
+ tt.addMachineType("Distillery").addInfo("Controller block for the Distillation Tower")
.addInfo("Fluids are only put out at the correct height")
- .addInfo("The correct height equals the slot number in the NEI recipe")
- .addSeparator()
- .beginVariableStructureBlock(15, 15, 16, 56, 15, 15, true)
- .addController("Front bottom")
+ .addInfo("The correct height equals the slot number in the NEI recipe").addSeparator()
+ .beginVariableStructureBlock(15, 15, 16, 56, 15, 15, true).addController("Front bottom")
.addOtherStructurePart("Clean Stainless Steel Machine Casing", "15 x h - 5 (minimum)")
- .addEnergyHatch("Any casing")
- .addMaintenanceHatch("Any casing")
- .addInputHatch("Any bottom layer casing")
+ .addEnergyHatch("Any casing").addMaintenanceHatch("Any casing").addInputHatch("Any bottom layer casing")
.addOutputBus("Any bottom layer casing")
.addOutputHatch("2-11x Output Hatches (One per Output Layer except bottom layer)")
.addStructureInfo("An \"Output Layer\" consists of 5 layers!")
@@ -468,8 +299,7 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
// check each layer
while (mHeight < 12 && checkPiece(STRUCTURE_PIECE_LAYER, 7, mHeight * 5, 0) && !mTopLayerFound) {
- if (mOutputHatchesByLayer.size() < mHeight
- || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
+ if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
// layer without output hatch
return false;
mTopState = -1;
@@ -496,19 +326,46 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
if (mMachine) return -1;
int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
mHeight = 0;
- int built =
- survivialBuildPiece(STRUCTURE_PIECE_BASE, stackSize, 7, 0, 0, realBudget, source, actor, false, true);
+ int built = survivialBuildPiece(
+ STRUCTURE_PIECE_BASE,
+ stackSize,
+ 7,
+ 0,
+ 0,
+ realBudget,
+ source,
+ actor,
+ false,
+ true);
if (built >= 0) return built;
int tTotalHeight = Math.min(12, stackSize.stackSize + 2); // min 2 output layer, so at least 1 + 2 height
for (int i = 1; i < tTotalHeight - 1; i++) {
mHeight = i;
built = survivialBuildPiece(
- STRUCTURE_PIECE_LAYER, stackSize, 7, 5 * mHeight, 0, realBudget, source, actor, false, true);
+ STRUCTURE_PIECE_LAYER,
+ stackSize,
+ 7,
+ 5 * mHeight,
+ 0,
+ realBudget,
+ source,
+ actor,
+ false,
+ true);
if (built >= 0) return built;
}
mHeight = tTotalHeight - 1;
return survivialBuildPiece(
- STRUCTURE_PIECE_TOP_HINT, stackSize, 7, 5 * mHeight, 0, realBudget, source, actor, false, true);
+ STRUCTURE_PIECE_TOP_HINT,
+ stackSize,
+ 7,
+ 5 * mHeight,
+ 0,
+ realBudget,
+ source,
+ actor,
+ false,
+ true);
}
private boolean mUseMultiparallelMode = false;
@@ -526,8 +383,8 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
if (aPlayer.isSneaking()) {
mUseMultiparallelMode = !mUseMultiparallelMode;
if (mUseMultiparallelMode) {
@@ -559,8 +416,8 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
}
}
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
byte tTier = (byte) Math.max(0, Math.min(GT_Utility.getTier(nominalV), V.length - 1));
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
@@ -572,7 +429,11 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
int processed = 0;
boolean found_Recipe = false;
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, GT_Values.V[tTier], new FluidStack[] {tFluid}, tItems);
+ this.getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[tTier],
+ new FluidStack[] { tFluid },
+ tItems);
float tBatchMultiplier = 1.0f;
if (tRecipe != null) {
found_Recipe = true;
@@ -580,7 +441,7 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
if (mUseMultiparallelMode && tMaxPara == ConfigHandler.megaMachinesMax) {
tMaxPara *= 128;
}
- int tCurrentPara = handleParallelRecipe(tRecipe, new FluidStack[] {tFluid}, null, (int) tMaxPara);
+ int tCurrentPara = handleParallelRecipe(tRecipe, new FluidStack[] { tFluid }, null, (int) tMaxPara);
tBatchMultiplier = mUseMultiparallelMode
? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f)
: 1.0f;
@@ -595,12 +456,8 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setParallel(processed)
- .setDuration(tRecipe.mDuration)
- .setEUt(nominalV)
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setParallel(processed).setDuration(tRecipe.mDuration).setEUt(nominalV).calculate();
this.mMaxProgresstime = calculator.getDuration();
this.lEUt = calculator.getConsumption();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java
index 6374f59613..abe44efdc7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java
@@ -3,6 +3,17 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega;
import static gregtech.api.enums.GT_HatchElement.Energy;
import static gregtech.api.enums.GT_Values.V;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
@@ -15,6 +26,7 @@ import com.google.common.collect.ImmutableList;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -22,15 +34,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.*;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.IGT_HatchAdder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -75,9 +78,8 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
@Optional.Method(modid = "tectech")
boolean areLazorsLowPowa() {
Collection collection = this.getTecTechEnergyTunnels();
- if (!collection.isEmpty())
- for (Object tecTechEnergyMulti : collection)
- if (!(tecTechEnergyMulti instanceof LowPowerLaser)) return false;
+ if (!collection.isEmpty()) for (Object tecTechEnergyMulti : collection)
+ if (!(tecTechEnergyMulti instanceof LowPowerLaser)) return false;
return true;
}
@@ -88,14 +90,14 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
}
@Override
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Optional.Method(modid = "tectech")
public List getTecTechEnergyTunnels() {
return TTTunnels;
}
@Override
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Optional.Method(modid = "tectech")
public List getTecTechEnergyMultis() {
return TTMultiAmp;
@@ -151,54 +153,82 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
}
}
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
String tName = BW_Util.getTierNameFromVoltage(nominalV);
if (tName.equals("MAX+")) tName = EnumChatFormatting.OBFUSCATED + "MAX+";
return new String[] {
- StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(this.mProgresstime / 20) + EnumChatFormatting.RESET + " s / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(this.mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s",
- StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU",
- StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(-this.lEUt) + EnumChatFormatting.RESET + " EU/t",
- StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(this.getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*"
- + GT_Utility.formatNumbers(TecTechUtils.getMaxInputAmperage(this)) + "A) = "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(nominalV) + EnumChatFormatting.RESET,
- StatCollector.translateToLocal("GT5U.machines.tier") + ": " + EnumChatFormatting.YELLOW + tName
- + EnumChatFormatting.RESET,
- StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED
- + (this.getIdealStatus() - this.getRepairStatus()) + EnumChatFormatting.RESET + " "
- + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
- + ": " + EnumChatFormatting.YELLOW
- + (float) this.mEfficiency / 100.0F + EnumChatFormatting.RESET + " %",
- StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN
- + mPollutionReduction + EnumChatFormatting.RESET + " %",
- BW_Tooltip_Reference.BW
- };
+ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(this.mProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(this.mMaxProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s",
+ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(storedEnergy)
+ + EnumChatFormatting.RESET
+ + " EU / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(maxEnergy)
+ + EnumChatFormatting.RESET
+ + " EU",
+ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": "
+ + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(-this.lEUt)
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(this.getMaxInputVoltage())
+ + EnumChatFormatting.RESET
+ + " EU/t(*"
+ + GT_Utility.formatNumbers(TecTechUtils.getMaxInputAmperage(this))
+ + "A) = "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(nominalV)
+ + EnumChatFormatting.RESET,
+ StatCollector.translateToLocal("GT5U.machines.tier") + ": "
+ + EnumChatFormatting.YELLOW
+ + tName
+ + EnumChatFormatting.RESET,
+ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ + EnumChatFormatting.RED
+ + (this.getIdealStatus() - this.getRepairStatus())
+ + EnumChatFormatting.RESET
+ + " "
+ + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
+ + ": "
+ + EnumChatFormatting.YELLOW
+ + (float) this.mEfficiency / 100.0F
+ + EnumChatFormatting.RESET
+ + " %",
+ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": "
+ + EnumChatFormatting.GREEN
+ + mPollutionReduction
+ + EnumChatFormatting.RESET
+ + " %",
+ BW_Tooltip_Reference.BW };
}
/**
* Calculates the overclock for megas. Will set this.mMaxProgressTime and this.lEUt automatically
- * @deprecated
- * Use GT_OverclockCalculator instead
+ *
+ * @deprecated Use GT_OverclockCalculator instead
*
- * @param aEUt EUt of the recipe
- * @param aDuration Duration of the recipe
+ * @param aEUt EUt of the recipe
+ * @param aDuration Duration of the recipe
* @param maxInputVoltage Max input voltage of the mega (nominal, so 1A)
- * @param perfectOC Flag if the multi has perfect OC
+ * @param perfectOC Flag if the multi has perfect OC
* @return Number of performed overclocks
*/
@Deprecated
- protected byte calculateOverclockedNessMultiInternal(
- long aEUt, int aDuration, long maxInputVoltage, boolean perfectOC) {
+ protected byte calculateOverclockedNessMultiInternal(long aEUt, int aDuration, long maxInputVoltage,
+ boolean perfectOC) {
byte mTier = (byte) Math.max(0, BW_Util.getTier(maxInputVoltage)), overclockCount = 0;
if (mTier == 0) {
// Long time calculation
@@ -223,9 +253,8 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
tempEUt <<= 2; // this actually controls overclocking
// xEUt *= 4;//this is effect of everclocking
this.mMaxProgresstime >>= perfectOC ? 2 : 1; // this is effect of overclocking
- xEUt = this.mMaxProgresstime <= 0
- ? xEUt >> 1
- : xEUt << 2; // U know, if the time is less than 1 tick make the machine use less power
+ xEUt = this.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 2; // U know, if the time is less than 1 tick
+ // make the machine use less power
overclockCount++;
}
@@ -251,11 +280,11 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
/**
* Calculates the overclock for megas. Will set this.mMaxProgressTime and this.lEUt automatically
- * @deprecated
- * Use GT_OverclockCalculator instead
+ *
+ * @deprecated Use GT_OverclockCalculator instead
*
- * @param aEUt EUt of the recipe
- * @param aDuration Duration of the recipe
+ * @param aEUt EUt of the recipe
+ * @param aDuration Duration of the recipe
* @param maxInputVoltage Max input voltage of the mega (nominal, so 1A)
*/
protected void calculateOverclockedNessMulti(long aEUt, int aDuration, long maxInputVoltage) {
@@ -264,11 +293,11 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
/**
* Calculates the overclock for megas. Will set this.mMaxProgressTime and this.lEUt automatically
- * @deprecated
- * Use GT_OverclockCalculator instead
+ *
+ * @deprecated Use GT_OverclockCalculator instead
*
- * @param aEUt EUt of the recipe
- * @param aDuration Duration of the recipe
+ * @param aEUt EUt of the recipe
+ * @param aDuration Duration of the recipe
* @param maxInputVoltage Max input voltage of the mega (nominal, so 1A)
*/
@Deprecated
@@ -314,11 +343,11 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
return true;
} else if (this.lEUt < 0
&& !this.drainEnergyInput((-this.lEUt) * 10000L / (long) Math.max(1000, this.mEfficiency))) {
- this.stopMachine();
- return false;
- } else {
- return true;
- }
+ this.stopMachine();
+ return false;
+ } else {
+ return true;
+ }
}
@Override
@@ -342,13 +371,14 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
}
protected enum TTEnabledEnergyHatchElement implements IHatchElement<GT_TileEntity_MegaMultiBlockBase<?>> {
+
INSTANCE;
private static final List<? extends Class<? extends IMetaTileEntity>> mteClasses;
static {
- ImmutableList.Builder<Class<? extends IMetaTileEntity>> builder =
- ImmutableList.<Class<? extends IMetaTileEntity>>builder().addAll(Energy.mteClasses());
+ ImmutableList.Builder<Class<? extends IMetaTileEntity>> builder = ImmutableList
+ .<Class<? extends IMetaTileEntity>>builder().addAll(Energy.mteClasses());
if (LoaderReference.tectech) builder.add(GT_MetaTileEntity_Hatch_EnergyMulti.class);
mteClasses = builder.build();
}
@@ -370,6 +400,7 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
}
protected static class StructureElementAirNoHint<T> implements IStructureElement<T> {
+
private static final StructureElementAirNoHint<?> INSTANCE = new StructureElementAirNoHint<>();
@SuppressWarnings("unchecked")
@@ -389,7 +420,12 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
if (world.blockExists(x, y, z) && !world.isAirBlock(x, y, z))
// hint if this is obstructed. in case *someone* ever finish the transparent rendering
StructureLibAPI.hintParticle(
- world, x, y, z, StructureLibAPI.getBlockHint(), StructureLibAPI.HINT_BLOCK_META_AIR);
+ world,
+ x,
+ y,
+ z,
+ StructureLibAPI.getBlockHint(),
+ StructureLibAPI.HINT_BLOCK_META_AIR);
return true;
}
@@ -400,14 +436,14 @@ public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_M
}
@Override
- public BlocksToPlace getBlocksToPlace(
- T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
return BlocksToPlace.createEmpty();
}
@Override
- public PlaceResult survivalPlaceBlock(
- T o, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public PlaceResult survivalPlaceBlock(T o, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
if (check(o, world, x, y, z)) return PlaceResult.SKIP;
if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT;
world.setBlock(x, y, z, Blocks.air, 0, 2);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
index e96c5bd707..88121e2d85 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2022 SKYCATV587
- *
- * 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) 2022 SKYCATV587 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.common.tileentities.multis.mega;
@@ -31,6 +22,14 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
@@ -41,6 +40,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IItemSource;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
@@ -56,12 +56,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -69,119 +63,66 @@ import net.minecraftforge.fluids.FluidStack;
striprefs = true)
public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaOilCracker>
implements ISurvivalConstructable {
+
private static final int CASING_INDEX = 49;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_MegaOilCracker> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_MegaOilCracker>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {
- " p p ",
- "ppgggggggggpp",
- " pgggggggggp ",
- " pgggpppgggp ",
- " pgggpMpgggp ",
- " pgggpppgggp ",
- " pgggggggggp ",
- "ppgggggggggpp",
- " p p "
- },
- {
- " p p ",
- "pgggggggggggp",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- "pgggggggggggp",
- " p p "
- },
- {
- " p p ",
- "pgggggggggggp",
- " g c c c c g ",
- " p c c p ",
- " p c c c c p ",
- " p c c p ",
- " g c c c c g ",
- "pgggggggggggp",
- " p p "
- },
- {
- " p p ",
- "pgggggggggggp",
- " g c c c c g ",
- " p c c c c p ",
- " l c c c c r ",
- " p c c c c p ",
- " g c c c c g ",
- "pgggggggggggp",
- " p p "
- },
- {
- " p p ",
- "pgggggggggggp",
- " g c c c c g ",
- " p c c p ",
- " p c c c c p ",
- " p c c p ",
- " g c c c c g ",
- "pgggggggggggp",
- " p p "
- },
- {
- " p p ",
- "pgggggggggggp",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- " g c c c c g ",
- "pgggggggggggp",
- " p p "
- },
- {
- "ppmmmm~mmmmpp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppppppppppppp",
- "ppmmmmmmmmmpp"
- },
- }))
- .addElement(
- 'c',
- ofCoil(
- GT_TileEntity_MegaOilCracker::setCoilLevel,
- GT_TileEntity_MegaOilCracker::getCoilLevel))
- .addElement('p', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'l',
- InputHatch.withAdder(GT_TileEntity_MegaOilCracker::addLeftHatchToMachineList)
- .newAny(CASING_INDEX, 2))
- .addElement(
- 'r',
- OutputHatch.withAdder(GT_TileEntity_MegaOilCracker::addRightHatchToMachineList)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'm',
- buildHatchAdder(GT_TileEntity_MegaOilCracker.class)
- .atLeast(TTEnabledEnergyHatchElement.INSTANCE, Maintenance)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'M',
- InputHatch.withAdder(GT_TileEntity_MegaOilCracker::addMiddleInputToMachineList)
- .newAny(CASING_INDEX, 4))
- .addElement(
- 'g',
- BorosilicateGlass.ofBoroGlass(
- (byte) 0, (byte) 1, Byte.MAX_VALUE, (te, t) -> te.glasTier = t, te -> te.glasTier))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_MegaOilCracker> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_MegaOilCracker>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " p p ", "ppgggggggggpp", " pgggggggggp ", " pgggpppgggp ",
+ " pgggpMpgggp ", " pgggpppgggp ", " pgggggggggp ", "ppgggggggggpp",
+ " p p " },
+ { " p p ", "pgggggggggggp", " g c c c c g ", " g c c c c g ",
+ " g c c c c g ", " g c c c c g ", " g c c c c g ", "pgggggggggggp",
+ " p p " },
+ { " p p ", "pgggggggggggp", " g c c c c g ", " p c c p ",
+ " p c c c c p ", " p c c p ", " g c c c c g ", "pgggggggggggp",
+ " p p " },
+ { " p p ", "pgggggggggggp", " g c c c c g ", " p c c c c p ",
+ " l c c c c r ", " p c c c c p ", " g c c c c g ", "pgggggggggggp",
+ " p p " },
+ { " p p ", "pgggggggggggp", " g c c c c g ", " p c c p ",
+ " p c c c c p ", " p c c p ", " g c c c c g ", "pgggggggggggp",
+ " p p " },
+ { " p p ", "pgggggggggggp", " g c c c c g ", " g c c c c g ",
+ " g c c c c g ", " g c c c c g ", " g c c c c g ", "pgggggggggggp",
+ " p p " },
+ { "ppmmmm~mmmmpp", "ppppppppppppp", "ppppppppppppp", "ppppppppppppp",
+ "ppppppppppppp", "ppppppppppppp", "ppppppppppppp", "ppppppppppppp",
+ "ppmmmmmmmmmpp" }, }))
+ .addElement(
+ 'c',
+ ofCoil(GT_TileEntity_MegaOilCracker::setCoilLevel, GT_TileEntity_MegaOilCracker::getCoilLevel))
+ .addElement('p', ofBlock(GregTech_API.sBlockCasings4, 1))
+ .addElement(
+ 'l',
+ InputHatch.withAdder(GT_TileEntity_MegaOilCracker::addLeftHatchToMachineList)
+ .newAny(CASING_INDEX, 2))
+ .addElement(
+ 'r',
+ OutputHatch.withAdder(GT_TileEntity_MegaOilCracker::addRightHatchToMachineList)
+ .newAny(CASING_INDEX, 3))
+ .addElement(
+ 'm',
+ buildHatchAdder(GT_TileEntity_MegaOilCracker.class)
+ .atLeast(TTEnabledEnergyHatchElement.INSTANCE, Maintenance).casingIndex(CASING_INDEX).dot(1)
+ .buildAndChain(GregTech_API.sBlockCasings4, 1))
+ .addElement(
+ 'M',
+ InputHatch.withAdder(GT_TileEntity_MegaOilCracker::addMiddleInputToMachineList)
+ .newAny(CASING_INDEX, 4))
+ .addElement(
+ 'g',
+ BorosilicateGlass.ofBoroGlass(
+ (byte) 0,
+ (byte) 1,
+ Byte.MAX_VALUE,
+ (te, t) -> te.glasTier = t,
+ te -> te.glasTier))
+ .build();
private byte glasTier;
private HeatingCoilLevel heatLevel;
protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>();
@@ -199,25 +140,19 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cracker")
- .addInfo("Controller block for the Mega Oil Cracking")
+ tt.addMachineType("Cracker").addInfo("Controller block for the Mega Oil Cracking")
.addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
.addInfo("More efficient than the Chemical Reactor")
.addInfo("Gives different benefits whether it hydro or steam-cracks:")
.addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
.addInfo("Steam - Outputs 50% more cracked fluid")
.addInfo("(Values compared to cracking in the Chemical Reactor)")
- .addInfo("Place the appropriate circuit in the controller")
- .addSeparator()
- .beginStructureBlock(13, 7, 9, true)
- .addController("Front bottom")
+ .addInfo("Place the appropriate circuit in the controller").addSeparator()
+ .beginStructureBlock(13, 7, 9, true).addController("Front bottom")
.addStructureInfo("The glass tier limits the Energy Input tier")
.addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
- .addEnergyHatch("Hint block", 1)
- .addMaintenanceHatch("Hint block", 1)
- .addInputHatch("Hint block", 2, 3)
- .addOutputHatch("Hint block", 2, 3)
- .addInputHatch("Steam/Hydrogen ONLY, Hint block", 4)
+ .addEnergyHatch("Hint block", 1).addMaintenanceHatch("Hint block", 1).addInputHatch("Hint block", 2, 3)
+ .addOutputHatch("Hint block", 2, 3).addInputHatch("Steam/Hydrogen ONLY, Hint block", 4)
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -228,41 +163,18 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_OIL_CRACKER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).extFacing().glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).extFacing().glow().build() };
}
- return new ITexture[] {casingTexturePages[0][CASING_INDEX]};
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@Override
@@ -277,18 +189,17 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
ArrayList<ItemStack> outputItems = new ArrayList<>();
ArrayList<FluidStack> outputFluids = new ArrayList<>();
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
byte tTier = (byte) Math.max(1, Math.min(GT_Utility.getTier(nominalV), V.length - 1));
- GT_Recipe tRecipe = getRecipeMap()
- .findRecipe(
- getBaseMetaTileEntity(),
- false,
- gregtech.api.enums.GT_Values.V[tTier],
- tInputFluids,
- mInventory[1]);
+ GT_Recipe tRecipe = getRecipeMap().findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ tInputFluids,
+ mInventory[1]);
boolean found_Recipe = false;
int processed = 0;
@@ -311,12 +222,8 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setParallel(processed)
- .setDuration(tRecipe.mDuration)
- .setEUt(nominalV)
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setParallel(processed).setDuration(tRecipe.mDuration).setEUt(nominalV).calculate();
this.mMaxProgresstime = calculator.getDuration();
this.lEUt = calculator.getConsumption();
@@ -383,9 +290,9 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
if (mMaintenanceHatches.size() != 1) return false;
if (LoaderReference.tectech && this.glasTier < 8)
- if (!areLazorsLowPowa()
- || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
- || areThingsNotProperlyTiered(this.getTecTechEnergyMultis())) return false;
+ if (!areLazorsLowPowa() || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels())
+ || areThingsNotProperlyTiered(this.getTecTechEnergyMultis()))
+ return false;
if (this.glasTier < 8 && !this.mEnergyHatches.isEmpty())
for (GT_MetaTileEntity_Hatch_Energy hatchEnergy : this.mEnergyHatches)
@@ -506,9 +413,8 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
@SuppressWarnings("rawtypes")
@Optional.Method(modid = "tectech")
private boolean areThingsNotProperlyTiered(Collection collection) {
- if (!collection.isEmpty())
- for (Object tecTechEnergyMulti : collection)
- if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
+ if (!collection.isEmpty()) for (Object tecTechEnergyMulti : collection)
+ if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) return true;
return false;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
index 0607ba5615..9ea2d56114 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.multis.mega;
@@ -31,6 +22,15 @@ import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
@@ -40,6 +40,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IItemSource;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
@@ -50,13 +51,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
@Optional.Interface(
iface = "com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti",
@@ -82,298 +76,93 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
private static final int CASING_INDEX = 17;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_TileEntity_MegaVacuumFreezer> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_TileEntity_MegaVacuumFreezer>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccc~ccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "c=============c",
- "ccccccccccccccc"
- },
- {
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc",
- "ccccccccccccccc"
- }
- }))
- .addElement('=', StructureElementAirNoHint.getInstance())
- .addElement(
- 'c',
- buildHatchAdder(GT_TileEntity_MegaVacuumFreezer.class)
- .atLeast(
- TTEnabledEnergyHatchElement.INSTANCE,
- InputHatch,
- InputBus,
- OutputHatch,
- OutputBus,
- Maintenance)
- .casingIndex(CASING_INDEX)
- .dot(1)
- .buildAndChain(
- onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 1))))
- .build();
+ private static final IStructureDefinition<GT_TileEntity_MegaVacuumFreezer> STRUCTURE_DEFINITION = StructureDefinition
+ .<GT_TileEntity_MegaVacuumFreezer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccc~ccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "c=============c", "c=============c",
+ "c=============c", "c=============c", "ccccccccccccccc" },
+ { "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc",
+ "ccccccccccccccc", "ccccccccccccccc", "ccccccccccccccc" } }))
+ .addElement('=', StructureElementAirNoHint.getInstance())
+ .addElement(
+ 'c',
+ buildHatchAdder(GT_TileEntity_MegaVacuumFreezer.class).atLeast(
+ TTEnabledEnergyHatchElement.INSTANCE,
+ InputHatch,
+ InputBus,
+ OutputHatch,
+ OutputBus,
+ Maintenance).casingIndex(CASING_INDEX).dot(1)
+ .buildAndChain(onElementPass(x -> x.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 1))))
+ .build();
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Vacuum Freezer")
- .addInfo("Controller Block for the Mega Vacuum Freezer")
- .addInfo("Cools hot ingots and cells")
- .addSeparator()
- .beginStructureBlock(15, 15, 15, true)
- .addController("Front center")
- .addCasingInfo("Frost Proof Machine Casing", 900)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .addInputHatch("Any casing", 1)
- .addOutputHatch("Any casing", 1)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
+ tt.addMachineType("Vacuum Freezer").addInfo("Controller Block for the Mega Vacuum Freezer")
+ .addInfo("Cools hot ingots and cells").addSeparator().beginStructureBlock(15, 15, 15, true)
+ .addController("Front center").addCasingInfo("Frost Proof Machine Casing", 900)
+ .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputHatch("Any casing", 1)
+ .addOutputHatch("Any casing", 1).addInputBus("Any casing", 1).addOutputBus("Any casing", 1)
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
return tt;
}
@@ -415,8 +204,8 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
if (aPlayer.isSneaking()) {
mUseMultiparallelMode = !mUseMultiparallelMode;
if (mUseMultiparallelMode) {
@@ -436,13 +225,13 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
ArrayList<ItemStack> outputItems = new ArrayList<>();
ArrayList<FluidStack> outputFluids = new ArrayList<>();
- long nominalV =
- LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this) : BW_Util.getnominalVoltage(this);
+ long nominalV = LoaderReference.tectech ? TecTechUtils.getnominalVoltageTT(this)
+ : BW_Util.getnominalVoltage(this);
byte tTier = (byte) Math.max(1, Math.min(GT_Utility.getTier(nominalV), V.length - 1));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, V[tTier], tInputFluids, tInputs);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes
+ .findRecipe(this.getBaseMetaTileEntity(), false, V[tTier], tInputFluids, tInputs);
boolean found_Recipe = false;
int processed = 0;
float tBatchMultiplier = 1.0f;
@@ -456,8 +245,9 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
}
int tCurrentPara = handleParallelRecipe(tRecipe, tInputFluids, tInputs, (int) tMaxPara);
- tBatchMultiplier =
- mUseMultiparallelMode ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f) : 1.0f;
+ tBatchMultiplier = mUseMultiparallelMode
+ ? (float) Math.max(tCurrentPara / ConfigHandler.megaMachinesMax, 1.0f)
+ : 1.0f;
this.updateSlots();
if (tCurrentPara <= 0) return false;
@@ -471,12 +261,8 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setParallel(processed)
- .setDuration(tRecipe.mDuration)
- .setEUt(nominalV)
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setParallel(processed).setDuration(tRecipe.mDuration).setEUt(nominalV).calculate();
this.mMaxProgresstime = calculator.getDuration();
this.lEUt = calculator.getConsumption();
@@ -513,52 +299,30 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
if (!checkPiece(STRUCTURE_PIECE_MAIN, 7, 7, 0)) return false;
return this.mMaintenanceHatches.size() == 1
&& (LoaderReference.tectech
- ? (!this.getTecTechEnergyMultis().isEmpty()
- || !this.getTecTechEnergyTunnels().isEmpty()
+ ? (!this.getTecTechEnergyMultis().isEmpty() || !this.getTecTechEnergyTunnels().isEmpty()
|| !this.mEnergyHatches.isEmpty())
: !this.mEnergyHatches.isEmpty())
&& this.mCasing >= 900;
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
ITexture[] rTexture;
if (aSide == aFacing) {
if (aActive) {
- rTexture = new ITexture[] {
- casingTexturePages[0][17],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ rTexture = new ITexture[] { casingTexturePages[0][17],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).extFacing().glow()
+ .build() };
} else {
- rTexture = new ITexture[] {
- casingTexturePages[0][17],
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_VACUUM_FREEZER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
+ rTexture = new ITexture[] { casingTexturePages[0][17],
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER).extFacing().build(),
+ TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).extFacing().glow()
+ .build() };
}
} else {
- rTexture = new ITexture[] {casingTexturePages[0][17]};
+ rTexture = new ITexture[] { casingTexturePages[0][17] };
}
return rTexture;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java
index 044a53105b..21cf8c4ed0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java
@@ -1,30 +1,24 @@
/*
- * 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.common.tileentities.tiered;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -33,12 +27,11 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
-import net.minecraft.util.StatCollector;
public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGenerator {
- public GT_MetaTileEntity_AcidGenerator(
- int aID, String aName, String aNameRegional, int aTier, ITexture... aTextures) {
+ public GT_MetaTileEntity_AcidGenerator(int aID, String aName, String aNameRegional, int aTier,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, new String[] {}, aTextures);
}
@@ -67,81 +60,65 @@ public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGene
}
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
- TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_GLOW"))
- .glow()
- .build()
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
+ TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_GLOW"))
+ .glow().build() };
}
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0],
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
- TextureFactory.of(
- new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE_GLOW"))
- .glow()
- .build()
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL),
+ TextureFactory
+ .of(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE_GLOW"))
+ .glow().build() };
}
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0], TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
}
public boolean isOutputFacing(byte aSide) {
@@ -149,16 +126,17 @@ public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGene
}
public String[] getDescription() {
- return new String[] {
- StatCollector.translateToLocal("tooltip.tile.acidgen.0.name"),
- StatCollector.translateToLocal("tooltip.tile.acidgen.1.name"),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW
- + GT_Values.V[this.mTier],
- StatCollector.translateToLocal("tooltip.rotor.2.name") + " " + ChatColorHelper.YELLOW
- + this.getEfficiency(),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW
- + this.maxAmperesOut(),
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { StatCollector.translateToLocal("tooltip.tile.acidgen.0.name"),
+ StatCollector.translateToLocal("tooltip.tile.acidgen.1.name"),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Values.V[this.mTier],
+ StatCollector.translateToLocal("tooltip.rotor.2.name") + " "
+ + ChatColorHelper.YELLOW
+ + this.getEfficiency(),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " "
+ + ChatColorHelper.YELLOW
+ + this.maxAmperesOut(),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java
index f8fa74dce3..db5d0dbfb3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java
@@ -1,27 +1,24 @@
/*
- * 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.common.tileentities.tiered;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.items.LabModule;
import com.github.bartimaeusnek.bartworks.common.items.LabParts;
@@ -29,6 +26,7 @@ import com.github.bartimaeusnek.bartworks.common.loaders.BioCultureLoader;
import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
import com.github.bartimaeusnek.bartworks.util.*;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -43,11 +41,6 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
@@ -72,71 +65,63 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
GT_MetaTileEntity_BioLab.MGUINAME,
null,
TextureFactory.of(
- TextureFactory.of(new Textures.BlockIcons.CustomIcon(
- "basicmachines/fluid_extractor/OVERLAY_SIDE_ACTIVE")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/fluid_extractor/OVERLAY_SIDE_ACTIVE_GLOW"))
- .glow()
- .build()),
- TextureFactory.of(
TextureFactory.of(
- new Textures.BlockIcons.CustomIcon("basicmachines/fluid_extractor/OVERLAY_SIDE")),
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/fluid_extractor/OVERLAY_SIDE_ACTIVE")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/fluid_extractor/OVERLAY_SIDE_GLOW"))
- .glow()
- .build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/fluid_extractor/OVERLAY_SIDE_ACTIVE_GLOW"))
+ .glow().build()),
TextureFactory.of(
- TextureFactory.of(
- new Textures.BlockIcons.CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/microwave/OVERLAY_FRONT_ACTIVE_GLOW"))
- .glow()
- .build()),
+ TextureFactory
+ .of(new Textures.BlockIcons.CustomIcon("basicmachines/fluid_extractor/OVERLAY_SIDE")),
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/fluid_extractor/OVERLAY_SIDE_GLOW"))
+ .glow().build()),
+ TextureFactory.of(
+ TextureFactory
+ .of(new Textures.BlockIcons.CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE_GLOW"))
+ .glow().build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/microwave/OVERLAY_FRONT")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/microwave/OVERLAY_FRONT_GLOW"))
- .glow()
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/microwave/OVERLAY_FRONT_GLOW")).glow()
.build()),
TextureFactory.of(
- TextureFactory.of(new Textures.BlockIcons.CustomIcon(
- "basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE_GLOW"))
- .glow()
- .build() /*this is topactive*/),
- TextureFactory.of(
TextureFactory.of(
- new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT")),
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/chemical_reactor/OVERLAY_FRONT_GLOW"))
- .glow()
- .build() /*this is top*/),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE_GLOW"))
+ .glow().build() /* this is topactive */),
+ TextureFactory.of(
+ TextureFactory
+ .of(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT")),
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_GLOW"))
+ .glow().build() /* this is top */),
TextureFactory.of(
TextureFactory.of(
new Textures.BlockIcons.CustomIcon("basicmachines/polarizer/OVERLAY_BOTTOM_ACTIVE")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/polarizer/OVERLAY_BOTTOM_ACTIVE_GLOW"))
- .glow()
- .build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/polarizer/OVERLAY_BOTTOM_ACTIVE_GLOW"))
+ .glow().build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/polarizer/OVERLAY_BOTTOM")),
- TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon(
- "basicmachines/polarizer/OVERLAY_BOTTOM_GLOW"))
- .glow()
- .build()));
+ TextureFactory.builder().addIcon(
+ new Textures.BlockIcons.CustomIcon("basicmachines/polarizer/OVERLAY_BOTTOM_GLOW"))
+ .glow().build()));
}
- public GT_MetaTileEntity_BioLab(
- String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, String aNEIName) {
+ public GT_MetaTileEntity_BioLab(String aName, int aTier, int aAmperage, String aDescription,
+ ITexture[][][] aTextures, String aNEIName) {
super(aName, aTier, aAmperage, aDescription, aTextures, 6, 2, GT_MetaTileEntity_BioLab.MGUINAME, aNEIName);
}
@@ -144,7 +129,12 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
@SuppressWarnings("deprecation")
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
return new GT_MetaTileEntity_BioLab(
- this.mName, this.mTier, this.mAmperage, this.mDescription, this.mTextures, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mAmperage,
+ this.mDescription,
+ this.mTextures,
+ this.mNEIName);
}
@Override
@@ -161,8 +151,7 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
public int checkRecipe(boolean skipOC) {
int rTier = 3;
- FluidStack dnaFluid = LoaderReference.gendustry
- ? FluidRegistry.getFluidStack("liquiddna", 1000)
+ FluidStack dnaFluid = LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 1000)
: Materials.Biomass.getFluid(1000L);
if (this.getSpecialSlot() != null && this.getSpecialSlot().getItem() instanceof LabModule) {
@@ -181,19 +170,18 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
&& GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
&& this.mInventory[getInputSlot() + 2].getItem() instanceof LabParts
&& this.mInventory[getInputSlot() + 2].getItemDamage() == 3
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 3], Materials.Ethanol.getCells(1))
+ && GT_Utility
+ .areStacksEqual(this.mInventory[getInputSlot() + 3], Materials.Ethanol.getCells(1))
&& this.mFluid != null
&& this.mFluid.isFluidEqual(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
&& this.mFluid.amount >= 1000) {
- NBTTagCompound DNABioDataTag =
- this.mInventory[getInputSlot()].getTagCompound().getCompoundTag("DNA");
+ NBTTagCompound DNABioDataTag = this.mInventory[getInputSlot()].getTagCompound()
+ .getCompoundTag("DNA");
if (DNABioDataTag == null) return super.checkRecipe(skipOC);
- BioData cultureDNABioData = BioData.getBioDataFromName(this.mInventory[getInputSlot()]
- .getTagCompound()
- .getCompoundTag("DNA")
- .getString("Name"));
+ BioData cultureDNABioData = BioData.getBioDataFromName(
+ this.mInventory[getInputSlot()].getTagCompound().getCompoundTag("DNA")
+ .getString("Name"));
if (cultureDNABioData == null) return super.checkRecipe(skipOC);
if (this.mTier < rTier + cultureDNABioData.getTier())
@@ -207,193 +195,200 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
this.mFluid.amount -= 1000;
if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
- this.mOutputItems[0] =
- BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(cultureDNABioData));
+ this.mOutputItems[0] = BioItemList
+ .getDNASampleFlask(BioDNA.convertDataToDNA(cultureDNABioData));
}
this.mOutputItems[1] = GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L);
this.calculateOverclockedNess(
- BW_Util.getMachineVoltageFromTier(rTier + cultureDNABioData.getTier()), 500);
+ BW_Util.getMachineVoltageFromTier(rTier + cultureDNABioData.getTier()),
+ 500);
return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
break;
- case PCR_THERMOCYCLE_MODULE:
- {
- if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
- && this.mInventory[getInputSlot()].getItem() instanceof LabParts
- && this.mInventory[getInputSlot()].getItemDamage() == 1
- && this.mInventory[getInputSlot()].getTagCompound() != null
- && // checks if it is a Culture
- GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 3], ItemList.Tool_DataOrb.get(1L))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 1], FluidLoader.BioLabFluidCells[0])
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 2], FluidLoader.BioLabFluidCells[3])
- && this.mFluid != null
- && this.mFluid.isFluidEqual(dnaFluid)
- && this.mFluid.amount >= 1000) {
- NBTTagCompound DNABioDataTag = this.mInventory[getInputSlot()].getTagCompound();
- if (DNABioDataTag == null) return super.checkRecipe(skipOC);
- BioData cultureDNABioData = BioData.getBioDataFromName(DNABioDataTag.getString("Name"));
- if (cultureDNABioData == null) return super.checkRecipe(skipOC);
+ case PCR_THERMOCYCLE_MODULE: {
+ if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
+ && this.mInventory[getInputSlot()].getItem() instanceof LabParts
+ && this.mInventory[getInputSlot()].getItemDamage() == 1
+ && this.mInventory[getInputSlot()].getTagCompound() != null
+ && // checks if it is a Culture
+ GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[getInputSlot() + 3], ItemList.Tool_DataOrb.get(1L))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 1],
+ FluidLoader.BioLabFluidCells[0])
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 2],
+ FluidLoader.BioLabFluidCells[3])
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && this.mFluid.amount >= 1000) {
+ NBTTagCompound DNABioDataTag = this.mInventory[getInputSlot()].getTagCompound();
+ if (DNABioDataTag == null) return super.checkRecipe(skipOC);
+ BioData cultureDNABioData = BioData.getBioDataFromName(DNABioDataTag.getString("Name"));
+ if (cultureDNABioData == null) return super.checkRecipe(skipOC);
- if (this.mTier < 1 + rTier + cultureDNABioData.getTier())
- return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ if (this.mTier < 1 + rTier + cultureDNABioData.getTier())
+ return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- for (int i = 0; i < 4; i++) {
- if (this.mInventory[getInputSlot() + i] != null)
- this.mInventory[getInputSlot() + i].stackSize--;
- }
+ for (int i = 0; i < 4; i++) {
+ if (this.mInventory[getInputSlot() + i] != null)
+ this.mInventory[getInputSlot() + i].stackSize--;
+ }
- this.mFluid.amount -= 1000;
+ this.mFluid.amount -= 1000;
- ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
- Behaviour_DataOrb.setDataName(Outp, cultureDNABioData.getName());
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(Outp, cultureDNABioData.getName());
- if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
- this.mOutputItems[0] = Outp;
- } else this.mOutputItems[0] = ItemList.Tool_DataOrb.get(1L);
- this.mOutputItems[1] = ItemList.Cell_Empty.get(2L);
+ if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
+ this.mOutputItems[0] = Outp;
+ } else this.mOutputItems[0] = ItemList.Tool_DataOrb.get(1L);
+ this.mOutputItems[1] = ItemList.Cell_Empty.get(2L);
- this.calculateOverclockedNess(
- BW_Util.getMachineVoltageFromTier(1 + rTier + cultureDNABioData.getTier()), 500);
+ this.calculateOverclockedNess(
+ BW_Util.getMachineVoltageFromTier(1 + rTier + cultureDNABioData.getTier()),
+ 500);
- return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
- }
+ return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
+ }
break;
- case PLASMID_SYNTHESIS_MODULE:
- {
- ItemStack inp2 = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(inp2, "DNA Sample");
- Behaviour_DataOrb.setDataName(inp2, BioCultureLoader.BIO_DATA_BETA_LACMATASE.getName());
- if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
- && GT_Utility.areStacksEqual(
- FluidLoader.BioLabFluidCells[1], this.mInventory[getInputSlot()])
- && // checks if it is a Culture
- GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 1], BioItemList.getPlasmidCell(null))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 2], ItemList.Tool_DataOrb.get(1L), true)
- && Behaviour_DataOrb.getDataTitle(this.mInventory[getInputSlot() + 2])
- .equals("DNA Sample")
- && (!(Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 2])
- .isEmpty()))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
- && GT_Utility.areStacksEqual(this.mInventory[getInputSlot() + 3], inp2)
- && this.mFluid != null
- && this.mFluid.isFluidEqual(dnaFluid)
- && (this.mFluid.amount >= 1000)) {
- BioData cultureDNABioData = BioData.getBioDataFromName(
- Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 2]));
- if (cultureDNABioData == null) return super.checkRecipe(skipOC);
- if (this.mTier < 1 + rTier + cultureDNABioData.getTier())
- return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- for (int i = 0; i < 2; i++) {
- if (this.mInventory[getInputSlot() + i] != null)
- this.mInventory[getInputSlot() + i].stackSize--;
- }
- this.mFluid.amount -= 1000;
- if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
- this.mOutputItems[0] =
- BioItemList.getPlasmidCell(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
- }
- this.mOutputItems[1] = ItemList.Cell_Empty.get(1L);
- this.calculateOverclockedNess(
- BW_Util.getMachineVoltageFromTier(1 + rTier + cultureDNABioData.getTier()), 500);
- return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ case PLASMID_SYNTHESIS_MODULE: {
+ ItemStack inp2 = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(inp2, "DNA Sample");
+ Behaviour_DataOrb.setDataName(inp2, BioCultureLoader.BIO_DATA_BETA_LACMATASE.getName());
+ if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
+ && GT_Utility
+ .areStacksEqual(FluidLoader.BioLabFluidCells[1], this.mInventory[getInputSlot()])
+ && // checks if it is a Culture
+ GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 1],
+ BioItemList.getPlasmidCell(null))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 2],
+ ItemList.Tool_DataOrb.get(1L),
+ true)
+ && Behaviour_DataOrb.getDataTitle(this.mInventory[getInputSlot() + 2]).equals("DNA Sample")
+ && (!(Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 2]).isEmpty()))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
+ && GT_Utility.areStacksEqual(this.mInventory[getInputSlot() + 3], inp2)
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && (this.mFluid.amount >= 1000)) {
+ BioData cultureDNABioData = BioData
+ .getBioDataFromName(Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 2]));
+ if (cultureDNABioData == null) return super.checkRecipe(skipOC);
+ if (this.mTier < 1 + rTier + cultureDNABioData.getTier())
+ return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ for (int i = 0; i < 2; i++) {
+ if (this.mInventory[getInputSlot() + i] != null)
+ this.mInventory[getInputSlot() + i].stackSize--;
+ }
+ this.mFluid.amount -= 1000;
+ if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
+ this.mOutputItems[0] = BioItemList
+ .getPlasmidCell(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
}
+ this.mOutputItems[1] = ItemList.Cell_Empty.get(1L);
+ this.calculateOverclockedNess(
+ BW_Util.getMachineVoltageFromTier(1 + rTier + cultureDNABioData.getTier()),
+ 500);
+ return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
+ }
break;
- case TRANSFORMATION_MODULE:
- {
- if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot()], BioItemList.getPetriDish(null), true)
- && this.mInventory[getInputSlot()].getTagCompound() != null
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 1], BioItemList.getPlasmidCell(null), true)
- && this.mInventory[getInputSlot() + 1].getTagCompound() != null
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 2], FluidLoader.BioLabFluidCells[2])
- && this.mFluid != null
- && this.mFluid.isFluidEqual(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
- && this.mFluid.amount >= 1000) {
- BioData cultureDNABioData =
- BioData.getBioDataFromNBTTag(this.mInventory[getInputSlot() + 1].getTagCompound());
- BioCulture bioCulture = BioCulture.getBioCultureFromNBTTag(
- this.mInventory[getInputSlot()].getTagCompound());
- if (cultureDNABioData == null || bioCulture == null) return super.checkRecipe(skipOC);
- if (this.mTier < 3 + rTier + cultureDNABioData.getTier())
- return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- for (int i = 0; i < 3; i++) {
- if (this.mInventory[getInputSlot() + i] != null)
- this.mInventory[getInputSlot() + i].stackSize--;
- }
- this.mFluid.amount -= 1000;
- bioCulture = bioCulture.setPlasmid(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
- if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
- this.mOutputItems[0] = BioItemList.getPetriDish(bioCulture);
- }
- this.mOutputItems[1] = ItemList.Cell_Empty.get(1L);
- this.calculateOverclockedNess(
- BW_Util.getMachineVoltageFromTier(3 + rTier + cultureDNABioData.getTier()), 500);
- return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ case TRANSFORMATION_MODULE: {
+ if (GT_Utility.isStackValid(this.mInventory[getInputSlot()]) && GT_Utility
+ .areStacksEqual(this.mInventory[getInputSlot()], BioItemList.getPetriDish(null), true)
+ && this.mInventory[getInputSlot()].getTagCompound() != null
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 1],
+ BioItemList.getPlasmidCell(null),
+ true)
+ && this.mInventory[getInputSlot() + 1].getTagCompound() != null
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 2],
+ FluidLoader.BioLabFluidCells[2])
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
+ && this.mFluid.amount >= 1000) {
+ BioData cultureDNABioData = BioData
+ .getBioDataFromNBTTag(this.mInventory[getInputSlot() + 1].getTagCompound());
+ BioCulture bioCulture = BioCulture
+ .getBioCultureFromNBTTag(this.mInventory[getInputSlot()].getTagCompound());
+ if (cultureDNABioData == null || bioCulture == null) return super.checkRecipe(skipOC);
+ if (this.mTier < 3 + rTier + cultureDNABioData.getTier())
+ return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ for (int i = 0; i < 3; i++) {
+ if (this.mInventory[getInputSlot() + i] != null)
+ this.mInventory[getInputSlot() + i].stackSize--;
+ }
+ this.mFluid.amount -= 1000;
+ bioCulture = bioCulture.setPlasmid(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
+ if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
+ this.mOutputItems[0] = BioItemList.getPetriDish(bioCulture);
}
+ this.mOutputItems[1] = ItemList.Cell_Empty.get(1L);
+ this.calculateOverclockedNess(
+ BW_Util.getMachineVoltageFromTier(3 + rTier + cultureDNABioData.getTier()),
+ 500);
+ return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
+ }
break;
- case CLONAL_CELLULAR_SYNTHESIS_MODULE:
- {
- ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ case CLONAL_CELLULAR_SYNTHESIS_MODULE: {
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
- if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot()], BioItemList.getPetriDish(null))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 1], BioItemList.getOther(4))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 2], ItemList.Circuit_Chip_Stemcell.get(2L))
- && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
- && GT_Utility.areStacksEqual(
- this.mInventory[getInputSlot() + 3], ItemList.Tool_DataOrb.get(1L), true)
- && Behaviour_DataOrb.getDataTitle(this.mInventory[getInputSlot() + 3])
- .equals("DNA Sample")
- && this.mFluid.isFluidEqual(dnaFluid)
- && (this.mFluid.amount >= 8000)) {
+ if (GT_Utility.isStackValid(this.mInventory[getInputSlot()])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[getInputSlot()], BioItemList.getPetriDish(null))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(this.mInventory[getInputSlot() + 1], BioItemList.getOther(4))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 2],
+ ItemList.Circuit_Chip_Stemcell.get(2L))
+ && GT_Utility.isStackValid(this.mInventory[getInputSlot() + 3])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[getInputSlot() + 3],
+ ItemList.Tool_DataOrb.get(1L),
+ true)
+ && Behaviour_DataOrb.getDataTitle(this.mInventory[getInputSlot() + 3]).equals("DNA Sample")
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && (this.mFluid.amount >= 8000)) {
- BioData cultureDNABioData = BioData.getBioDataFromName(
- Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 3]));
- if (cultureDNABioData == null) return super.checkRecipe(skipOC);
- if (this.mTier < 3 + rTier + cultureDNABioData.getTier())
- return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- for (int i = 0; i < 3; i++) {
- if (this.mInventory[getInputSlot() + i] != null)
- this.mInventory[getInputSlot() + i].stackSize--;
- }
- this.mFluid.amount -= 8000;
- if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
- BioCulture out = BioCulture.getBioCulture(BioDNA.convertDataToDNA(cultureDNABioData));
- if (out == null) return GT_MetaTileEntity_BasicMachine.DID_NOT_FIND_RECIPE;
- out = out.setPlasmid(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
- this.mOutputItems[0] = BioItemList.getPetriDish(out);
- }
- this.calculateOverclockedNess(
- BW_Util.getMachineVoltageFromTier(3 + rTier + cultureDNABioData.getTier()), 500);
- return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ BioData cultureDNABioData = BioData
+ .getBioDataFromName(Behaviour_DataOrb.getDataName(this.mInventory[getInputSlot() + 3]));
+ if (cultureDNABioData == null) return super.checkRecipe(skipOC);
+ if (this.mTier < 3 + rTier + cultureDNABioData.getTier())
+ return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ for (int i = 0; i < 3; i++) {
+ if (this.mInventory[getInputSlot() + i] != null)
+ this.mInventory[getInputSlot() + i].stackSize--;
+ }
+ this.mFluid.amount -= 8000;
+ if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
+ BioCulture out = BioCulture.getBioCulture(BioDNA.convertDataToDNA(cultureDNABioData));
+ if (out == null) return GT_MetaTileEntity_BasicMachine.DID_NOT_FIND_RECIPE;
+ out = out.setPlasmid(BioPlasmid.convertDataToPlasmid(cultureDNABioData));
+ this.mOutputItems[0] = BioItemList.getPetriDish(out);
}
+ this.calculateOverclockedNess(
+ BW_Util.getMachineVoltageFromTier(3 + rTier + cultureDNABioData.getTier()),
+ 500);
+ return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
+ }
break;
case INCUBATION_MODULE:
default:
@@ -405,9 +400,7 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
@Override
public String[] getDescription() {
- return new String[] {
- StatCollector.translateToLocal("tooltip.tile.biolab.0.name"),
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { StatCollector.translateToLocal("tooltip.tile.biolab.0.name"),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java
index 204fe62687..b917fe90fc 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java
@@ -1,27 +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.common.tileentities.tiered;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -29,16 +22,16 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget;
-import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_CompressedFluidHatch extends GT_MetaTileEntity_Hatch_Input {
+
public GT_MetaTileEntity_CompressedFluidHatch(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 0);
this.mDescriptionArray[1] = "Capacity: 100000000L";
}
- public GT_MetaTileEntity_CompressedFluidHatch(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_CompressedFluidHatch(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@@ -55,7 +48,10 @@ public class GT_MetaTileEntity_CompressedFluidHatch extends GT_MetaTileEntity_Ha
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_CompressedFluidHatch(
- this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures);
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java
index 41bc0490c4..68647d372c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java
@@ -1,39 +1,32 @@
/*
- * 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.common.tileentities.tiered;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull;
import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull {
@@ -106,29 +99,35 @@ public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull {
private long getAmpsfromMeta(int meta) {
if (meta > ConfigHandler.IDOffset + GT_Values.VN.length
- && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 2) return 2L;
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 2)
+ return 2L;
else if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 2
- && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 3) return 4L;
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 3)
+ return 4L;
else if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 3
- && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 4) return 8L;
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 4)
+ return 8L;
else if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 4
- && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 5) return 12L;
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 5)
+ return 12L;
else if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 5
- && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 6) return 16L;
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 6)
+ return 16L;
else return 0L;
}
@SuppressWarnings("deprecation")
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(GT_Values.V[this.mTier]),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(this.maxAmperesIn()),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(this.maxAmperesOut()),
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { this.mDescription,
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(GT_Values.V[this.mTier]),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(this.maxAmperesIn()),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(this.maxAmperesOut()),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java
index c7914e59cf..f2345fce09 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java
@@ -1,36 +1,29 @@
/*
- * 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.common.tileentities.tiered;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer;
import gregtech.api.util.GT_Utility;
-import net.minecraft.util.StatCollector;
public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Transformer {
@@ -42,8 +35,8 @@ public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Trans
super(aName, aTier, aDescription, aTextures);
}
- public GT_MetaTileEntity_EnergyDistributor(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_EnergyDistributor(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@@ -73,15 +66,16 @@ public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Trans
}
public String[] getDescription() {
- return new String[] {
- StatCollector.translateToLocal("tooltip.tile.energydistributor.0.name"),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(GT_Values.V[this.mTier]),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(this.maxAmperesIn()),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW
- + GT_Utility.formatNumbers(this.maxAmperesOut()),
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { StatCollector.translateToLocal("tooltip.tile.energydistributor.0.name"),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(GT_Values.V[this.mTier]),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(this.maxAmperesIn()),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " "
+ + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(this.maxAmperesOut()),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java
index 9478cdf222..c004b0db4e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java
@@ -1,23 +1,14 @@
/*
- * 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.common.tileentities.tiered;
@@ -34,8 +25,8 @@ public class GT_MetaTileEntity_GiantOutputHatch extends GT_MetaTileEntity_Hatch_
this.mDescriptionArray[1] = "Capacity: 100000000L";
}
- public GT_MetaTileEntity_GiantOutputHatch(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_GiantOutputHatch(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
index 6a63ae7dd0..3a7e60d518 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
@@ -1,29 +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.common.tileentities.tiered;
import static gregtech.api.enums.GT_Values.ticksBetweenSounds;
+import java.util.Collections;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
@@ -46,6 +45,7 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.ProgressBar.Direction;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget;
+
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.gui.modularui.GT_UIInfos;
@@ -62,12 +62,6 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import java.util.Collections;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implements IAddGregtechLogo {
@@ -75,7 +69,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
public int sievert;
private long timer = 1;
private long decayTime = 1;
- private short[] colorForGUI = {0x02, 0x02, 0x02};
+ private short[] colorForGUI = { 0x02, 0x02, 0x02 };
private byte mass;
private String material;
private byte coverage;
@@ -84,15 +78,20 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
private GT_Recipe lastRecipe = null;
public GT_MetaTileEntity_RadioHatch(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, new String[] {
- StatCollector.translateToLocal("tooltip.tile.radhatch.0.name"),
- StatCollector.translateToLocal("tooltip.tile.tiereddsc.3.name") + " " + (aTier - 2) + " "
- + ((aTier - 2) >= 2
- ? StatCollector.translateToLocal("tooltip.bw.kg.1.name")
- : StatCollector.translateToLocal("tooltip.bw.kg.0.name")),
- StatCollector.translateToLocal("tooltip.tile.radhatch.1.name"),
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ 1,
+ new String[] { StatCollector.translateToLocal("tooltip.tile.radhatch.0.name"),
+ StatCollector.translateToLocal("tooltip.tile.tiereddsc.3.name") + " "
+ + (aTier - 2)
+ + " "
+ + ((aTier - 2) >= 2 ? StatCollector.translateToLocal("tooltip.bw.kg.1.name")
+ : StatCollector.translateToLocal("tooltip.bw.kg.0.name")),
+ StatCollector.translateToLocal("tooltip.tile.radhatch.1.name"),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() });
this.cap = aTier - 2;
}
@@ -112,7 +111,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
public short[] getColorForGUI() {
if (this.colorForGUI != null) return this.colorForGUI;
- return colorForGUI = new short[] {0xFA, 0xFA, 0xFF};
+ return colorForGUI = new short[] { 0xFA, 0xFA, 0xFF };
}
public byte getMass() {
@@ -133,12 +132,12 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN)};
+ return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN) };
}
@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[] {aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN)};
+ return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN) };
}
@Override
@@ -187,11 +186,11 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
ItemStack lStack = this.mInventory[0];
if (lStack == null) {
- this.colorForGUI = new short[] {0x37, 0x37, 0x37};
+ this.colorForGUI = new short[] { 0x37, 0x37, 0x37 };
return;
} else {
Materials mat = GT_OreDictUnificator.getAssociation(lStack).mMaterial.mMaterial;
- this.colorForGUI = new short[] {mat.getRGBA()[0], mat.getRGBA()[1], mat.getRGBA()[2]};
+ this.colorForGUI = new short[] { mat.getRGBA()[0], mat.getRGBA()[1], mat.getRGBA()[2] };
}
if (this.lastFail && GT_Utility.areStacksEqual(this.lastUsedItem, lStack, true)) {
@@ -212,10 +211,12 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
}
if (this.lastRecipe == null || this.lastFail) {
- this.lastRecipe = BWRecipes.instance
- .getMappingsFor(BWRecipes.RADHATCH)
- .findRecipe(
- this.getBaseMetaTileEntity(), false, Integer.MAX_VALUE - 7, null, mInventory[0]);
+ this.lastRecipe = BWRecipes.instance.getMappingsFor(BWRecipes.RADHATCH).findRecipe(
+ this.getBaseMetaTileEntity(),
+ false,
+ Integer.MAX_VALUE - 7,
+ null,
+ mInventory[0]);
if (this.lastRecipe == null) {
this.lastFail = true;
this.lastUsedItem = this.mInventory[0] == null ? null : this.mInventory[0].copy();
@@ -246,8 +247,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
@Override
public String[] getInfoData() {
- if (this.sievert != 0)
- return new String[] {
+ if (this.sievert != 0) return new String[] {
StatCollector.translateToLocal("tooltip.tile.radhatch.2.name") + " "
+ StatCollector.translateToLocal(this.material),
StatCollector.translateToLocal("tooltip.tile.radhatch.3.name") + " " + this.sievert,
@@ -263,15 +263,12 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
+ StatCollector.translateToLocal("tooltip.tile.radhatch.8.name")
+ "/"
+ (this.decayTime - this.timer % this.decayTime) / 20 / 60 / 60
- + StatCollector.translateToLocal("tooltip.tile.radhatch.9.name")
- };
- else
- return new String[] {
+ + StatCollector.translateToLocal("tooltip.tile.radhatch.9.name") };
+ else return new String[] {
StatCollector.translateToLocal("tooltip.tile.radhatch.2.name") + " "
+ StatCollector.translateToLocal("tooltip.bw.empty.name"),
StatCollector.translateToLocal("tooltip.tile.radhatch.3.name") + " " + "0",
- StatCollector.translateToLocal("tooltip.tile.radhatch.4.name") + " " + "0"
- };
+ StatCollector.translateToLocal("tooltip.tile.radhatch.4.name") + " " + "0" };
}
@Override
@@ -345,75 +342,67 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
buildContext.addSyncedWindow(RADIATION_SHUTTER_WINDOW_ID, this::createShutterWindow);
getBaseMetaTileEntity().add1by1Slot(builder);
- builder.widget(new DrawableWidget()
- .setBackground(BW_UITextures.PICTURE_SIEVERT_CONTAINER)
- .setPos(61, 9)
+ builder.widget(
+ new DrawableWidget().setBackground(BW_UITextures.PICTURE_SIEVERT_CONTAINER).setPos(61, 9)
.setSize(56, 24))
- .widget(new ProgressBar()
- .setProgress(() -> getSievert() / 148f)
- .setDirection(Direction.RIGHT)
- .setTexture(BW_UITextures.PROGRESSBAR_SIEVERT, 24)
- .setPos(65, 13)
- .setSize(48, 16))
- .widget(new DrawableWidget()
- .setBackground(BW_UITextures.PICTURE_DECAY_TIME_INSIDE)
- .setPos(124, 18)
- .setSize(16, 48))
.widget(
- new DrawableWidget() {
- @Override
- public void draw(float partialTicks) {
- if (decayTime > 0) {
- int height = MathUtils.ceilInt(
- 48 * ((decayTime - timer % decayTime) / (float) decayTime));
- new Rectangle()
- .setColor(Color.argb(colorForGUI[0], colorForGUI[1], colorForGUI[2], 255))
- .draw(new Pos2d(0, 48 - height), new Size(16, height), partialTicks);
- }
- }
- }.dynamicTooltip(() -> Collections.singletonList(StatCollector.translateToLocalFormatted(
+ new ProgressBar().setProgress(() -> getSievert() / 148f).setDirection(Direction.RIGHT)
+ .setTexture(BW_UITextures.PROGRESSBAR_SIEVERT, 24).setPos(65, 13).setSize(48, 16))
+ .widget(
+ new DrawableWidget().setBackground(BW_UITextures.PICTURE_DECAY_TIME_INSIDE).setPos(124, 18)
+ .setSize(16, 48))
+ .widget(new DrawableWidget() {
+
+ @Override
+ public void draw(float partialTicks) {
+ if (decayTime > 0) {
+ int height = MathUtils.ceilInt(48 * ((decayTime - timer % decayTime) / (float) decayTime));
+ new Rectangle().setColor(Color.argb(colorForGUI[0], colorForGUI[1], colorForGUI[2], 255))
+ .draw(new Pos2d(0, 48 - height), new Size(16, height), partialTicks);
+ }
+ }
+ }.dynamicTooltip(
+ () -> Collections.singletonList(
+ StatCollector.translateToLocalFormatted(
"tooltip.tile.radhatch.10.name",
timer <= 1 ? 0 : (decayTime - timer) / 20,
timer <= 1 ? 0 : decayTime / 20)))
- .setPos(124, 18)
- .setSize(16, 48)
- .attachSyncer(
- new FakeSyncWidget.LongSyncer(() -> decayTime, val -> decayTime = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .attachSyncer(
- new FakeSyncWidget.LongSyncer(() -> timer, val -> timer = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange()))
+ .setPos(124, 18).setSize(16, 48)
+ .attachSyncer(
+ new FakeSyncWidget.LongSyncer(() -> decayTime, val -> decayTime = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .attachSyncer(
+ new FakeSyncWidget.LongSyncer(() -> timer, val -> timer = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange()))
.widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[0], val -> colorForGUI[0] = val))
.widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[1], val -> colorForGUI[1] = val))
.widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[2], val -> colorForGUI[2] = val))
- .widget(new DrawableWidget()
- .setBackground(BW_UITextures.PICTURE_DECAY_TIME_CONTAINER)
- .setPos(120, 14)
- .setSize(24, 56))
- .widget(TextWidget.dynamicString(
+ .widget(
+ new DrawableWidget().setBackground(BW_UITextures.PICTURE_DECAY_TIME_CONTAINER).setPos(120, 14)
+ .setSize(24, 56))
+ .widget(
+ TextWidget.dynamicString(
() -> StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", mass))
- .setTextAlignment(Alignment.Center)
- .setPos(65, 62))
- .widget(TextWidget.dynamicString(() ->
- StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", getSievert()))
- .setTextAlignment(Alignment.Center)
- .setPos(60, 72))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (!widget.isClient()) {
- widget.getContext().openSyncedWindow(RADIATION_SHUTTER_WINDOW_ID);
- }
- })
- .addTooltip("Radiation Shutter")
- .setBackground(GT_UITextures.BUTTON_STANDARD)
- .setPos(153, 5)
+ .setTextAlignment(Alignment.Center).setPos(65, 62))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> StatCollector
+ .translateToLocalFormatted("BW.NEI.display.radhatch.0", getSievert()))
+ .setTextAlignment(Alignment.Center).setPos(60, 72))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (!widget.isClient()) {
+ widget.getContext().openSyncedWindow(RADIATION_SHUTTER_WINDOW_ID);
+ }
+ }).addTooltip("Radiation Shutter").setBackground(GT_UITextures.BUTTON_STANDARD).setPos(153, 5)
.setSize(18, 18))
- .widget(new ItemDrawable(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, null, null, null))
- .asWidget()
- .setPos(154, 6));
+ .widget(
+ new ItemDrawable(
+ GT_MetaGenerated_Tool_01.INSTANCE
+ .getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, null, null, null))
+ .asWidget().setPos(154, 6));
}
private ModularWindow createShutterWindow(EntityPlayer player) {
@@ -421,32 +410,25 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
builder.setGuiTint(getGUIColorization());
- builder.widget(new TextWidget("Radiation Shutter Control")
- .setDefaultColor(COLOR_TITLE.get())
- .setPos(10, 9))
- .widget(new DrawableWidget()
- .setDrawable(BW_UITextures.PICTURE_RADIATION_SHUTTER_FRAME)
- .setPos(14, 27)
- .setSize(55, 54))
- .widget(new DrawableWidget()
- .setDrawable(() -> coverage < 100 ? BW_UITextures.PICTURE_RADIATION_SHUTTER_INSIDE : null)
- .setPos(16, 29)
- .setSize(51, 50)
- .attachSyncer(
- new FakeSyncWidget.ByteSyncer(this::getCoverage, this::setCoverage),
- builder,
- (widget, val) ->
- widget.setPos(16, 29 + coverage / 2).setSize(51, 50 - coverage / 2)))
- .widget(new TextFieldWidget()
- .setSetterInt(val -> coverage = val.byteValue())
- .setGetterInt(() -> (int) coverage)
- .setNumbers(0, 100)
- .setTextColor(Color.WHITE.dark(1))
- .setOnScrollNumbers(1, 5, 50)
- .setTextAlignment(Alignment.CenterLeft)
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2))
- .setPos(86, 27)
- .setSize(30, 12))
+ builder.widget(new TextWidget("Radiation Shutter Control").setDefaultColor(COLOR_TITLE.get()).setPos(10, 9))
+ .widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_RADIATION_SHUTTER_FRAME).setPos(14, 27)
+ .setSize(55, 54))
+ .widget(
+ new DrawableWidget()
+ .setDrawable(
+ () -> coverage < 100 ? BW_UITextures.PICTURE_RADIATION_SHUTTER_INSIDE : null)
+ .setPos(16, 29).setSize(51, 50).attachSyncer(
+ new FakeSyncWidget.ByteSyncer(this::getCoverage, this::setCoverage),
+ builder,
+ (widget, val) -> widget.setPos(16, 29 + coverage / 2)
+ .setSize(51, 50 - coverage / 2)))
+ .widget(
+ new TextFieldWidget().setSetterInt(val -> coverage = val.byteValue())
+ .setGetterInt(() -> (int) coverage).setNumbers(0, 100).setTextColor(Color.WHITE.dark(1))
+ .setOnScrollNumbers(1, 5, 50).setTextAlignment(Alignment.CenterLeft)
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2))
+ .setPos(86, 27).setSize(30, 12))
.widget(ButtonWidget.closeWindowButton(true).setPos(176 - 15, 3));
return builder.build();
@@ -454,16 +436,13 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implem
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21)
- .setSize(47, 21)
- .setPos(10, 53));
+ builder.widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21).setSize(47, 21).setPos(10, 53));
}
@Override
public GUITextureSet getGUITextureSet() {
- return new GUITextureSet()
- .setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT)
+ return new GUITextureSet().setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT)
.setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java
index 90fd02b3e2..4e91a40272 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java
@@ -1,27 +1,23 @@
/*
- * 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.common.tileentities.tiered;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -29,21 +25,18 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_Transistor extends GT_MetaTileEntity_TieredMachineBlock {
+
boolean powered;
- public GT_MetaTileEntity_Transistor(
- int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) {
+ public GT_MetaTileEntity_Transistor(int aID, String aName, String aNameRegional, int aTier, String aDescription,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, 0, aDescription, aTextures);
}
- public GT_MetaTileEntity_Transistor(
- int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) {
+ public GT_MetaTileEntity_Transistor(int aID, String aName, String aNameRegional, int aTier, String[] aDescription,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, 0, aDescription, aTextures);
}
@@ -60,54 +53,30 @@ public class GT_MetaTileEntity_Transistor extends GT_MetaTileEntity_TieredMachin
ITexture[][][] rTextures = new ITexture[12][17][];
for (byte i = -1; i < 16; ++i) {
- rTextures[0][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
- rTextures[1][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
- rTextures[2][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
- rTextures[3][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[4][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[5][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[6][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
- };
- rTextures[7][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
- };
- rTextures[8][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
- };
- rTextures[9][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
- rTextures[10][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
- rTextures[11][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ rTextures[0][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
+ rTextures[1][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
+ rTextures[2][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
+ rTextures[3][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[4][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[5][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[6][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier] };
+ rTextures[7][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier] };
+ rTextures[8][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier] };
+ rTextures[9][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
+ rTextures[10][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
+ rTextures[11][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
return rTextures;
@@ -181,8 +150,8 @@ public class GT_MetaTileEntity_Transistor extends GT_MetaTileEntity_TieredMachin
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3, boolean b4) {
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3,
+ boolean b4) {
return new ITexture[0];
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java
index 616219ef8c..485b0244a2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java
@@ -1,38 +1,33 @@
/*
- * 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.neiHandler;
+import net.minecraft.item.ItemStack;
+
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiUsageRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler;
+
import com.github.bartimaeusnek.bartworks.common.items.LabParts;
+
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_Recipe;
import gregtech.nei.GT_NEI_DefaultHandler;
-import net.minecraft.item.ItemStack;
public class BW_NEI_BioLabHandler extends GT_NEI_DefaultHandler {
+
public BW_NEI_BioLabHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {
super(aRecipeMap);
if (!NEI_BW_Config.sIsAdded) {
@@ -51,8 +46,7 @@ public class BW_NEI_BioLabHandler extends GT_NEI_DefaultHandler {
}
public void loadCraftingRecipes(ItemStack aResult) {
- if (aResult != null
- && aResult.getItem() instanceof LabParts
+ if (aResult != null && aResult.getItem() instanceof LabParts
&& aResult.getItemDamage() < 3
&& aResult.getTagCompound() != null) {
for (CachedDefaultRecipe recipe : getCache())
@@ -64,8 +58,7 @@ public class BW_NEI_BioLabHandler extends GT_NEI_DefaultHandler {
@Override
public void loadUsageRecipes(ItemStack aResult) {
- if (aResult != null
- && aResult.getItem() instanceof LabParts
+ if (aResult != null && aResult.getItem() instanceof LabParts
&& aResult.getItemDamage() < 3
&& aResult.getTagCompound() != null) {
for (CachedDefaultRecipe recipe : getCache())
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
index 139d8607fa..14ad95d48a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
@@ -1,39 +1,34 @@
/*
- * 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.neiHandler;
+import java.awt.*;
+import java.util.Collections;
+
+import net.minecraft.item.ItemStack;
+
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiUsageRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler;
+
import com.github.bartimaeusnek.bartworks.common.items.LabParts;
+
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_Recipe;
import gregtech.nei.GT_NEI_DefaultHandler;
-import java.awt.*;
-import java.util.Collections;
-import net.minecraft.item.ItemStack;
public class BW_NEI_BioVatHandler extends GT_NEI_DefaultHandler {
@@ -69,8 +64,7 @@ public class BW_NEI_BioVatHandler extends GT_NEI_DefaultHandler {
@Override
public void loadUsageRecipes(ItemStack aResult) {
- if (aResult != null
- && aResult.getItem() instanceof LabParts
+ if (aResult != null && aResult.getItem() instanceof LabParts
&& aResult.getItemDamage() < 3
&& aResult.getTagCompound() != null) {
loadLabPartRecipes(aResult);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java
index 727aa9fb97..711f5e7732 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java
@@ -1,31 +1,32 @@
/*
- * 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.neiHandler;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Ores;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_SmallOres;
@@ -34,15 +35,9 @@ import com.github.bartimaeusnek.bartworks.system.oregen.BW_OreLayer;
import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128b;
import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128ba;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.OrePrefixes;
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Objects;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
public class BW_NEI_OreHandler extends TemplateRecipeHandler {
@@ -77,13 +72,11 @@ public class BW_NEI_OreHandler extends TemplateRecipeHandler {
public void loadCraftingRecipes(String outputId, Object... results) {
if (outputId.equalsIgnoreCase("quickanddirtyneihandler")) {
HashSet<ItemStack> result = new HashSet<>();
- Werkstoff.werkstoffHashSet.stream()
- .filter(w -> w.hasGenerationFeature(OrePrefixes.ore))
+ Werkstoff.werkstoffHashSet.stream().filter(w -> w.hasGenerationFeature(OrePrefixes.ore))
.forEach(w -> result.add(w.get(OrePrefixes.ore)));
result.forEach(this::loadCraftingRecipes);
result.clear();
- Werkstoff.werkstoffHashSet.stream()
- .filter(w -> w.hasGenerationFeature(OrePrefixes.ore))
+ Werkstoff.werkstoffHashSet.stream().filter(w -> w.hasGenerationFeature(OrePrefixes.ore))
.forEach(w -> result.add(w.get(OrePrefixes.oreSmall)));
result.forEach(this::loadCraftingRecipes);
result.clear();
@@ -104,9 +97,9 @@ public class BW_NEI_OreHandler extends TemplateRecipeHandler {
if ((recipe < this.arecipes.size()) && (this.arecipes.get(recipe) instanceof CachedOreRecipe)) {
CachedOreRecipe cachedOreRecipe = (CachedOreRecipe) this.arecipes.get(recipe);
- if (cachedOreRecipe == null
- || cachedOreRecipe.getOtherStacks() == null
- || cachedOreRecipe.getOtherStacks().size() == 0) return;
+ if (cachedOreRecipe == null || cachedOreRecipe.getOtherStacks() == null
+ || cachedOreRecipe.getOtherStacks().size() == 0)
+ return;
if (!cachedOreRecipe.small) {
if (cachedOreRecipe.getOtherStacks().get(0) == null
@@ -116,17 +109,18 @@ public class BW_NEI_OreHandler extends TemplateRecipeHandler {
|| cachedOreRecipe.getOtherStacks().get(3) == null
|| cachedOreRecipe.getOtherStacks().get(1).item == null
|| cachedOreRecipe.getOtherStacks().get(2).item == null
- || cachedOreRecipe.getOtherStacks().get(3).item == null) return;
+ || cachedOreRecipe.getOtherStacks().get(3).item == null)
+ return;
} else if (cachedOreRecipe.getOtherStacks().get(0) == null
- || cachedOreRecipe.getOtherStacks().get(0).item == null) return;
+ || cachedOreRecipe.getOtherStacks().get(0).item == null)
+ return;
- if (cachedOreRecipe.worldGen != null)
- GuiDraw.drawString(
- ChatColorHelper.BOLD + "DIM: " + ChatColorHelper.RESET + cachedOreRecipe.worldGen.getDimName(),
- 0,
- 40,
- 0,
- false);
+ if (cachedOreRecipe.worldGen != null) GuiDraw.drawString(
+ ChatColorHelper.BOLD + "DIM: " + ChatColorHelper.RESET + cachedOreRecipe.worldGen.getDimName(),
+ 0,
+ 40,
+ 0,
+ false);
GuiDraw.drawString(ChatColorHelper.BOLD + "Primary:", 0, 50, 0, false);
GuiDraw.drawString(cachedOreRecipe.getOtherStacks().get(0).item.getDisplayName(), 0, 60, 0, false);
@@ -153,11 +147,13 @@ public class BW_NEI_OreHandler extends TemplateRecipeHandler {
Block ore = Block.getBlockFromItem(result.getItem());
if (ore instanceof BW_MetaGenerated_Ores) {
BW_OreLayer.NEIMAP.get((short) result.getItemDamage()).stream()
- .filter(l -> !(ore instanceof BW_MetaGenerated_SmallOres)
- || !(l.getClass().equals(BW_WorldGenRoss128b.class)
- || l.getClass().equals(BW_WorldGenRoss128ba.class)))
- .forEach(l -> this.arecipes.add(
- new CachedOreRecipe(l, result, ore instanceof BW_MetaGenerated_SmallOres)));
+ .filter(
+ l -> !(ore instanceof BW_MetaGenerated_SmallOres)
+ || !(l.getClass().equals(BW_WorldGenRoss128b.class)
+ || l.getClass().equals(BW_WorldGenRoss128ba.class)))
+ .forEach(
+ l -> this.arecipes
+ .add(new CachedOreRecipe(l, result, ore instanceof BW_MetaGenerated_SmallOres)));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java
index 3f5868a349..80f283d080 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/IMCForNEI.java
@@ -1,10 +1,12 @@
package com.github.bartimaeusnek.bartworks.neiHandler;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import cpw.mods.fml.common.event.FMLInterModComms;
-import net.minecraft.nbt.NBTTagCompound;
public class IMCForNEI {
+
public static void IMCSender() {
sendCatalyst("gt.recipe.largechemicalreactor", "gregtech:gt.blockmachines:13366", -10);
sendCatalyst("gt.recipe.craker", "gregtech:gt.blockmachines:13367", -10);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java
index f14b220e52..724e392994 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java
@@ -1,37 +1,30 @@
/*
- * 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.neiHandler;
+import net.minecraft.item.ItemStack;
+
import codechicken.nei.PositionedStack;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import gregtech.api.enums.OrePrefixes;
-import net.minecraft.item.ItemStack;
public class NEI_BW_Config implements IConfigureNEI {
@@ -55,31 +48,20 @@ public class NEI_BW_Config implements IConfigureNEI {
API.hideItem(new ItemStack(ItemRegistry.bw_fake_glasses));
API.hideItem(new ItemStack(ItemRegistry.bw_fake_glasses2));
ItemStack[] prefixesToHide = {
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustTiny, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustSmall, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushed, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedPurified, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedCentrifuged, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.nugget, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemChipped, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawed, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawless, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemExquisite, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustImpure, WerkstoffLoader.Bismutite)
- .copy(),
- WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustPure, WerkstoffLoader.Bismutite)
- .copy(),
- };
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustTiny, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustSmall, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushed, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedPurified, WerkstoffLoader.Bismutite)
+ .copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedCentrifuged, WerkstoffLoader.Bismutite)
+ .copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.nugget, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemChipped, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawed, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawless, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemExquisite, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustImpure, WerkstoffLoader.Bismutite).copy(),
+ WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustPure, WerkstoffLoader.Bismutite).copy(), };
for (ItemStack stack : prefixesToHide) {
stack.setItemDamage(Short.MAX_VALUE);
API.hideItem(stack);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java
index c2125a8e70..7231995517 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java
@@ -1,42 +1,35 @@
/*
- * 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.server.EventHandler;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.event.entity.EntityJoinWorldEvent;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.net.OreDictCachePacket;
import com.github.bartimaeusnek.bartworks.common.net.ServerJoinedPackage;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
+
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.event.entity.EntityJoinWorldEvent;
-import net.minecraftforge.oredict.OreDictionary;
public class ServerEventHandler {
@@ -44,8 +37,8 @@ public class ServerEventHandler {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void EntityJoinWorldEvent(EntityJoinWorldEvent event) {
if (event == null || !(event.entity instanceof EntityPlayerMP) || !SideReference.Side.Server) return;
- MainMod.BW_Network_instance.sendToPlayer(
- new OreDictCachePacket(OreDictHandler.getNonBWCache()), (EntityPlayerMP) event.entity);
+ MainMod.BW_Network_instance
+ .sendToPlayer(new OreDictCachePacket(OreDictHandler.getNonBWCache()), (EntityPlayerMP) event.entity);
MainMod.BW_Network_instance.sendToPlayer(new ServerJoinedPackage(null), (EntityPlayerMP) event.entity);
}
@@ -64,8 +57,7 @@ public class ServerEventHandler {
int[] oreIDs = OreDictionary.getOreIDs(stack);
if (oreIDs.length > 0) {
- loop:
- for (int oreID : oreIDs) {
+ loop: for (int oreID : oreIDs) {
String oreDictName = OreDictionary.getOreName(oreID);
for (Werkstoff e : Werkstoff.werkstoffHashSet) {
replace = e.getGenerationFeatures().enforceUnification;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java
index d898826ed9..04be1f4129 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material;
@@ -27,40 +18,41 @@ import com.github.bartimaeusnek.bartworks.MainMod;
import gregtech.api.enums.Materials;
public class BW_GT_MaterialReference {
- private static final Werkstoff.GenerationFeatures ADD_CASINGS_ONLY =
- new Werkstoff.GenerationFeatures().disable().addCasings();
+
+ private static final Werkstoff.GenerationFeatures ADD_CASINGS_ONLY = new Werkstoff.GenerationFeatures().disable()
+ .addCasings();
public static Werkstoff Aluminium = new Werkstoff(Materials.Aluminium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 19);
public static Werkstoff Americium = new Werkstoff(Materials.Americium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 103);
public static Werkstoff Antimony = new Werkstoff(Materials.Antimony, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 58);
- // public static Werkstoff Argon = new Werkstoff(Materials.Argon, ADD_CASINGS_ONLY, ELEMENT, 31_766+24);
+ // public static Werkstoff Argon = new Werkstoff(Materials.Argon, ADD_CASINGS_ONLY, ELEMENT, 31_766+24);
public static Werkstoff Arsenic = new Werkstoff(Materials.Arsenic, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 39);
public static Werkstoff Barium = new Werkstoff(Materials.Barium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 63);
public static Werkstoff Beryllium = new Werkstoff(Materials.Beryllium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 8);
public static Werkstoff Bismuth = new Werkstoff(Materials.Bismuth, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 90);
public static Werkstoff Boron = new Werkstoff(Materials.Boron, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 9);
public static Werkstoff Caesium = new Werkstoff(Materials.Caesium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 62);
- // public static Werkstoff Calcium = new Werkstoff(Materials.Calcium, ADD_CASINGS_ONLY, ELEMENT, 31_766+26);
+ // public static Werkstoff Calcium = new Werkstoff(Materials.Calcium, ADD_CASINGS_ONLY, ELEMENT, 31_766+26);
public static Werkstoff Carbon = new Werkstoff(Materials.Carbon, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 10);
public static Werkstoff Cadmium = new Werkstoff(Materials.Cadmium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 55);
public static Werkstoff Cerium = new Werkstoff(Materials.Cerium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 65);
- // public static Werkstoff Chlorine = new Werkstoff(Materials.Chlorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+23);
+ // public static Werkstoff Chlorine = new Werkstoff(Materials.Chlorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+23);
public static Werkstoff Chrome = new Werkstoff(Materials.Chrome, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 30);
public static Werkstoff Cobalt = new Werkstoff(Materials.Cobalt, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 33);
public static Werkstoff Copper = new Werkstoff(Materials.Copper, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 35);
- // public static Werkstoff Deuterium = new Werkstoff(Materials.Deuterium, ADD_CASINGS_ONLY, ELEMENT, 31_766+2);
+ // public static Werkstoff Deuterium = new Werkstoff(Materials.Deuterium, ADD_CASINGS_ONLY, ELEMENT, 31_766+2);
public static Werkstoff Dysprosium = new Werkstoff(Materials.Dysprosium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 73);
- // public static Werkstoff Empty = new Werkstoff(Materials.Empty, ADD_CASINGS_ONLY, ELEMENT, 31_766+0);
+ // public static Werkstoff Empty = new Werkstoff(Materials.Empty, ADD_CASINGS_ONLY, ELEMENT, 31_766+0);
public static Werkstoff Erbium = new Werkstoff(Materials.Erbium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 75);
public static Werkstoff Europium = new Werkstoff(Materials.Europium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 70);
- // public static Werkstoff Fluorine = new Werkstoff(Materials.Fluorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+14);
+ // public static Werkstoff Fluorine = new Werkstoff(Materials.Fluorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+14);
public static Werkstoff Gadolinium = new Werkstoff(Materials.Gadolinium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 71);
public static Werkstoff Gallium = new Werkstoff(Materials.Gallium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 37);
public static Werkstoff Gold = new Werkstoff(Materials.Gold, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 86);
public static Werkstoff Holmium = new Werkstoff(Materials.Holmium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 74);
- // public static Werkstoff Hydrogen = new Werkstoff(Materials.Hydrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+1);
- // public static Werkstoff Helium = new Werkstoff(Materials.Helium, ADD_CASINGS_ONLY, ELEMENT, 31_766+4);
- // public static Werkstoff Helium_3 = new Werkstoff(Materials.Helium_3, ADD_CASINGS_ONLY, ELEMENT, 31_766+5);
+ // public static Werkstoff Hydrogen = new Werkstoff(Materials.Hydrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+1);
+ // public static Werkstoff Helium = new Werkstoff(Materials.Helium, ADD_CASINGS_ONLY, ELEMENT, 31_766+4);
+ // public static Werkstoff Helium_3 = new Werkstoff(Materials.Helium_3, ADD_CASINGS_ONLY, ELEMENT, 31_766+5);
public static Werkstoff Indium = new Werkstoff(Materials.Indium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 56);
public static Werkstoff Iridium = new Werkstoff(Materials.Iridium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 84);
public static Werkstoff Iron = new Werkstoff(Materials.Iron, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 32);
@@ -70,26 +62,32 @@ public class BW_GT_MaterialReference {
public static Werkstoff Lutetium = new Werkstoff(Materials.Lutetium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 78);
public static Werkstoff Magnesium = new Werkstoff(Materials.Magnesium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 18);
public static Werkstoff Manganese = new Werkstoff(Materials.Manganese, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 31);
- // public static Werkstoff Mercury = new Werkstoff(Materials.Mercury, ADD_CASINGS_ONLY, ELEMENT, 31_766+87);
+ // public static Werkstoff Mercury = new Werkstoff(Materials.Mercury, ADD_CASINGS_ONLY, ELEMENT, 31_766+87);
public static Werkstoff Molybdenum = new Werkstoff(Materials.Molybdenum, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 48);
public static Werkstoff Neodymium = new Werkstoff(Materials.Neodymium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 67);
public static Werkstoff Neutronium = new Werkstoff(Materials.Neutronium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 129);
public static Werkstoff Nickel = new Werkstoff(Materials.Nickel, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 34);
public static Werkstoff Niobium = new Werkstoff(Materials.Niobium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 47);
- // public static Werkstoff Nitrogen = new Werkstoff(Materials.Nitrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+12);
+ // public static Werkstoff Nitrogen = new Werkstoff(Materials.Nitrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+12);
public static Werkstoff Osmium = new Werkstoff(Materials.Osmium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 83);
- // public static Werkstoff Oxygen = new Werkstoff(Materials.Oxygen, ADD_CASINGS_ONLY, ELEMENT, 31_766+13);
+ // public static Werkstoff Oxygen = new Werkstoff(Materials.Oxygen, ADD_CASINGS_ONLY, ELEMENT, 31_766+13);
public static Werkstoff Palladium = new Werkstoff(Materials.Palladium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 52);
public static Werkstoff Phosphorus = new Werkstoff(Materials.Phosphorus, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 21);
public static Werkstoff Platinum = new Werkstoff(Materials.Platinum, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 85);
public static Werkstoff Plutonium = new Werkstoff(Materials.Plutonium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 100);
- public static Werkstoff Plutonium241 =
- new Werkstoff(Materials.Plutonium241, ADD_CASINGS_ONLY, ISOTOPE, 31_766 + 101);
+ public static Werkstoff Plutonium241 = new Werkstoff(
+ Materials.Plutonium241,
+ ADD_CASINGS_ONLY,
+ ISOTOPE,
+ 31_766 + 101);
public static Werkstoff Potassium = new Werkstoff(Materials.Potassium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 25);
- public static Werkstoff Praseodymium =
- new Werkstoff(Materials.Praseodymium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 66);
+ public static Werkstoff Praseodymium = new Werkstoff(
+ Materials.Praseodymium,
+ ADD_CASINGS_ONLY,
+ ELEMENT,
+ 31_766 + 66);
public static Werkstoff Promethium = new Werkstoff(Materials.Promethium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 68);
- // public static Werkstoff Radon = new Werkstoff(Materials.Radon, ADD_CASINGS_ONLY, ELEMENT, 31_766+93);
+ // public static Werkstoff Radon = new Werkstoff(Materials.Radon, ADD_CASINGS_ONLY, ELEMENT, 31_766+93);
public static Werkstoff Rubidium = new Werkstoff(Materials.Rubidium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 43);
public static Werkstoff Samarium = new Werkstoff(Materials.Samarium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 69);
public static Werkstoff Scandium = new Werkstoff(Materials.Scandium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 27);
@@ -99,7 +97,7 @@ public class BW_GT_MaterialReference {
public static Werkstoff Strontium = new Werkstoff(Materials.Strontium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 44);
public static Werkstoff Sulfur = new Werkstoff(Materials.Sulfur, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 22);
public static Werkstoff Tantalum = new Werkstoff(Materials.Tantalum, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 80);
- // public static Werkstoff Tellurium = new Werkstoff(Materials.Tellurium, ADD_CASINGS_ONLY, ELEMENT, 31_766+59);
+ // public static Werkstoff Tellurium = new Werkstoff(Materials.Tellurium, ADD_CASINGS_ONLY, ELEMENT, 31_766+59);
public static Werkstoff Terbium = new Werkstoff(Materials.Terbium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 72);
public static Werkstoff Thorium = new Werkstoff(Materials.Thorium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 96);
public static Werkstoff Thulium = new Werkstoff(Materials.Thulium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 76);
@@ -116,39 +114,69 @@ public class BW_GT_MaterialReference {
public static Werkstoff Zinc = new Werkstoff(Materials.Zinc, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 36);
public static Werkstoff Ardite = new Werkstoff(Materials.Ardite, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 382);
public static Werkstoff Naquadah = new Werkstoff(Materials.Naquadah, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 324);
- public static Werkstoff NaquadahAlloy =
- new Werkstoff(Materials.NaquadahAlloy, ADD_CASINGS_ONLY, COMPOUND, 31_766 + 325);
- public static Werkstoff NaquadahEnriched =
- new Werkstoff(Materials.NaquadahEnriched, ADD_CASINGS_ONLY, ISOTOPE, 31_766 + 326);
+ public static Werkstoff NaquadahAlloy = new Werkstoff(
+ Materials.NaquadahAlloy,
+ ADD_CASINGS_ONLY,
+ COMPOUND,
+ 31_766 + 325);
+ public static Werkstoff NaquadahEnriched = new Werkstoff(
+ Materials.NaquadahEnriched,
+ ADD_CASINGS_ONLY,
+ ISOTOPE,
+ 31_766 + 326);
public static Werkstoff Naquadria = new Werkstoff(Materials.Naquadria, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 327);
public static Werkstoff WroughtIron = new Werkstoff(Materials.WroughtIron, ADD_CASINGS_ONLY, ISOTOPE, 31_766 + 304);
- public static Werkstoff AnnealedCopper =
- new Werkstoff(Materials.AnnealedCopper, ADD_CASINGS_ONLY, ISOTOPE, 31_766 + 345);
+ public static Werkstoff AnnealedCopper = new Werkstoff(
+ Materials.AnnealedCopper,
+ ADD_CASINGS_ONLY,
+ ISOTOPE,
+ 31_766 + 345);
public static Werkstoff Osmiridium = new Werkstoff(Materials.Osmiridium, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 317);
- public static Werkstoff SterlingSilver =
- new Werkstoff(Materials.SterlingSilver, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 350);
+ public static Werkstoff SterlingSilver = new Werkstoff(
+ Materials.SterlingSilver,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 350);
public static Werkstoff RoseGold = new Werkstoff(Materials.RoseGold, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 351);
public static Werkstoff BlackBronze = new Werkstoff(Materials.BlackBronze, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 352);
- public static Werkstoff BismuthBronze =
- new Werkstoff(Materials.BismuthBronze, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 353);
+ public static Werkstoff BismuthBronze = new Werkstoff(
+ Materials.BismuthBronze,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 353);
public static Werkstoff BlackSteel = new Werkstoff(Materials.BlackSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 334);
public static Werkstoff RedSteel = new Werkstoff(Materials.RedSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 348);
public static Werkstoff BlueSteel = new Werkstoff(Materials.BlueSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 349);
- public static Werkstoff DamascusSteel =
- new Werkstoff(Materials.DamascusSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 335);
- public static Werkstoff TungstenSteel =
- new Werkstoff(Materials.TungstenSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 316);
+ public static Werkstoff DamascusSteel = new Werkstoff(
+ Materials.DamascusSteel,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 335);
+ public static Werkstoff TungstenSteel = new Werkstoff(
+ Materials.TungstenSteel,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 316);
public static Werkstoff Ultimet = new Werkstoff(Materials.Ultimet, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 344);
- public static Werkstoff TungstenCarbide =
- new Werkstoff(Materials.TungstenCarbide, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 370);
- public static Werkstoff VanadiumSteel =
- new Werkstoff(Materials.VanadiumSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 371);
+ public static Werkstoff TungstenCarbide = new Werkstoff(
+ Materials.TungstenCarbide,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 370);
+ public static Werkstoff VanadiumSteel = new Werkstoff(
+ Materials.VanadiumSteel,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 371);
public static Werkstoff HSSG = new Werkstoff(Materials.HSSG, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 372);
public static Werkstoff HSSE = new Werkstoff(Materials.HSSE, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 373);
public static Werkstoff HSSS = new Werkstoff(Materials.HSSS, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 374);
- public static Werkstoff StainlessSteel =
- new Werkstoff(Materials.StainlessSteel, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 306);
+ public static Werkstoff StainlessSteel = new Werkstoff(
+ Materials.StainlessSteel,
+ ADD_CASINGS_ONLY,
+ MIXTURE,
+ 31_766 + 306);
public static Werkstoff Brass = new Werkstoff(Materials.Brass, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 301);
public static Werkstoff Bronze = new Werkstoff(Materials.Bronze, ADD_CASINGS_ONLY, MIXTURE, 31_766 + 300);
@@ -156,11 +184,15 @@ public class BW_GT_MaterialReference {
// public static Werkstoff WoodSealed = new Werkstoff(Materials.WoodSealed, ADD_CASINGS_ONLY,
// BIOLOGICAL,31_766+889);
// public static Werkstoff Cheese = new Werkstoff(Materials.Cheese, new
- // Werkstoff.GenerationFeatures().addCasings().addMetalItems().addMultipleIngotMetalWorkingItems().enforceUnification(), BIOLOGICAL,31_766+894);
+ // Werkstoff.GenerationFeatures().addCasings().addMetalItems().addMultipleIngotMetalWorkingItems().enforceUnification(),
+ // BIOLOGICAL,31_766+894);
public static Werkstoff Steel = new Werkstoff(Materials.Steel, ADD_CASINGS_ONLY, COMPOUND, 31_766 + 305);
- public static Werkstoff Polytetrafluoroethylene =
- new Werkstoff(Materials.Polytetrafluoroethylene, ADD_CASINGS_ONLY, COMPOUND, 31_766 + 473);
+ public static Werkstoff Polytetrafluoroethylene = new Werkstoff(
+ Materials.Polytetrafluoroethylene,
+ ADD_CASINGS_ONLY,
+ COMPOUND,
+ 31_766 + 473);
public static Werkstoff Plastic = new Werkstoff(Materials.Plastic, ADD_CASINGS_ONLY, COMPOUND, 31_766 + 874);
public static Werkstoff Epoxid = new Werkstoff(Materials.Epoxid, ADD_CASINGS_ONLY, COMPOUND, 31_766 + 470);
public static Werkstoff Magnesia = new Werkstoff(
@@ -173,796 +205,796 @@ public class BW_GT_MaterialReference {
MainMod.LOGGER.info("Load Elements from GT");
}
- // TODO: GT++ only?
+ // TODO: GT++ only?
- // public static Werkstoff Flerovium = new Werkstoff(Materials.Flerovium, <GenerationFeatures>,
+ // public static Werkstoff Flerovium = new Werkstoff(Materials.Flerovium, <GenerationFeatures>,
// <TypeRef>,31_766+984);
- // public static Werkstoff HeeEndium = new Werkstoff(Materials.HeeEndium, <GenerationFeatures>,
+ // public static Werkstoff HeeEndium = new Werkstoff(Materials.HeeEndium, <GenerationFeatures>,
// <TypeRef>,31_766+770);
- // public static Werkstoff PlatinumGroupSludge = new Werkstoff(Materials.PlatinumGroupSludge,
+ // public static Werkstoff PlatinumGroupSludge = new Werkstoff(Materials.PlatinumGroupSludge,
// <GenerationFeatures>, <TypeRef>,31_766+241);
- // public static Werkstoff Draconium = new Werkstoff(Materials.Draconium, <GenerationFeatures>,
+ // public static Werkstoff Draconium = new Werkstoff(Materials.Draconium, <GenerationFeatures>,
// <TypeRef>,31_766+975);
- // public static Werkstoff DraconiumAwakened = new Werkstoff(Materials.DraconiumAwakened, <GenerationFeatures>,
+ // public static Werkstoff DraconiumAwakened = new Werkstoff(Materials.DraconiumAwakened, <GenerationFeatures>,
// <TypeRef>,31_766+976);
- // public static Werkstoff Adamantium = new Werkstoff(Materials.Adamantium, <GenerationFeatures>,
+ // public static Werkstoff Adamantium = new Werkstoff(Materials.Adamantium, <GenerationFeatures>,
// <TypeRef>,31_766+319);
- // public static Werkstoff Alduorite = new Werkstoff(Materials.Alduorite, <GenerationFeatures>,
+ // public static Werkstoff Alduorite = new Werkstoff(Materials.Alduorite, <GenerationFeatures>,
// <TypeRef>,31_766+485);
- // public static Werkstoff Amber = new Werkstoff(Materials.Amber, <GenerationFeatures>, <TypeRef>,31_766+514);
- // public static Werkstoff Angmallen = new Werkstoff(Materials.Angmallen, <GenerationFeatures>,
+ // public static Werkstoff Amber = new Werkstoff(Materials.Amber, <GenerationFeatures>, <TypeRef>,31_766+514);
+ // public static Werkstoff Angmallen = new Werkstoff(Materials.Angmallen, <GenerationFeatures>,
// <TypeRef>,31_766+958);
- // public static Werkstoff Atlarus = new Werkstoff(Materials.Atlarus, <GenerationFeatures>,
+ // public static Werkstoff Atlarus = new Werkstoff(Materials.Atlarus, <GenerationFeatures>,
// <TypeRef>,31_766+965);
- // public static Werkstoff Blizz = new Werkstoff(Materials.Blizz, <GenerationFeatures>, <TypeRef>,31_766+851);
- // public static Werkstoff Blueschist = new Werkstoff(Materials.Blueschist, <GenerationFeatures>,
+ // public static Werkstoff Blizz = new Werkstoff(Materials.Blizz, <GenerationFeatures>, <TypeRef>,31_766+851);
+ // public static Werkstoff Blueschist = new Werkstoff(Materials.Blueschist, <GenerationFeatures>,
// <TypeRef>,31_766+852);
- // public static Werkstoff Bluestone = new Werkstoff(Materials.Bluestone, <GenerationFeatures>,
+ // public static Werkstoff Bluestone = new Werkstoff(Materials.Bluestone, <GenerationFeatures>,
// <TypeRef>,31_766+813);
- // public static Werkstoff Carmot = new Werkstoff(Materials.Carmot, <GenerationFeatures>, <TypeRef>,31_766+962);
- // public static Werkstoff Celenegil = new Werkstoff(Materials.Celenegil, <GenerationFeatures>,
+ // public static Werkstoff Carmot = new Werkstoff(Materials.Carmot, <GenerationFeatures>, <TypeRef>,31_766+962);
+ // public static Werkstoff Celenegil = new Werkstoff(Materials.Celenegil, <GenerationFeatures>,
// <TypeRef>,31_766+964);
- // public static Werkstoff CertusQuartz = new Werkstoff(Materials.CertusQuartz, <GenerationFeatures>,
+ // public static Werkstoff CertusQuartz = new Werkstoff(Materials.CertusQuartz, <GenerationFeatures>,
// <TypeRef>,31_766+516);
- // public static Werkstoff Ceruclase = new Werkstoff(Materials.Ceruclase, <GenerationFeatures>,
+ // public static Werkstoff Ceruclase = new Werkstoff(Materials.Ceruclase, <GenerationFeatures>,
// <TypeRef>,31_766+952);
- // public static Werkstoff CobaltHexahydrate = new Werkstoff(Materials.CobaltHexahydrate, <GenerationFeatures>,
+ // public static Werkstoff CobaltHexahydrate = new Werkstoff(Materials.CobaltHexahydrate, <GenerationFeatures>,
// <TypeRef>,31_766+853);
- // public static Werkstoff ConstructionFoam = new Werkstoff(Materials.ConstructionFoam, <GenerationFeatures>,
+ // public static Werkstoff ConstructionFoam = new Werkstoff(Materials.ConstructionFoam, <GenerationFeatures>,
// <TypeRef>,31_766+854);
- // public static Werkstoff Chert = new Werkstoff(Materials.Chert, <GenerationFeatures>, <TypeRef>,31_766+857);
- // public static Werkstoff CrudeOil = new Werkstoff(Materials.CrudeOil, <GenerationFeatures>,
+ // public static Werkstoff Chert = new Werkstoff(Materials.Chert, <GenerationFeatures>, <TypeRef>,31_766+857);
+ // public static Werkstoff CrudeOil = new Werkstoff(Materials.CrudeOil, <GenerationFeatures>,
// <TypeRef>,31_766+858);
- // public static Werkstoff Dacite = new Werkstoff(Materials.Dacite, <GenerationFeatures>, <TypeRef>,31_766+859);
- // public static Werkstoff DarkIron = new Werkstoff(Materials.DarkIron, <GenerationFeatures>,
+ // public static Werkstoff Dacite = new Werkstoff(Materials.Dacite, <GenerationFeatures>, <TypeRef>,31_766+859);
+ // public static Werkstoff DarkIron = new Werkstoff(Materials.DarkIron, <GenerationFeatures>,
// <TypeRef>,31_766+342);
- // public static Werkstoff Desh = new Werkstoff(Materials.Desh, <GenerationFeatures>, <TypeRef>,31_766+884);
- // public static Werkstoff Dilithium = new Werkstoff(Materials.Dilithium, <GenerationFeatures>,
+ // public static Werkstoff Desh = new Werkstoff(Materials.Desh, <GenerationFeatures>, <TypeRef>,31_766+884);
+ // public static Werkstoff Dilithium = new Werkstoff(Materials.Dilithium, <GenerationFeatures>,
// <TypeRef>,31_766+515);
- // public static Werkstoff Duranium = new Werkstoff(Materials.Duranium, <GenerationFeatures>,
+ // public static Werkstoff Duranium = new Werkstoff(Materials.Duranium, <GenerationFeatures>,
// <TypeRef>,31_766+328);
- // public static Werkstoff Eclogite = new Werkstoff(Materials.Eclogite, <GenerationFeatures>,
+ // public static Werkstoff Eclogite = new Werkstoff(Materials.Eclogite, <GenerationFeatures>,
// <TypeRef>,31_766+860);
- // public static Werkstoff ElectrumFlux = new Werkstoff(Materials.ElectrumFlux, <GenerationFeatures>,
+ // public static Werkstoff ElectrumFlux = new Werkstoff(Materials.ElectrumFlux, <GenerationFeatures>,
// <TypeRef>,31_766+320);
- // public static Werkstoff Emery = new Werkstoff(Materials.Emery, <GenerationFeatures>, <TypeRef>,31_766+861);
- // public static Werkstoff EnderiumBase = new Werkstoff(Materials.EnderiumBase, <GenerationFeatures>,
+ // public static Werkstoff Emery = new Werkstoff(Materials.Emery, <GenerationFeatures>, <TypeRef>,31_766+861);
+ // public static Werkstoff EnderiumBase = new Werkstoff(Materials.EnderiumBase, <GenerationFeatures>,
// <TypeRef>,31_766+380);
- // public static Werkstoff Epidote = new Werkstoff(Materials.Epidote, <GenerationFeatures>,
+ // public static Werkstoff Epidote = new Werkstoff(Materials.Epidote, <GenerationFeatures>,
// <TypeRef>,31_766+862);
- // public static Werkstoff Eximite = new Werkstoff(Materials.Eximite, <GenerationFeatures>,
+ // public static Werkstoff Eximite = new Werkstoff(Materials.Eximite, <GenerationFeatures>,
// <TypeRef>,31_766+959);
- // public static Werkstoff FierySteel = new Werkstoff(Materials.FierySteel, <GenerationFeatures>,
+ // public static Werkstoff FierySteel = new Werkstoff(Materials.FierySteel, <GenerationFeatures>,
// <TypeRef>,31_766+346);
- // public static Werkstoff Firestone = new Werkstoff(Materials.Firestone, <GenerationFeatures>,
+ // public static Werkstoff Firestone = new Werkstoff(Materials.Firestone, <GenerationFeatures>,
// <TypeRef>,31_766+347);
- // public static Werkstoff FoolsRuby = new Werkstoff(Materials.FoolsRuby, <GenerationFeatures>,
+ // public static Werkstoff FoolsRuby = new Werkstoff(Materials.FoolsRuby, <GenerationFeatures>,
// <TypeRef>,31_766+512);
- // public static Werkstoff Force = new Werkstoff(Materials.Force, <GenerationFeatures>, <TypeRef>,31_766+521);
- // public static Werkstoff Forcicium = new Werkstoff(Materials.Forcicium, <GenerationFeatures>,
+ // public static Werkstoff Force = new Werkstoff(Materials.Force, <GenerationFeatures>, <TypeRef>,31_766+521);
+ // public static Werkstoff Forcicium = new Werkstoff(Materials.Forcicium, <GenerationFeatures>,
// <TypeRef>,31_766+518);
- // public static Werkstoff Forcillium = new Werkstoff(Materials.Forcillium, <GenerationFeatures>,
+ // public static Werkstoff Forcillium = new Werkstoff(Materials.Forcillium, <GenerationFeatures>,
// <TypeRef>,31_766+519);
- // public static Werkstoff Gabbro = new Werkstoff(Materials.Gabbro, <GenerationFeatures>, <TypeRef>,31_766+863);
- // public static Werkstoff Glowstone = new Werkstoff(Materials.Glowstone, <GenerationFeatures>,
+ // public static Werkstoff Gabbro = new Werkstoff(Materials.Gabbro, <GenerationFeatures>, <TypeRef>,31_766+863);
+ // public static Werkstoff Glowstone = new Werkstoff(Materials.Glowstone, <GenerationFeatures>,
// <TypeRef>,31_766+811);
- // public static Werkstoff Gneiss = new Werkstoff(Materials.Gneiss, <GenerationFeatures>, <TypeRef>,31_766+864);
- // public static Werkstoff Graphite = new Werkstoff(Materials.Graphite, <GenerationFeatures>,
+ // public static Werkstoff Gneiss = new Werkstoff(Materials.Gneiss, <GenerationFeatures>, <TypeRef>,31_766+864);
+ // public static Werkstoff Graphite = new Werkstoff(Materials.Graphite, <GenerationFeatures>,
// <TypeRef>,31_766+865);
- // public static Werkstoff Graphene = new Werkstoff(Materials.Graphene, <GenerationFeatures>,
+ // public static Werkstoff Graphene = new Werkstoff(Materials.Graphene, <GenerationFeatures>,
// <TypeRef>,31_766+819);
- // public static Werkstoff Greenschist = new Werkstoff(Materials.Greenschist, <GenerationFeatures>,
+ // public static Werkstoff Greenschist = new Werkstoff(Materials.Greenschist, <GenerationFeatures>,
// <TypeRef>,31_766+866);
- // public static Werkstoff Greenstone = new Werkstoff(Materials.Greenstone, <GenerationFeatures>,
+ // public static Werkstoff Greenstone = new Werkstoff(Materials.Greenstone, <GenerationFeatures>,
// <TypeRef>,31_766+867);
- // public static Werkstoff Greywacke = new Werkstoff(Materials.Greywacke, <GenerationFeatures>,
+ // public static Werkstoff Greywacke = new Werkstoff(Materials.Greywacke, <GenerationFeatures>,
// <TypeRef>,31_766+897);
- // public static Werkstoff Haderoth = new Werkstoff(Materials.Haderoth, <GenerationFeatures>,
+ // public static Werkstoff Haderoth = new Werkstoff(Materials.Haderoth, <GenerationFeatures>,
// <TypeRef>,31_766+963);
- // public static Werkstoff Hepatizon = new Werkstoff(Materials.Hepatizon, <GenerationFeatures>,
+ // public static Werkstoff Hepatizon = new Werkstoff(Materials.Hepatizon, <GenerationFeatures>,
// <TypeRef>,31_766+957);
- // public static Werkstoff HSLA = new Werkstoff(Materials.HSLA, <GenerationFeatures>, <TypeRef>,31_766+322);
- // public static Werkstoff Ignatius = new Werkstoff(Materials.Ignatius, <GenerationFeatures>,
+ // public static Werkstoff HSLA = new Werkstoff(Materials.HSLA, <GenerationFeatures>, <TypeRef>,31_766+322);
+ // public static Werkstoff Ignatius = new Werkstoff(Materials.Ignatius, <GenerationFeatures>,
// <TypeRef>,31_766+950);
- // public static Werkstoff Infuscolium = new Werkstoff(Materials.Infuscolium, <GenerationFeatures>,
+ // public static Werkstoff Infuscolium = new Werkstoff(Materials.Infuscolium, <GenerationFeatures>,
// <TypeRef>,31_766+490);
- // public static Werkstoff InfusedGold = new Werkstoff(Materials.InfusedGold, <GenerationFeatures>,
+ // public static Werkstoff InfusedGold = new Werkstoff(Materials.InfusedGold, <GenerationFeatures>,
// <TypeRef>,31_766+323);
- // public static Werkstoff InfusedAir = new Werkstoff(Materials.InfusedAir, <GenerationFeatures>,
+ // public static Werkstoff InfusedAir = new Werkstoff(Materials.InfusedAir, <GenerationFeatures>,
// <TypeRef>,31_766+540);
- // public static Werkstoff InfusedFire = new Werkstoff(Materials.InfusedFire, <GenerationFeatures>,
+ // public static Werkstoff InfusedFire = new Werkstoff(Materials.InfusedFire, <GenerationFeatures>,
// <TypeRef>,31_766+541);
- // public static Werkstoff InfusedEarth = new Werkstoff(Materials.InfusedEarth, <GenerationFeatures>,
+ // public static Werkstoff InfusedEarth = new Werkstoff(Materials.InfusedEarth, <GenerationFeatures>,
// <TypeRef>,31_766+542);
- // public static Werkstoff InfusedWater = new Werkstoff(Materials.InfusedWater, <GenerationFeatures>,
+ // public static Werkstoff InfusedWater = new Werkstoff(Materials.InfusedWater, <GenerationFeatures>,
// <TypeRef>,31_766+543);
- // public static Werkstoff InfusedEntropy = new Werkstoff(Materials.InfusedEntropy, <GenerationFeatures>,
+ // public static Werkstoff InfusedEntropy = new Werkstoff(Materials.InfusedEntropy, <GenerationFeatures>,
// <TypeRef>,31_766+544);
- // public static Werkstoff InfusedOrder = new Werkstoff(Materials.InfusedOrder, <GenerationFeatures>,
+ // public static Werkstoff InfusedOrder = new Werkstoff(Materials.InfusedOrder, <GenerationFeatures>,
// <TypeRef>,31_766+545);
- // public static Werkstoff Inolashite = new Werkstoff(Materials.Inolashite, <GenerationFeatures>,
+ // public static Werkstoff Inolashite = new Werkstoff(Materials.Inolashite, <GenerationFeatures>,
// <TypeRef>,31_766+954);
- // public static Werkstoff Jade = new Werkstoff(Materials.Jade, <GenerationFeatures>, <TypeRef>,31_766+537);
- // public static Werkstoff Jasper = new Werkstoff(Materials.Jasper, <GenerationFeatures>, <TypeRef>,31_766+511);
- // public static Werkstoff Kalendrite = new Werkstoff(Materials.Kalendrite, <GenerationFeatures>,
+ // public static Werkstoff Jade = new Werkstoff(Materials.Jade, <GenerationFeatures>, <TypeRef>,31_766+537);
+ // public static Werkstoff Jasper = new Werkstoff(Materials.Jasper, <GenerationFeatures>, <TypeRef>,31_766+511);
+ // public static Werkstoff Kalendrite = new Werkstoff(Materials.Kalendrite, <GenerationFeatures>,
// <TypeRef>,31_766+953);
- // public static Werkstoff Komatiite = new Werkstoff(Materials.Komatiite, <GenerationFeatures>,
+ // public static Werkstoff Komatiite = new Werkstoff(Materials.Komatiite, <GenerationFeatures>,
// <TypeRef>,31_766+869);
- // public static Werkstoff Lava = new Werkstoff(Materials.Lava, <GenerationFeatures>, <TypeRef>,31_766+700);
- // public static Werkstoff Lemurite = new Werkstoff(Materials.Lemurite, <GenerationFeatures>,
+ // public static Werkstoff Lava = new Werkstoff(Materials.Lava, <GenerationFeatures>, <TypeRef>,31_766+700);
+ // public static Werkstoff Lemurite = new Werkstoff(Materials.Lemurite, <GenerationFeatures>,
// <TypeRef>,31_766+486);
- // public static Werkstoff MeteoricIron = new Werkstoff(Materials.MeteoricIron, <GenerationFeatures>,
+ // public static Werkstoff MeteoricIron = new Werkstoff(Materials.MeteoricIron, <GenerationFeatures>,
// <TypeRef>,31_766+340);
- // public static Werkstoff MeteoricSteel = new Werkstoff(Materials.MeteoricSteel, <GenerationFeatures>,
+ // public static Werkstoff MeteoricSteel = new Werkstoff(Materials.MeteoricSteel, <GenerationFeatures>,
// <TypeRef>,31_766+341);
- // public static Werkstoff Meutoite = new Werkstoff(Materials.Meutoite, <GenerationFeatures>,
+ // public static Werkstoff Meutoite = new Werkstoff(Materials.Meutoite, <GenerationFeatures>,
// <TypeRef>,31_766+487);
- // public static Werkstoff Migmatite = new Werkstoff(Materials.Migmatite, <GenerationFeatures>,
+ // public static Werkstoff Migmatite = new Werkstoff(Materials.Migmatite, <GenerationFeatures>,
// <TypeRef>,31_766+872);
- // public static Werkstoff NetherBrick = new Werkstoff(Materials.NetherBrick, <GenerationFeatures>,
+ // public static Werkstoff NetherBrick = new Werkstoff(Materials.NetherBrick, <GenerationFeatures>,
// <TypeRef>,31_766+814);
- // public static Werkstoff NetherQuartz = new Werkstoff(Materials.NetherQuartz, <GenerationFeatures>,
+ // public static Werkstoff NetherQuartz = new Werkstoff(Materials.NetherQuartz, <GenerationFeatures>,
// <TypeRef>,31_766+522);
- // public static Werkstoff NetherStar = new Werkstoff(Materials.NetherStar, <GenerationFeatures>,
+ // public static Werkstoff NetherStar = new Werkstoff(Materials.NetherStar, <GenerationFeatures>,
// <TypeRef>,31_766+506);
- // public static Werkstoff Oilsands = new Werkstoff(Materials.Oilsands, <GenerationFeatures>,
+ // public static Werkstoff Oilsands = new Werkstoff(Materials.Oilsands, <GenerationFeatures>,
// <TypeRef>,31_766+878);
- // public static Werkstoff Orichalcum = new Werkstoff(Materials.Orichalcum, <GenerationFeatures>,
+ // public static Werkstoff Orichalcum = new Werkstoff(Materials.Orichalcum, <GenerationFeatures>,
// <TypeRef>,31_766+966);
- // public static Werkstoff Oureclase = new Werkstoff(Materials.Oureclase, <GenerationFeatures>,
+ // public static Werkstoff Oureclase = new Werkstoff(Materials.Oureclase, <GenerationFeatures>,
// <TypeRef>,31_766+961);
- // public static Werkstoff Prometheum = new Werkstoff(Materials.Prometheum, <GenerationFeatures>,
+ // public static Werkstoff Prometheum = new Werkstoff(Materials.Prometheum, <GenerationFeatures>,
// <TypeRef>,31_766+960);
- // public static Werkstoff Quartzite = new Werkstoff(Materials.Quartzite, <GenerationFeatures>,
+ // public static Werkstoff Quartzite = new Werkstoff(Materials.Quartzite, <GenerationFeatures>,
// <TypeRef>,31_766+523);
- // public static Werkstoff Rhyolite = new Werkstoff(Materials.Rhyolite, <GenerationFeatures>,
+ // public static Werkstoff Rhyolite = new Werkstoff(Materials.Rhyolite, <GenerationFeatures>,
// <TypeRef>,31_766+875);
- // public static Werkstoff Rubracium = new Werkstoff(Materials.Rubracium, <GenerationFeatures>,
+ // public static Werkstoff Rubracium = new Werkstoff(Materials.Rubracium, <GenerationFeatures>,
// <TypeRef>,31_766+488);
- // public static Werkstoff Sanguinite = new Werkstoff(Materials.Sanguinite, <GenerationFeatures>,
+ // public static Werkstoff Sanguinite = new Werkstoff(Materials.Sanguinite, <GenerationFeatures>,
// <TypeRef>,31_766+955);
- // public static Werkstoff Siltstone = new Werkstoff(Materials.Siltstone, <GenerationFeatures>,
+ // public static Werkstoff Siltstone = new Werkstoff(Materials.Siltstone, <GenerationFeatures>,
// <TypeRef>,31_766+876);
- // public static Werkstoff Tartarite = new Werkstoff(Materials.Tartarite, <GenerationFeatures>,
+ // public static Werkstoff Tartarite = new Werkstoff(Materials.Tartarite, <GenerationFeatures>,
// <TypeRef>,31_766+956);
- // public static Werkstoff UUAmplifier = new Werkstoff(Materials.UUAmplifier, <GenerationFeatures>,
+ // public static Werkstoff UUAmplifier = new Werkstoff(Materials.UUAmplifier, <GenerationFeatures>,
// <TypeRef>,31_766+721);
- // public static Werkstoff UUMatter = new Werkstoff(Materials.UUMatter, <GenerationFeatures>,
+ // public static Werkstoff UUMatter = new Werkstoff(Materials.UUMatter, <GenerationFeatures>,
// <TypeRef>,31_766+703);
- // public static Werkstoff Void = new Werkstoff(Materials.Void, <GenerationFeatures>, <TypeRef>,31_766+970);
- // public static Werkstoff Vulcanite = new Werkstoff(Materials.Vulcanite, <GenerationFeatures>,
+ // public static Werkstoff Void = new Werkstoff(Materials.Void, <GenerationFeatures>, <TypeRef>,31_766+970);
+ // public static Werkstoff Vulcanite = new Werkstoff(Materials.Vulcanite, <GenerationFeatures>,
// <TypeRef>,31_766+489);
- // public static Werkstoff Vyroxeres = new Werkstoff(Materials.Vyroxeres, <GenerationFeatures>,
+ // public static Werkstoff Vyroxeres = new Werkstoff(Materials.Vyroxeres, <GenerationFeatures>,
// <TypeRef>,31_766+951);
- // public static Werkstoff BioFuel = new Werkstoff(Materials.BioFuel, <GenerationFeatures>,
+ // public static Werkstoff BioFuel = new Werkstoff(Materials.BioFuel, <GenerationFeatures>,
// <TypeRef>,31_766+705);
- // public static Werkstoff Biomass = new Werkstoff(Materials.Biomass, <GenerationFeatures>,
+ // public static Werkstoff Biomass = new Werkstoff(Materials.Biomass, <GenerationFeatures>,
// <TypeRef>,31_766+704);
- // public static CharcoalByproducts = new MaterialBuilder
+ // public static CharcoalByproducts = new MaterialBuilder
- // public static Werkstoff Chili = new Werkstoff(Materials.Chili, <GenerationFeatures>, <TypeRef>,31_766+895);
- // public static Werkstoff Chocolate = new Werkstoff(Materials.Chocolate, <GenerationFeatures>,
+ // public static Werkstoff Chili = new Werkstoff(Materials.Chili, <GenerationFeatures>, <TypeRef>,31_766+895);
+ // public static Werkstoff Chocolate = new Werkstoff(Materials.Chocolate, <GenerationFeatures>,
// <TypeRef>,31_766+886);
- // public static Werkstoff CoalFuel = new Werkstoff(Materials.CoalFuel, <GenerationFeatures>,
+ // public static Werkstoff CoalFuel = new Werkstoff(Materials.CoalFuel, <GenerationFeatures>,
// <TypeRef>,31_766+710);
- // public static Werkstoff Cocoa = new Werkstoff(Materials.Cocoa, <GenerationFeatures>, <TypeRef>,31_766+887);
- // public static Werkstoff Coffee = new Werkstoff(Materials.Coffee, <GenerationFeatures>, <TypeRef>,31_766+888);
- // public static Werkstoff Creosote = new Werkstoff(Materials.Creosote, <GenerationFeatures>,
+ // public static Werkstoff Cocoa = new Werkstoff(Materials.Cocoa, <GenerationFeatures>, <TypeRef>,31_766+887);
+ // public static Werkstoff Coffee = new Werkstoff(Materials.Coffee, <GenerationFeatures>, <TypeRef>,31_766+888);
+ // public static Werkstoff Creosote = new Werkstoff(Materials.Creosote, <GenerationFeatures>,
// <TypeRef>,31_766+712);
- // public static Werkstoff Ethanol = new Werkstoff(Materials.Ethanol, <GenerationFeatures>,
+ // public static Werkstoff Ethanol = new Werkstoff(Materials.Ethanol, <GenerationFeatures>,
// <TypeRef>,31_766+706);
- // public static FermentedBiomass = new MaterialBuilder
- // public static Werkstoff Fuel = new Werkstoff(Materials.Fuel, <GenerationFeatures>, <TypeRef>,31_766+708);
- // public static Werkstoff Glue = new Werkstoff(Materials.Glue, <GenerationFeatures>, <TypeRef>,31_766+726);
- // public static Werkstoff Gunpowder = new Werkstoff(Materials.Gunpowder, <GenerationFeatures>,
+ // public static FermentedBiomass = new MaterialBuilder
+ // public static Werkstoff Fuel = new Werkstoff(Materials.Fuel, <GenerationFeatures>, <TypeRef>,31_766+708);
+ // public static Werkstoff Glue = new Werkstoff(Materials.Glue, <GenerationFeatures>, <TypeRef>,31_766+726);
+ // public static Werkstoff Gunpowder = new Werkstoff(Materials.Gunpowder, <GenerationFeatures>,
// <TypeRef>,31_766+800);
- // public static Werkstoff FryingOilHot = new Werkstoff(Materials.FryingOilHot, <GenerationFeatures>,
+ // public static Werkstoff FryingOilHot = new Werkstoff(Materials.FryingOilHot, <GenerationFeatures>,
// <TypeRef>,31_766+727);
- // public static Werkstoff Honey = new Werkstoff(Materials.Honey, <GenerationFeatures>, <TypeRef>,31_766+725);
- // public static Werkstoff Lubricant = new Werkstoff(Materials.Lubricant, <GenerationFeatures>,
+ // public static Werkstoff Honey = new Werkstoff(Materials.Honey, <GenerationFeatures>, <TypeRef>,31_766+725);
+ // public static Werkstoff Lubricant = new Werkstoff(Materials.Lubricant, <GenerationFeatures>,
// <TypeRef>,31_766+724);
- // public static Werkstoff McGuffium239 = new Werkstoff(Materials.McGuffium239, <GenerationFeatures>,
+ // public static Werkstoff McGuffium239 = new Werkstoff(Materials.McGuffium239, <GenerationFeatures>,
// <TypeRef>,31_766+999);
- // public static Werkstoff MeatRaw = new Werkstoff(Materials.MeatRaw, <GenerationFeatures>,
+ // public static Werkstoff MeatRaw = new Werkstoff(Materials.MeatRaw, <GenerationFeatures>,
// <TypeRef>,31_766+892);
- // public static Werkstoff MeatCooked = new Werkstoff(Materials.MeatCooked, <GenerationFeatures>,
+ // public static Werkstoff MeatCooked = new Werkstoff(Materials.MeatCooked, <GenerationFeatures>,
// <TypeRef>,31_766+893);
- // public static Werkstoff Milk = new Werkstoff(Materials.Milk, <GenerationFeatures>, <TypeRef>,31_766+885);
- // public static Werkstoff Oil = new Werkstoff(Materials.Oil, <GenerationFeatures>, <TypeRef>,31_766+707);
- // public static Werkstoff Paper = new Werkstoff(Materials.Paper, <GenerationFeatures>, <TypeRef>,31_766+879);
- // public static Werkstoff RareEarth = new Werkstoff(Materials.RareEarth, <GenerationFeatures>,
+ // public static Werkstoff Milk = new Werkstoff(Materials.Milk, <GenerationFeatures>, <TypeRef>,31_766+885);
+ // public static Werkstoff Oil = new Werkstoff(Materials.Oil, <GenerationFeatures>, <TypeRef>,31_766+707);
+ // public static Werkstoff Paper = new Werkstoff(Materials.Paper, <GenerationFeatures>, <TypeRef>,31_766+879);
+ // public static Werkstoff RareEarth = new Werkstoff(Materials.RareEarth, <GenerationFeatures>,
// <TypeRef>,31_766+891);
- // public static Werkstoff Reinforced = new Werkstoff(Materials.Reinforced, <GenerationFeatures>,
+ // public static Werkstoff Reinforced = new Werkstoff(Materials.Reinforced, <GenerationFeatures>,
// <TypeRef>,31_766+383);
- // public static Werkstoff SeedOil = new Werkstoff(Materials.SeedOil, <GenerationFeatures>,
+ // public static Werkstoff SeedOil = new Werkstoff(Materials.SeedOil, <GenerationFeatures>,
// <TypeRef>,31_766+713);
- // public static Werkstoff SeedOilHemp = new Werkstoff(Materials.SeedOilHemp, <GenerationFeatures>,
+ // public static Werkstoff SeedOilHemp = new Werkstoff(Materials.SeedOilHemp, <GenerationFeatures>,
// <TypeRef>,31_766+722);
- // public static Werkstoff SeedOilLin = new Werkstoff(Materials.SeedOilLin, <GenerationFeatures>,
+ // public static Werkstoff SeedOilLin = new Werkstoff(Materials.SeedOilLin, <GenerationFeatures>,
// <TypeRef>,31_766+723);
- // public static Werkstoff Stone = new Werkstoff(Materials.Stone, <GenerationFeatures>, <TypeRef>,31_766+299);
- // public static Werkstoff Unstable = new Werkstoff(Materials.Unstable, <GenerationFeatures>,
+ // public static Werkstoff Stone = new Werkstoff(Materials.Stone, <GenerationFeatures>, <TypeRef>,31_766+299);
+ // public static Werkstoff Unstable = new Werkstoff(Materials.Unstable, <GenerationFeatures>,
// <TypeRef>,31_766+396);
- // public static Vinegar = new MaterialBuilder
- // public static Werkstoff Wheat = new Werkstoff(Materials.Wheat, <GenerationFeatures>, <TypeRef>,31_766+881);
- // public static WoodGas = new MaterialBuilder
- // public static WoodTar = new MaterialBuilder
- // public static WoodVinegar = new MaterialBuilder
+ // public static Vinegar = new MaterialBuilder
+ // public static Werkstoff Wheat = new Werkstoff(Materials.Wheat, <GenerationFeatures>, <TypeRef>,31_766+881);
+ // public static WoodGas = new MaterialBuilder
+ // public static WoodTar = new MaterialBuilder
+ // public static WoodVinegar = new MaterialBuilder
- // public static Werkstoff Sunnarium = new Werkstoff(Materials.Sunnarium, <GenerationFeatures>,
+ // public static Werkstoff Sunnarium = new Werkstoff(Materials.Sunnarium, <GenerationFeatures>,
// <TypeRef>,31_766+318);
- // public static Werkstoff Endstone = new Werkstoff(Materials.Endstone, <GenerationFeatures>,
+ // public static Werkstoff Endstone = new Werkstoff(Materials.Endstone, <GenerationFeatures>,
// <TypeRef>,31_766+808);
- // public static Werkstoff Netherrack = new Werkstoff(Materials.Netherrack, <GenerationFeatures>,
+ // public static Werkstoff Netherrack = new Werkstoff(Materials.Netherrack, <GenerationFeatures>,
// <TypeRef>,31_766+807);
- // public static Werkstoff Methane = new Werkstoff(Materials.Methane, <GenerationFeatures>,
+ // public static Werkstoff Methane = new Werkstoff(Materials.Methane, <GenerationFeatures>,
// <TypeRef>,31_766+715);
- // public static Werkstoff CarbonDioxide = new Werkstoff(Materials.CarbonDioxide, <GenerationFeatures>,
+ // public static Werkstoff CarbonDioxide = new Werkstoff(Materials.CarbonDioxide, <GenerationFeatures>,
// <TypeRef>,31_766+497);
- // public static Werkstoff NobleGases = new Werkstoff(Materials.NobleGases, <GenerationFeatures>,
+ // public static Werkstoff NobleGases = new Werkstoff(Materials.NobleGases, <GenerationFeatures>,
// <TypeRef>,31_766+496);
- // public static Werkstoff LiquidAir = new Werkstoff(Materials.LiquidAir, <GenerationFeatures>,
+ // public static Werkstoff LiquidAir = new Werkstoff(Materials.LiquidAir, <GenerationFeatures>,
// <TypeRef>,31_766+495);
- // public static Werkstoff LiquidNitrogen = new Werkstoff(Materials.LiquidNitrogen, <GenerationFeatures>,
+ // public static Werkstoff LiquidNitrogen = new Werkstoff(Materials.LiquidNitrogen, <GenerationFeatures>,
// <TypeRef>,31_766+494);
- // public static Werkstoff LiquidOxygen = new Werkstoff(Materials.LiquidOxygen, <GenerationFeatures>,
+ // public static Werkstoff LiquidOxygen = new Werkstoff(Materials.LiquidOxygen, <GenerationFeatures>,
// <TypeRef>,31_766+493);
- // public static Werkstoff Almandine = new Werkstoff(Materials.Almandine, <GenerationFeatures>,
+ // public static Werkstoff Almandine = new Werkstoff(Materials.Almandine, <GenerationFeatures>,
// <TypeRef>,31_766+820);
- // public static Werkstoff Andradite = new Werkstoff(Materials.Andradite, <GenerationFeatures>,
+ // public static Werkstoff Andradite = new Werkstoff(Materials.Andradite, <GenerationFeatures>,
// <TypeRef>,31_766+821);
- // public static Werkstoff Asbestos = new Werkstoff(Materials.Asbestos, <GenerationFeatures>,
+ // public static Werkstoff Asbestos = new Werkstoff(Materials.Asbestos, <GenerationFeatures>,
// <TypeRef>,31_766+946);
- // public static Werkstoff Ash = new Werkstoff(Materials.Ash, <GenerationFeatures>, <TypeRef>,31_766+815);
- // public static Werkstoff BandedIron = new Werkstoff(Materials.BandedIron, <GenerationFeatures>,
+ // public static Werkstoff Ash = new Werkstoff(Materials.Ash, <GenerationFeatures>, <TypeRef>,31_766+815);
+ // public static Werkstoff BandedIron = new Werkstoff(Materials.BandedIron, <GenerationFeatures>,
// <TypeRef>,31_766+917);
- // public static Werkstoff BatteryAlloy = new Werkstoff(Materials.BatteryAlloy, <GenerationFeatures>,
+ // public static Werkstoff BatteryAlloy = new Werkstoff(Materials.BatteryAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+315);
- // public static Werkstoff BlueTopaz = new Werkstoff(Materials.BlueTopaz, <GenerationFeatures>,
+ // public static Werkstoff BlueTopaz = new Werkstoff(Materials.BlueTopaz, <GenerationFeatures>,
// <TypeRef>,31_766+513);
- // public static Werkstoff Bone = new Werkstoff(Materials.Bone, <GenerationFeatures>, <TypeRef>,31_766+806);
+ // public static Werkstoff Bone = new Werkstoff(Materials.Bone, <GenerationFeatures>, <TypeRef>,31_766+806);
- // public static Werkstoff BrownLimonite = new Werkstoff(Materials.BrownLimonite, <GenerationFeatures>,
+ // public static Werkstoff BrownLimonite = new Werkstoff(Materials.BrownLimonite, <GenerationFeatures>,
// <TypeRef>,31_766+930);
- // public static Werkstoff Calcite = new Werkstoff(Materials.Calcite, <GenerationFeatures>,
+ // public static Werkstoff Calcite = new Werkstoff(Materials.Calcite, <GenerationFeatures>,
// <TypeRef>,31_766+823);
- // public static Werkstoff Cassiterite = new Werkstoff(Materials.Cassiterite, <GenerationFeatures>,
+ // public static Werkstoff Cassiterite = new Werkstoff(Materials.Cassiterite, <GenerationFeatures>,
// <TypeRef>,31_766+824);
- // public static Werkstoff CassiteriteSand = new Werkstoff(Materials.CassiteriteSand, <GenerationFeatures>,
+ // public static Werkstoff CassiteriteSand = new Werkstoff(Materials.CassiteriteSand, <GenerationFeatures>,
// <TypeRef>,31_766+937);
- // public static Werkstoff Chalcopyrite = new Werkstoff(Materials.Chalcopyrite, <GenerationFeatures>,
+ // public static Werkstoff Chalcopyrite = new Werkstoff(Materials.Chalcopyrite, <GenerationFeatures>,
// <TypeRef>,31_766+855);
- // public static Werkstoff Charcoal = new Werkstoff(Materials.Charcoal, <GenerationFeatures>,
+ // public static Werkstoff Charcoal = new Werkstoff(Materials.Charcoal, <GenerationFeatures>,
// <TypeRef>,31_766+536);
- // public static Werkstoff Chromite = new Werkstoff(Materials.Chromite, <GenerationFeatures>,
+ // public static Werkstoff Chromite = new Werkstoff(Materials.Chromite, <GenerationFeatures>,
// <TypeRef>,31_766+825);
- // public static Werkstoff ChromiumDioxide = new Werkstoff(Materials.ChromiumDioxide, <GenerationFeatures>,
+ // public static Werkstoff ChromiumDioxide = new Werkstoff(Materials.ChromiumDioxide, <GenerationFeatures>,
// <TypeRef>,31_766+361);
- // public static Werkstoff Cinnabar = new Werkstoff(Materials.Cinnabar, <GenerationFeatures>,
+ // public static Werkstoff Cinnabar = new Werkstoff(Materials.Cinnabar, <GenerationFeatures>,
// <TypeRef>,31_766+826);
- // public static Werkstoff Water = new Werkstoff(Materials.Water, <GenerationFeatures>, <TypeRef>,31_766+701);
- // public static Werkstoff Clay = new Werkstoff(Materials.Clay, <GenerationFeatures>, <TypeRef>,31_766+805);
- // public static Werkstoff Coal = new Werkstoff(Materials.Coal, <GenerationFeatures>, <TypeRef>,31_766+535);
- // public static Werkstoff Cobaltite = new Werkstoff(Materials.Cobaltite, <GenerationFeatures>,
+ // public static Werkstoff Water = new Werkstoff(Materials.Water, <GenerationFeatures>, <TypeRef>,31_766+701);
+ // public static Werkstoff Clay = new Werkstoff(Materials.Clay, <GenerationFeatures>, <TypeRef>,31_766+805);
+ // public static Werkstoff Coal = new Werkstoff(Materials.Coal, <GenerationFeatures>, <TypeRef>,31_766+535);
+ // public static Werkstoff Cobaltite = new Werkstoff(Materials.Cobaltite, <GenerationFeatures>,
// <TypeRef>,31_766+827);
- // public static Werkstoff Cooperite = new Werkstoff(Materials.Cooperite, <GenerationFeatures>,
+ // public static Werkstoff Cooperite = new Werkstoff(Materials.Cooperite, <GenerationFeatures>,
// <TypeRef>,31_766+828);
- // public static Werkstoff Cupronickel = new Werkstoff(Materials.Cupronickel, <GenerationFeatures>,
+ // public static Werkstoff Cupronickel = new Werkstoff(Materials.Cupronickel, <GenerationFeatures>,
// <TypeRef>,31_766+310);
- // public static Werkstoff DarkAsh = new Werkstoff(Materials.DarkAsh, <GenerationFeatures>,
+ // public static Werkstoff DarkAsh = new Werkstoff(Materials.DarkAsh, <GenerationFeatures>,
// <TypeRef>,31_766+816);
- // public static Werkstoff DeepIron = new Werkstoff(Materials.DeepIron, <GenerationFeatures>,
+ // public static Werkstoff DeepIron = new Werkstoff(Materials.DeepIron, <GenerationFeatures>,
// <TypeRef>,31_766+829);
- // public static Werkstoff Diamond = new Werkstoff(Materials.Diamond, <GenerationFeatures>,
+ // public static Werkstoff Diamond = new Werkstoff(Materials.Diamond, <GenerationFeatures>,
// <TypeRef>,31_766+500);
- // public static Werkstoff Electrum = new Werkstoff(Materials.Electrum, <GenerationFeatures>,
+ // public static Werkstoff Electrum = new Werkstoff(Materials.Electrum, <GenerationFeatures>,
// <TypeRef>,31_766+303);
- // public static Werkstoff Emerald = new Werkstoff(Materials.Emerald, <GenerationFeatures>,
+ // public static Werkstoff Emerald = new Werkstoff(Materials.Emerald, <GenerationFeatures>,
// <TypeRef>,31_766+501);
- // public static Werkstoff Galena = new Werkstoff(Materials.Galena, <GenerationFeatures>, <TypeRef>,31_766+830);
- // public static Werkstoff Garnierite = new Werkstoff(Materials.Garnierite, <GenerationFeatures>,
+ // public static Werkstoff Galena = new Werkstoff(Materials.Galena, <GenerationFeatures>, <TypeRef>,31_766+830);
+ // public static Werkstoff Garnierite = new Werkstoff(Materials.Garnierite, <GenerationFeatures>,
// <TypeRef>,31_766+906);
- // public static Werkstoff Glyceryl = new Werkstoff(Materials.Glyceryl, <GenerationFeatures>,
+ // public static Werkstoff Glyceryl = new Werkstoff(Materials.Glyceryl, <GenerationFeatures>,
// <TypeRef>,31_766+714);
- // public static Werkstoff GreenSapphire = new Werkstoff(Materials.GreenSapphire, <GenerationFeatures>,
+ // public static Werkstoff GreenSapphire = new Werkstoff(Materials.GreenSapphire, <GenerationFeatures>,
// <TypeRef>,31_766+504);
- // public static Werkstoff Grossular = new Werkstoff(Materials.Grossular, <GenerationFeatures>,
+ // public static Werkstoff Grossular = new Werkstoff(Materials.Grossular, <GenerationFeatures>,
// <TypeRef>,31_766+831);
- // public static Werkstoff HolyWater = new Werkstoff(Materials.HolyWater, <GenerationFeatures>,
+ // public static Werkstoff HolyWater = new Werkstoff(Materials.HolyWater, <GenerationFeatures>,
// <TypeRef>,31_766+729);
- // public static Werkstoff Ice = new Werkstoff(Materials.Ice, <GenerationFeatures>, <TypeRef>,31_766+702);
- // public static Werkstoff Ilmenite = new Werkstoff(Materials.Ilmenite, <GenerationFeatures>,
+ // public static Werkstoff Ice = new Werkstoff(Materials.Ice, <GenerationFeatures>, <TypeRef>,31_766+702);
+ // public static Werkstoff Ilmenite = new Werkstoff(Materials.Ilmenite, <GenerationFeatures>,
// <TypeRef>,31_766+918);
- // public static Werkstoff Rutile = new Werkstoff(Materials.Rutile, <GenerationFeatures>, <TypeRef>,31_766+375);
- // public static Werkstoff Bauxite = new Werkstoff(Materials.Bauxite, <GenerationFeatures>,
+ // public static Werkstoff Rutile = new Werkstoff(Materials.Rutile, <GenerationFeatures>, <TypeRef>,31_766+375);
+ // public static Werkstoff Bauxite = new Werkstoff(Materials.Bauxite, <GenerationFeatures>,
// <TypeRef>,31_766+822);
- // public static Werkstoff Titaniumtetrachloride = new Werkstoff(Materials.Titaniumtetrachloride,
+ // public static Werkstoff Titaniumtetrachloride = new Werkstoff(Materials.Titaniumtetrachloride,
// <GenerationFeatures>, <TypeRef>,31_766+376);
- // public static Werkstoff Magnesiumchloride = new Werkstoff(Materials.Magnesiumchloride, <GenerationFeatures>,
+ // public static Werkstoff Magnesiumchloride = new Werkstoff(Materials.Magnesiumchloride, <GenerationFeatures>,
// <TypeRef>,31_766+377);
- // public static Werkstoff Invar = new Werkstoff(Materials.Invar, <GenerationFeatures>, <TypeRef>,31_766+302);
- // public static Werkstoff Kanthal = new Werkstoff(Materials.Kanthal, <GenerationFeatures>,
+ // public static Werkstoff Invar = new Werkstoff(Materials.Invar, <GenerationFeatures>, <TypeRef>,31_766+302);
+ // public static Werkstoff Kanthal = new Werkstoff(Materials.Kanthal, <GenerationFeatures>,
// <TypeRef>,31_766+312);
- // public static Werkstoff Lazurite = new Werkstoff(Materials.Lazurite, <GenerationFeatures>,
+ // public static Werkstoff Lazurite = new Werkstoff(Materials.Lazurite, <GenerationFeatures>,
// <TypeRef>,31_766+524);
- // public static Werkstoff Magnalium = new Werkstoff(Materials.Magnalium, <GenerationFeatures>,
+ // public static Werkstoff Magnalium = new Werkstoff(Materials.Magnalium, <GenerationFeatures>,
// <TypeRef>,31_766+313);
- // public static Werkstoff Magnesite = new Werkstoff(Materials.Magnesite, <GenerationFeatures>,
+ // public static Werkstoff Magnesite = new Werkstoff(Materials.Magnesite, <GenerationFeatures>,
// <TypeRef>,31_766+908);
- // public static Werkstoff Magnetite = new Werkstoff(Materials.Magnetite, <GenerationFeatures>,
+ // public static Werkstoff Magnetite = new Werkstoff(Materials.Magnetite, <GenerationFeatures>,
// <TypeRef>,31_766+870);
- // public static Werkstoff Molybdenite = new Werkstoff(Materials.Molybdenite, <GenerationFeatures>,
+ // public static Werkstoff Molybdenite = new Werkstoff(Materials.Molybdenite, <GenerationFeatures>,
// <TypeRef>,31_766+942);
- // public static Werkstoff Nichrome = new Werkstoff(Materials.Nichrome, <GenerationFeatures>,
+ // public static Werkstoff Nichrome = new Werkstoff(Materials.Nichrome, <GenerationFeatures>,
// <TypeRef>,31_766+311);
- // public static Werkstoff NiobiumNitride = new Werkstoff(Materials.NiobiumNitride, <GenerationFeatures>,
+ // public static Werkstoff NiobiumNitride = new Werkstoff(Materials.NiobiumNitride, <GenerationFeatures>,
// <TypeRef>,31_766+359);
- // public static Werkstoff NiobiumTitanium = new Werkstoff(Materials.NiobiumTitanium, <GenerationFeatures>,
+ // public static Werkstoff NiobiumTitanium = new Werkstoff(Materials.NiobiumTitanium, <GenerationFeatures>,
// <TypeRef>,31_766+360);
- // public static Werkstoff NitroCarbon = new Werkstoff(Materials.NitroCarbon, <GenerationFeatures>,
+ // public static Werkstoff NitroCarbon = new Werkstoff(Materials.NitroCarbon, <GenerationFeatures>,
// <TypeRef>,31_766+716);
- // public static Werkstoff NitrogenDioxide = new Werkstoff(Materials.NitrogenDioxide, <GenerationFeatures>,
+ // public static Werkstoff NitrogenDioxide = new Werkstoff(Materials.NitrogenDioxide, <GenerationFeatures>,
// <TypeRef>,31_766+717);
- // public static Werkstoff Obsidian = new Werkstoff(Materials.Obsidian, <GenerationFeatures>,
+ // public static Werkstoff Obsidian = new Werkstoff(Materials.Obsidian, <GenerationFeatures>,
// <TypeRef>,31_766+804);
- // public static Werkstoff Phosphate = new Werkstoff(Materials.Phosphate, <GenerationFeatures>,
+ // public static Werkstoff Phosphate = new Werkstoff(Materials.Phosphate, <GenerationFeatures>,
// <TypeRef>,31_766+833);
- // public static Werkstoff PigIron = new Werkstoff(Materials.PigIron, <GenerationFeatures>,
+ // public static Werkstoff PigIron = new Werkstoff(Materials.PigIron, <GenerationFeatures>,
// <TypeRef>,31_766+307);
- // public static Polydimethylsiloxane = new MaterialBuilder
- // public static Werkstoff Silicone = new Werkstoff(Materials.Silicone, <GenerationFeatures>,
+ // public static Polydimethylsiloxane = new MaterialBuilder
+ // public static Werkstoff Silicone = new Werkstoff(Materials.Silicone, <GenerationFeatures>,
// <TypeRef>,31_766+471);
- // public static Werkstoff Polycaprolactam = new Werkstoff(Materials.Polycaprolactam, <GenerationFeatures>,
+ // public static Werkstoff Polycaprolactam = new Werkstoff(Materials.Polycaprolactam, <GenerationFeatures>,
// <TypeRef>,31_766+472);
- // public static Werkstoff Powellite = new Werkstoff(Materials.Powellite, <GenerationFeatures>,
+ // public static Werkstoff Powellite = new Werkstoff(Materials.Powellite, <GenerationFeatures>,
// <TypeRef>,31_766+883);
- // public static Werkstoff Pumice = new Werkstoff(Materials.Pumice, <GenerationFeatures>, <TypeRef>,31_766+926);
- // public static Werkstoff Pyrite = new Werkstoff(Materials.Pyrite, <GenerationFeatures>, <TypeRef>,31_766+834);
- // public static Werkstoff Pyrolusite = new Werkstoff(Materials.Pyrolusite, <GenerationFeatures>,
+ // public static Werkstoff Pumice = new Werkstoff(Materials.Pumice, <GenerationFeatures>, <TypeRef>,31_766+926);
+ // public static Werkstoff Pyrite = new Werkstoff(Materials.Pyrite, <GenerationFeatures>, <TypeRef>,31_766+834);
+ // public static Werkstoff Pyrolusite = new Werkstoff(Materials.Pyrolusite, <GenerationFeatures>,
// <TypeRef>,31_766+943);
- // public static Werkstoff Pyrope = new Werkstoff(Materials.Pyrope, <GenerationFeatures>, <TypeRef>,31_766+835);
- // public static Werkstoff RockSalt = new Werkstoff(Materials.RockSalt, <GenerationFeatures>,
+ // public static Werkstoff Pyrope = new Werkstoff(Materials.Pyrope, <GenerationFeatures>, <TypeRef>,31_766+835);
+ // public static Werkstoff RockSalt = new Werkstoff(Materials.RockSalt, <GenerationFeatures>,
// <TypeRef>,31_766+944);
- // public static Werkstoff Rubber = new Werkstoff(Materials.Rubber, <GenerationFeatures>, <TypeRef>,31_766+880);
- // public static Werkstoff RawRubber = new Werkstoff(Materials.RawRubber, <GenerationFeatures>,
+ // public static Werkstoff Rubber = new Werkstoff(Materials.Rubber, <GenerationFeatures>, <TypeRef>,31_766+880);
+ // public static Werkstoff RawRubber = new Werkstoff(Materials.RawRubber, <GenerationFeatures>,
// <TypeRef>,31_766+896);
- // public static Werkstoff Ruby = new Werkstoff(Materials.Ruby, <GenerationFeatures>, <TypeRef>,31_766+502);
- // public static Werkstoff Salt = new Werkstoff(Materials.Salt, <GenerationFeatures>, <TypeRef>,31_766+817);
- // public static Werkstoff Saltpeter = new Werkstoff(Materials.Saltpeter, <GenerationFeatures>,
+ // public static Werkstoff Ruby = new Werkstoff(Materials.Ruby, <GenerationFeatures>, <TypeRef>,31_766+502);
+ // public static Werkstoff Salt = new Werkstoff(Materials.Salt, <GenerationFeatures>, <TypeRef>,31_766+817);
+ // public static Werkstoff Saltpeter = new Werkstoff(Materials.Saltpeter, <GenerationFeatures>,
// <TypeRef>,31_766+836);
- // public static Werkstoff Sapphire = new Werkstoff(Materials.Sapphire, <GenerationFeatures>,
+ // public static Werkstoff Sapphire = new Werkstoff(Materials.Sapphire, <GenerationFeatures>,
// <TypeRef>,31_766+503);
- // public static Werkstoff Scheelite = new Werkstoff(Materials.Scheelite, <GenerationFeatures>,
+ // public static Werkstoff Scheelite = new Werkstoff(Materials.Scheelite, <GenerationFeatures>,
// <TypeRef>,31_766+910);
- // public static Werkstoff SiliconDioxide = new Werkstoff(Materials.SiliconDioxide, <GenerationFeatures>,
+ // public static Werkstoff SiliconDioxide = new Werkstoff(Materials.SiliconDioxide, <GenerationFeatures>,
// <TypeRef>,31_766+837);
- // public static Werkstoff Snow = new Werkstoff(Materials.Snow, <GenerationFeatures>, <TypeRef>,31_766+728);
- // public static Werkstoff Sodalite = new Werkstoff(Materials.Sodalite, <GenerationFeatures>,
+ // public static Werkstoff Snow = new Werkstoff(Materials.Snow, <GenerationFeatures>, <TypeRef>,31_766+728);
+ // public static Werkstoff Sodalite = new Werkstoff(Materials.Sodalite, <GenerationFeatures>,
// <TypeRef>,31_766+525);
- // public static Werkstoff SodiumPersulfate = new Werkstoff(Materials.SodiumPersulfate, <GenerationFeatures>,
+ // public static Werkstoff SodiumPersulfate = new Werkstoff(Materials.SodiumPersulfate, <GenerationFeatures>,
// <TypeRef>,31_766+718);
- // public static Werkstoff SodiumSulfide = new Werkstoff(Materials.SodiumSulfide, <GenerationFeatures>,
+ // public static Werkstoff SodiumSulfide = new Werkstoff(Materials.SodiumSulfide, <GenerationFeatures>,
// <TypeRef>,31_766+719);
- // public static Werkstoff HydricSulfide = new Werkstoff(Materials.HydricSulfide, <GenerationFeatures>,
+ // public static Werkstoff HydricSulfide = new Werkstoff(Materials.HydricSulfide, <GenerationFeatures>,
// <TypeRef>,31_766+460);
- // public static Werkstoff OilHeavy = new Werkstoff(Materials.OilHeavy, <GenerationFeatures>,
+ // public static Werkstoff OilHeavy = new Werkstoff(Materials.OilHeavy, <GenerationFeatures>,
// <TypeRef>,31_766+730);
- // public static Werkstoff OilMedium = new Werkstoff(Materials.OilMedium, <GenerationFeatures>,
+ // public static Werkstoff OilMedium = new Werkstoff(Materials.OilMedium, <GenerationFeatures>,
// <TypeRef>,31_766+731);
- // public static Werkstoff OilLight = new Werkstoff(Materials.OilLight, <GenerationFeatures>,
+ // public static Werkstoff OilLight = new Werkstoff(Materials.OilLight, <GenerationFeatures>,
// <TypeRef>,31_766+732);
- // public static Werkstoff NatruralGas = new Werkstoff(Materials.NatruralGas, <GenerationFeatures>,
+ // public static Werkstoff NatruralGas = new Werkstoff(Materials.NatruralGas, <GenerationFeatures>,
// <TypeRef>,31_766+733);
- // public static Werkstoff SulfuricGas = new Werkstoff(Materials.SulfuricGas, <GenerationFeatures>,
+ // public static Werkstoff SulfuricGas = new Werkstoff(Materials.SulfuricGas, <GenerationFeatures>,
// <TypeRef>,31_766+734);
- // public static Werkstoff Gas = new Werkstoff(Materials.Gas, <GenerationFeatures>, <TypeRef>,31_766+735);
- // public static Werkstoff SulfuricNaphtha = new Werkstoff(Materials.SulfuricNaphtha, <GenerationFeatures>,
+ // public static Werkstoff Gas = new Werkstoff(Materials.Gas, <GenerationFeatures>, <TypeRef>,31_766+735);
+ // public static Werkstoff SulfuricNaphtha = new Werkstoff(Materials.SulfuricNaphtha, <GenerationFeatures>,
// <TypeRef>,31_766+736);
- // public static Werkstoff SulfuricLightFuel = new Werkstoff(Materials.SulfuricLightFuel, <GenerationFeatures>,
+ // public static Werkstoff SulfuricLightFuel = new Werkstoff(Materials.SulfuricLightFuel, <GenerationFeatures>,
// <TypeRef>,31_766+737);
- // public static Werkstoff SulfuricHeavyFuel = new Werkstoff(Materials.SulfuricHeavyFuel, <GenerationFeatures>,
+ // public static Werkstoff SulfuricHeavyFuel = new Werkstoff(Materials.SulfuricHeavyFuel, <GenerationFeatures>,
// <TypeRef>,31_766+738);
- // public static Werkstoff Naphtha = new Werkstoff(Materials.Naphtha, <GenerationFeatures>,
+ // public static Werkstoff Naphtha = new Werkstoff(Materials.Naphtha, <GenerationFeatures>,
// <TypeRef>,31_766+739);
- // public static Werkstoff LightFuel = new Werkstoff(Materials.LightFuel, <GenerationFeatures>,
+ // public static Werkstoff LightFuel = new Werkstoff(Materials.LightFuel, <GenerationFeatures>,
// <TypeRef>,31_766+740);
- // public static Werkstoff HeavyFuel = new Werkstoff(Materials.HeavyFuel, <GenerationFeatures>,
+ // public static Werkstoff HeavyFuel = new Werkstoff(Materials.HeavyFuel, <GenerationFeatures>,
// <TypeRef>,31_766+741);
- // public static Werkstoff LPG = new Werkstoff(Materials.LPG, <GenerationFeatures>, <TypeRef>,31_766+742);
- // public static FluidNaquadahFuel = new MaterialBuilder
- // public static EnrichedNaquadria = new MaterialBuilder
- // public static ReinforceGlass = new MaterialBuilder
- // public static BioMediumRaw = new MaterialBuilder
- // public static BioMediumSterilized = new MaterialBuilder
- // public static Chlorobenzene = new MaterialBuild
- // public static DilutedHydrochloricAcid = new MaterialBuild
- // public static Pyrochlore = new MaterialBuild
- // public static GrowthMediumRaw = new MaterialBuild
- // public static GrowthMediumSterilized = new MaterialBuild
- // public static FerriteMixture = new MaterialBuild
- // public static NickelZincFerrite = new MaterialBuild
- // public static Massicot = new MaterialBuild
- // public static ArsenicTrioxide = new MaterialBuild
- // public static CobaltOxide = new MaterialBuild
- // public static Zincite = new MaterialBuild
- // public static AntimonyTrioxide = new MaterialBuild
- // public static CupricOxide = new MaterialBuild
- // public static Ferrosilite = new MaterialBuild
- // public static Magnesia = new MaterialBuild
- // public static Quicklime = new MaterialBuild
- // public static Potash = new MaterialBuild
- // public static SodaAsh = new MaterialBuild
- // public static Brick = new MaterialBuild
- // public static Fireclay = new MaterialBuild
- // public static BioDiesel = new MaterialBuild
- // public static NitrationMixture = new MaterialBuild
- // public static Glycerol = new MaterialBuild
- // public static SodiumBisulfate = new MaterialBuild
- // public static PolyphenyleneSulfide = new MaterialBuild
- // public static Dichlorobenzene = new MaterialBuild
- // public static Polystyrene = new MaterialBuild
- // public static Styrene = new MaterialBuild
- // public static Isoprene = new MaterialBuild
- // public static Tetranitromethane = new MaterialBuild
- // public static Ethenone = new MaterialBuild
- // public static Ethane = new MaterialBuild
- // public static Propane = new MaterialBuild
- // public static Butane = new MaterialBuild
- // public static Butene = new MaterialBuild
- // public static Butadiene = new MaterialBuild
- // public static RawStyreneButadieneRubber = new MaterialBuild
- // public static StyreneButadieneRubber = new MaterialBuild
- // public static Toluene = new MaterialBuild
- // public static Epichlorohydrin = new MaterialBuild
- // public static PolyvinylChloride = new MaterialBuild
- // public static VinylChloride = new MaterialBuild
- // public static SulfurDioxide = new MaterialBuild
- // public static SulfurTrioxide = new MaterialBuild
- // public static NitricAcid = new MaterialBuild
- // public static Dimethylhydrazine = new MaterialBuild
- // public static Chloramine = new MaterialBuild
- // public static Dimethylamine = new MaterialBuild
- // public static DinitrogenTetroxide = new MaterialBuild
- // public static NitricOxide = new MaterialBuild
- // public static Ammonia = new MaterialBuild
- // public static Dimethyldichlorosilane = new MaterialBuild
- // public static Chloromethane = new MaterialBuild
- // public static PhosphorousPentoxide = new MaterialBuild
- // public static Tetrafluoroethylene = new MaterialBuild
- // public static HydrofluoricAcid = new MaterialBuild
- // public static Chloroform = new MaterialBuild
- // public static BisphenolA = new MaterialBuild
- // public static AceticAcid = new MaterialBuild
- // public static CalciumAcetateSolution = new MaterialBuild
- // public static Acetone = new MaterialBuild
- // public static Methanol = new MaterialBuild
- // public static CarbonMonoxide = new MaterialBuild
- // public static MetalMixture = new MaterialBuild
- // public static Ethylene = new MaterialBuild
- // public static Propene = new MaterialBuild
- // public static VinylAcetate = new MaterialBuild
- // public static PolyvinylAcetate = new MaterialBuild
- // public static MethylAcetate = new MaterialBuild
- // public static AllylChloride = new MaterialBuild
- // public static HydrochloricAcid = new MaterialBuild
- // public static HypochlorousAcid = new MaterialBuild
- // public static SodiumHydroxide = new MaterialBuild
- // public static Benzene = new MaterialBuild
- // public static Phenol = new MaterialBuild
- // public static Cumene = new MaterialBuild
- // public static PhosphoricAcid = new MaterialBuild
- // public static SaltWater = new MaterialBuild
- // public static IronIIIChloride = new MaterialBuild
- // public static LifeEssence = new MaterialBuild
- // public static Werkstoff SolderingAlloy = new Werkstoff(Materials.SolderingAlloy, <GenerationFeatures>,
+ // public static Werkstoff LPG = new Werkstoff(Materials.LPG, <GenerationFeatures>, <TypeRef>,31_766+742);
+ // public static FluidNaquadahFuel = new MaterialBuilder
+ // public static EnrichedNaquadria = new MaterialBuilder
+ // public static ReinforceGlass = new MaterialBuilder
+ // public static BioMediumRaw = new MaterialBuilder
+ // public static BioMediumSterilized = new MaterialBuilder
+ // public static Chlorobenzene = new MaterialBuild
+ // public static DilutedHydrochloricAcid = new MaterialBuild
+ // public static Pyrochlore = new MaterialBuild
+ // public static GrowthMediumRaw = new MaterialBuild
+ // public static GrowthMediumSterilized = new MaterialBuild
+ // public static FerriteMixture = new MaterialBuild
+ // public static NickelZincFerrite = new MaterialBuild
+ // public static Massicot = new MaterialBuild
+ // public static ArsenicTrioxide = new MaterialBuild
+ // public static CobaltOxide = new MaterialBuild
+ // public static Zincite = new MaterialBuild
+ // public static AntimonyTrioxide = new MaterialBuild
+ // public static CupricOxide = new MaterialBuild
+ // public static Ferrosilite = new MaterialBuild
+ // public static Magnesia = new MaterialBuild
+ // public static Quicklime = new MaterialBuild
+ // public static Potash = new MaterialBuild
+ // public static SodaAsh = new MaterialBuild
+ // public static Brick = new MaterialBuild
+ // public static Fireclay = new MaterialBuild
+ // public static BioDiesel = new MaterialBuild
+ // public static NitrationMixture = new MaterialBuild
+ // public static Glycerol = new MaterialBuild
+ // public static SodiumBisulfate = new MaterialBuild
+ // public static PolyphenyleneSulfide = new MaterialBuild
+ // public static Dichlorobenzene = new MaterialBuild
+ // public static Polystyrene = new MaterialBuild
+ // public static Styrene = new MaterialBuild
+ // public static Isoprene = new MaterialBuild
+ // public static Tetranitromethane = new MaterialBuild
+ // public static Ethenone = new MaterialBuild
+ // public static Ethane = new MaterialBuild
+ // public static Propane = new MaterialBuild
+ // public static Butane = new MaterialBuild
+ // public static Butene = new MaterialBuild
+ // public static Butadiene = new MaterialBuild
+ // public static RawStyreneButadieneRubber = new MaterialBuild
+ // public static StyreneButadieneRubber = new MaterialBuild
+ // public static Toluene = new MaterialBuild
+ // public static Epichlorohydrin = new MaterialBuild
+ // public static PolyvinylChloride = new MaterialBuild
+ // public static VinylChloride = new MaterialBuild
+ // public static SulfurDioxide = new MaterialBuild
+ // public static SulfurTrioxide = new MaterialBuild
+ // public static NitricAcid = new MaterialBuild
+ // public static Dimethylhydrazine = new MaterialBuild
+ // public static Chloramine = new MaterialBuild
+ // public static Dimethylamine = new MaterialBuild
+ // public static DinitrogenTetroxide = new MaterialBuild
+ // public static NitricOxide = new MaterialBuild
+ // public static Ammonia = new MaterialBuild
+ // public static Dimethyldichlorosilane = new MaterialBuild
+ // public static Chloromethane = new MaterialBuild
+ // public static PhosphorousPentoxide = new MaterialBuild
+ // public static Tetrafluoroethylene = new MaterialBuild
+ // public static HydrofluoricAcid = new MaterialBuild
+ // public static Chloroform = new MaterialBuild
+ // public static BisphenolA = new MaterialBuild
+ // public static AceticAcid = new MaterialBuild
+ // public static CalciumAcetateSolution = new MaterialBuild
+ // public static Acetone = new MaterialBuild
+ // public static Methanol = new MaterialBuild
+ // public static CarbonMonoxide = new MaterialBuild
+ // public static MetalMixture = new MaterialBuild
+ // public static Ethylene = new MaterialBuild
+ // public static Propene = new MaterialBuild
+ // public static VinylAcetate = new MaterialBuild
+ // public static PolyvinylAcetate = new MaterialBuild
+ // public static MethylAcetate = new MaterialBuild
+ // public static AllylChloride = new MaterialBuild
+ // public static HydrochloricAcid = new MaterialBuild
+ // public static HypochlorousAcid = new MaterialBuild
+ // public static SodiumHydroxide = new MaterialBuild
+ // public static Benzene = new MaterialBuild
+ // public static Phenol = new MaterialBuild
+ // public static Cumene = new MaterialBuild
+ // public static PhosphoricAcid = new MaterialBuild
+ // public static SaltWater = new MaterialBuild
+ // public static IronIIIChloride = new MaterialBuild
+ // public static LifeEssence = new MaterialBuild
+ // public static Werkstoff SolderingAlloy = new Werkstoff(Materials.SolderingAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+314);
- // public static Werkstoff GalliumArsenide = new Werkstoff(Materials.GalliumArsenide, <GenerationFeatures>,
+ // public static Werkstoff GalliumArsenide = new Werkstoff(Materials.GalliumArsenide, <GenerationFeatures>,
// <TypeRef>,31_766+980);
- // public static Werkstoff IndiumGalliumPhosphide = new Werkstoff(Materials.IndiumGalliumPhosphide,
+ // public static Werkstoff IndiumGalliumPhosphide = new Werkstoff(Materials.IndiumGalliumPhosphide,
// <GenerationFeatures>, <TypeRef>,31_766+981);
- // public static Werkstoff Spessartine = new Werkstoff(Materials.Spessartine, <GenerationFeatures>,
+ // public static Werkstoff Spessartine = new Werkstoff(Materials.Spessartine, <GenerationFeatures>,
// <TypeRef>,31_766+838);
- // public static Werkstoff Sphalerite = new Werkstoff(Materials.Sphalerite, <GenerationFeatures>,
+ // public static Werkstoff Sphalerite = new Werkstoff(Materials.Sphalerite, <GenerationFeatures>,
// <TypeRef>,31_766+839);
- // public static Werkstoff Stibnite = new Werkstoff(Materials.Stibnite, <GenerationFeatures>,
+ // public static Werkstoff Stibnite = new Werkstoff(Materials.Stibnite, <GenerationFeatures>,
// <TypeRef>,31_766+945);
- // public static Werkstoff SulfuricAcid = new Werkstoff(Materials.SulfuricAcid, <GenerationFeatures>,
+ // public static Werkstoff SulfuricAcid = new Werkstoff(Materials.SulfuricAcid, <GenerationFeatures>,
// <TypeRef>,31_766+720);
- // public static Werkstoff Tanzanite = new Werkstoff(Materials.Tanzanite, <GenerationFeatures>,
+ // public static Werkstoff Tanzanite = new Werkstoff(Materials.Tanzanite, <GenerationFeatures>,
// <TypeRef>,31_766+508);
- // public static Werkstoff Tetrahedrite = new Werkstoff(Materials.Tetrahedrite, <GenerationFeatures>,
+ // public static Werkstoff Tetrahedrite = new Werkstoff(Materials.Tetrahedrite, <GenerationFeatures>,
// <TypeRef>,31_766+840);
- // public static Werkstoff TinAlloy = new Werkstoff(Materials.TinAlloy, <GenerationFeatures>,
+ // public static Werkstoff TinAlloy = new Werkstoff(Materials.TinAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+363);
- // public static Werkstoff Topaz = new Werkstoff(Materials.Topaz, <GenerationFeatures>, <TypeRef>,31_766+507);
- // public static Werkstoff Tungstate = new Werkstoff(Materials.Tungstate, <GenerationFeatures>,
+ // public static Werkstoff Topaz = new Werkstoff(Materials.Topaz, <GenerationFeatures>, <TypeRef>,31_766+507);
+ // public static Werkstoff Tungstate = new Werkstoff(Materials.Tungstate, <GenerationFeatures>,
// <TypeRef>,31_766+841);
- // public static Werkstoff Uraninite = new Werkstoff(Materials.Uraninite, <GenerationFeatures>,
+ // public static Werkstoff Uraninite = new Werkstoff(Materials.Uraninite, <GenerationFeatures>,
// <TypeRef>,31_766+922);
- // public static Werkstoff Uvarovite = new Werkstoff(Materials.Uvarovite, <GenerationFeatures>,
+ // public static Werkstoff Uvarovite = new Werkstoff(Materials.Uvarovite, <GenerationFeatures>,
// <TypeRef>,31_766+842);
- // public static Werkstoff VanadiumGallium = new Werkstoff(Materials.VanadiumGallium, <GenerationFeatures>,
+ // public static Werkstoff VanadiumGallium = new Werkstoff(Materials.VanadiumGallium, <GenerationFeatures>,
// <TypeRef>,31_766+357);
- // public static Werkstoff Wulfenite = new Werkstoff(Materials.Wulfenite, <GenerationFeatures>,
+ // public static Werkstoff Wulfenite = new Werkstoff(Materials.Wulfenite, <GenerationFeatures>,
// <TypeRef>,31_766+882);
- // public static Werkstoff YellowLimonite = new Werkstoff(Materials.YellowLimonite, <GenerationFeatures>,
+ // public static Werkstoff YellowLimonite = new Werkstoff(Materials.YellowLimonite, <GenerationFeatures>,
// <TypeRef>,31_766+931);
- // public static Werkstoff YttriumBariumCuprate = new Werkstoff(Materials.YttriumBariumCuprate,
+ // public static Werkstoff YttriumBariumCuprate = new Werkstoff(Materials.YttriumBariumCuprate,
// <GenerationFeatures>, <TypeRef>,31_766+358);
- // public static Werkstoff LiveRoot = new Werkstoff(Materials.LiveRoot, <GenerationFeatures>,
+ // public static Werkstoff LiveRoot = new Werkstoff(Materials.LiveRoot, <GenerationFeatures>,
// <TypeRef>,31_766+832);
- // public static Werkstoff IronWood = new Werkstoff(Materials.IronWood, <GenerationFeatures>,
+ // public static Werkstoff IronWood = new Werkstoff(Materials.IronWood, <GenerationFeatures>,
// <TypeRef>,31_766+338);
- // public static Werkstoff Glass = new Werkstoff(Materials.Glass, <GenerationFeatures>, <TypeRef>,31_766+890);
- // public static Werkstoff BorosilicateGlass = new Werkstoff(Materials.BorosilicateGlass,
+ // public static Werkstoff Glass = new Werkstoff(Materials.Glass, <GenerationFeatures>, <TypeRef>,31_766+890);
+ // public static Werkstoff BorosilicateGlass = new Werkstoff(Materials.BorosilicateGlass,
// Werkstoff.GenerationFeatures.DISABLED, Werkstoff.Types.COMPOUND, 31_766+611);
- // public static Werkstoff Perlite = new Werkstoff(Materials.Perlite, <GenerationFeatures>,
+ // public static Werkstoff Perlite = new Werkstoff(Materials.Perlite, <GenerationFeatures>,
// <TypeRef>,31_766+925);
- // public static Werkstoff Borax = new Werkstoff(Materials.Borax, <GenerationFeatures>, <TypeRef>,31_766+941);
- // public static Werkstoff Lignite = new Werkstoff(Materials.Lignite, <GenerationFeatures>,
+ // public static Werkstoff Borax = new Werkstoff(Materials.Borax, <GenerationFeatures>, <TypeRef>,31_766+941);
+ // public static Werkstoff Lignite = new Werkstoff(Materials.Lignite, <GenerationFeatures>,
// <TypeRef>,31_766+538);
- // public static Werkstoff Olivine = new Werkstoff(Materials.Olivine, <GenerationFeatures>,
+ // public static Werkstoff Olivine = new Werkstoff(Materials.Olivine, <GenerationFeatures>,
// <TypeRef>,31_766+505);
- // public static Werkstoff Opal = new Werkstoff(Materials.Opal, <GenerationFeatures>, <TypeRef>,31_766+510);
- // public static Werkstoff Amethyst = new Werkstoff(Materials.Amethyst, <GenerationFeatures>,
+ // public static Werkstoff Opal = new Werkstoff(Materials.Opal, <GenerationFeatures>, <TypeRef>,31_766+510);
+ // public static Werkstoff Amethyst = new Werkstoff(Materials.Amethyst, <GenerationFeatures>,
// <TypeRef>,31_766+509);
- // public static Werkstoff Redstone = new Werkstoff(Materials.Redstone, <GenerationFeatures>,
+ // public static Werkstoff Redstone = new Werkstoff(Materials.Redstone, <GenerationFeatures>,
// <TypeRef>,31_766+810);
- // public static Werkstoff Lapis = new Werkstoff(Materials.Lapis, <GenerationFeatures>, <TypeRef>,31_766+526);
- // public static Werkstoff Blaze = new Werkstoff(Materials.Blaze, <GenerationFeatures>, <TypeRef>,31_766+801);
- // public static Werkstoff EnderPearl = new Werkstoff(Materials.EnderPearl, <GenerationFeatures>,
+ // public static Werkstoff Lapis = new Werkstoff(Materials.Lapis, <GenerationFeatures>, <TypeRef>,31_766+526);
+ // public static Werkstoff Blaze = new Werkstoff(Materials.Blaze, <GenerationFeatures>, <TypeRef>,31_766+801);
+ // public static Werkstoff EnderPearl = new Werkstoff(Materials.EnderPearl, <GenerationFeatures>,
// <TypeRef>,31_766+532);
- // public static Werkstoff EnderEye = new Werkstoff(Materials.EnderEye, <GenerationFeatures>,
+ // public static Werkstoff EnderEye = new Werkstoff(Materials.EnderEye, <GenerationFeatures>,
// <TypeRef>,31_766+533);
- // public static Werkstoff Flint = new Werkstoff(Materials.Flint, <GenerationFeatures>, <TypeRef>,31_766+802);
- // public static Werkstoff Diatomite = new Werkstoff(Materials.Diatomite, <GenerationFeatures>,
+ // public static Werkstoff Flint = new Werkstoff(Materials.Flint, <GenerationFeatures>, <TypeRef>,31_766+802);
+ // public static Werkstoff Diatomite = new Werkstoff(Materials.Diatomite, <GenerationFeatures>,
// <TypeRef>,31_766+948);
- // public static Werkstoff VolcanicAsh = new Werkstoff(Materials.VolcanicAsh, <GenerationFeatures>,
+ // public static Werkstoff VolcanicAsh = new Werkstoff(Materials.VolcanicAsh, <GenerationFeatures>,
// <TypeRef>,31_766+940);
- // public static Werkstoff Niter = new Werkstoff(Materials.Niter, <GenerationFeatures>, <TypeRef>,31_766+531);
- // public static Werkstoff Pyrotheum = new Werkstoff(Materials.Pyrotheum, <GenerationFeatures>,
+ // public static Werkstoff Niter = new Werkstoff(Materials.Niter, <GenerationFeatures>, <TypeRef>,31_766+531);
+ // public static Werkstoff Pyrotheum = new Werkstoff(Materials.Pyrotheum, <GenerationFeatures>,
// <TypeRef>,31_766+843);
- // public static Werkstoff Cryotheum = new Werkstoff(Materials.Cryotheum, <GenerationFeatures>,
+ // public static Werkstoff Cryotheum = new Werkstoff(Materials.Cryotheum, <GenerationFeatures>,
// <TypeRef>,31_766+898);
- // public static Werkstoff HydratedCoal = new Werkstoff(Materials.HydratedCoal, <GenerationFeatures>,
+ // public static Werkstoff HydratedCoal = new Werkstoff(Materials.HydratedCoal, <GenerationFeatures>,
// <TypeRef>,31_766+818);
- // public static Werkstoff Apatite = new Werkstoff(Materials.Apatite, <GenerationFeatures>,
+ // public static Werkstoff Apatite = new Werkstoff(Materials.Apatite, <GenerationFeatures>,
// <TypeRef>,31_766+530);
- // public static Werkstoff Alumite = new Werkstoff(Materials.Alumite, <GenerationFeatures>,
+ // public static Werkstoff Alumite = new Werkstoff(Materials.Alumite, <GenerationFeatures>,
// <TypeRef>,31_766+400);
- // public static Werkstoff Manyullyn = new Werkstoff(Materials.Manyullyn, <GenerationFeatures>,
+ // public static Werkstoff Manyullyn = new Werkstoff(Materials.Manyullyn, <GenerationFeatures>,
// <TypeRef>,31_766+386);
- // public static Werkstoff Steeleaf = new Werkstoff(Materials.Steeleaf, <GenerationFeatures>,
+ // public static Werkstoff Steeleaf = new Werkstoff(Materials.Steeleaf, <GenerationFeatures>,
// <TypeRef>,31_766+339);
- // public static Werkstoff Knightmetal = new Werkstoff(Materials.Knightmetal, <GenerationFeatures>,
+ // public static Werkstoff Knightmetal = new Werkstoff(Materials.Knightmetal, <GenerationFeatures>,
// <TypeRef>,31_766+362);
- // public static Werkstoff NitroFuel = new Werkstoff(Materials.NitroFuel, <GenerationFeatures>,
+ // public static Werkstoff NitroFuel = new Werkstoff(Materials.NitroFuel, <GenerationFeatures>,
// <TypeRef>,31_766+709);
- // public static Werkstoff RedAlloy = new Werkstoff(Materials.RedAlloy, <GenerationFeatures>,
+ // public static Werkstoff RedAlloy = new Werkstoff(Materials.RedAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+308);
- // public static Werkstoff CobaltBrass = new Werkstoff(Materials.CobaltBrass, <GenerationFeatures>,
+ // public static Werkstoff CobaltBrass = new Werkstoff(Materials.CobaltBrass, <GenerationFeatures>,
// <TypeRef>,31_766+343);
- // public static Werkstoff TricalciumPhosphate = new Werkstoff(Materials.TricalciumPhosphate,
+ // public static Werkstoff TricalciumPhosphate = new Werkstoff(Materials.TricalciumPhosphate,
// <GenerationFeatures>, <TypeRef>,31_766+534);
- // public static Werkstoff Basalt = new Werkstoff(Materials.Basalt, <GenerationFeatures>, <TypeRef>,31_766+844);
- // public static Werkstoff GarnetRed = new Werkstoff(Materials.GarnetRed, <GenerationFeatures>,
+ // public static Werkstoff Basalt = new Werkstoff(Materials.Basalt, <GenerationFeatures>, <TypeRef>,31_766+844);
+ // public static Werkstoff GarnetRed = new Werkstoff(Materials.GarnetRed, <GenerationFeatures>,
// <TypeRef>,31_766+527);
- // public static Werkstoff GarnetYellow = new Werkstoff(Materials.GarnetYellow, <GenerationFeatures>,
+ // public static Werkstoff GarnetYellow = new Werkstoff(Materials.GarnetYellow, <GenerationFeatures>,
// <TypeRef>,31_766+528);
- // public static Werkstoff Marble = new Werkstoff(Materials.Marble, <GenerationFeatures>, <TypeRef>,31_766+845);
- // public static Werkstoff Sugar = new Werkstoff(Materials.Sugar, <GenerationFeatures>, <TypeRef>,31_766+803);
- // public static Werkstoff Thaumium = new Werkstoff(Materials.Thaumium, <GenerationFeatures>,
+ // public static Werkstoff Marble = new Werkstoff(Materials.Marble, <GenerationFeatures>, <TypeRef>,31_766+845);
+ // public static Werkstoff Sugar = new Werkstoff(Materials.Sugar, <GenerationFeatures>, <TypeRef>,31_766+803);
+ // public static Werkstoff Thaumium = new Werkstoff(Materials.Thaumium, <GenerationFeatures>,
// <TypeRef>,31_766+330);
- // public static Werkstoff Vinteum = new Werkstoff(Materials.Vinteum, <GenerationFeatures>,
+ // public static Werkstoff Vinteum = new Werkstoff(Materials.Vinteum, <GenerationFeatures>,
// <TypeRef>,31_766+529);
- // public static Werkstoff Redrock = new Werkstoff(Materials.Redrock, <GenerationFeatures>,
+ // public static Werkstoff Redrock = new Werkstoff(Materials.Redrock, <GenerationFeatures>,
// <TypeRef>,31_766+846);
- // public static Werkstoff PotassiumFeldspar = new Werkstoff(Materials.PotassiumFeldspar, <GenerationFeatures>,
+ // public static Werkstoff PotassiumFeldspar = new Werkstoff(Materials.PotassiumFeldspar, <GenerationFeatures>,
// <TypeRef>,31_766+847);
- // public static Werkstoff Biotite = new Werkstoff(Materials.Biotite, <GenerationFeatures>,
+ // public static Werkstoff Biotite = new Werkstoff(Materials.Biotite, <GenerationFeatures>,
// <TypeRef>,31_766+848);
- // public static Werkstoff GraniteBlack = new Werkstoff(Materials.GraniteBlack, <GenerationFeatures>,
+ // public static Werkstoff GraniteBlack = new Werkstoff(Materials.GraniteBlack, <GenerationFeatures>,
// <TypeRef>,31_766+849);
- // public static Werkstoff GraniteRed = new Werkstoff(Materials.GraniteRed, <GenerationFeatures>,
+ // public static Werkstoff GraniteRed = new Werkstoff(Materials.GraniteRed, <GenerationFeatures>,
// <TypeRef>,31_766+850);
- // public static Werkstoff Chrysotile = new Werkstoff(Materials.Chrysotile, <GenerationFeatures>,
+ // public static Werkstoff Chrysotile = new Werkstoff(Materials.Chrysotile, <GenerationFeatures>,
// <TypeRef>,31_766+912);
- // public static Werkstoff Realgar = new Werkstoff(Materials.Realgar, <GenerationFeatures>,
+ // public static Werkstoff Realgar = new Werkstoff(Materials.Realgar, <GenerationFeatures>,
// <TypeRef>,31_766+913);
- // public static Werkstoff VanadiumMagnetite = new Werkstoff(Materials.VanadiumMagnetite, <GenerationFeatures>,
+ // public static Werkstoff VanadiumMagnetite = new Werkstoff(Materials.VanadiumMagnetite, <GenerationFeatures>,
// <TypeRef>,31_766+923);
- // public static Werkstoff BasalticMineralSand = new Werkstoff(Materials.BasalticMineralSand,
+ // public static Werkstoff BasalticMineralSand = new Werkstoff(Materials.BasalticMineralSand,
// <GenerationFeatures>, <TypeRef>,31_766+935);
- // public static Werkstoff GraniticMineralSand = new Werkstoff(Materials.GraniticMineralSand,
+ // public static Werkstoff GraniticMineralSand = new Werkstoff(Materials.GraniticMineralSand,
// <GenerationFeatures>, <TypeRef>,31_766+936);
- // public static Werkstoff GarnetSand = new Werkstoff(Materials.GarnetSand, <GenerationFeatures>,
+ // public static Werkstoff GarnetSand = new Werkstoff(Materials.GarnetSand, <GenerationFeatures>,
// <TypeRef>,31_766+938);
- // public static Werkstoff QuartzSand = new Werkstoff(Materials.QuartzSand, <GenerationFeatures>,
+ // public static Werkstoff QuartzSand = new Werkstoff(Materials.QuartzSand, <GenerationFeatures>,
// <TypeRef>,31_766+939);
- // public static Werkstoff Bastnasite = new Werkstoff(Materials.Bastnasite, <GenerationFeatures>,
+ // public static Werkstoff Bastnasite = new Werkstoff(Materials.Bastnasite, <GenerationFeatures>,
// <TypeRef>,31_766+905);
- // public static Werkstoff Pentlandite = new Werkstoff(Materials.Pentlandite, <GenerationFeatures>,
+ // public static Werkstoff Pentlandite = new Werkstoff(Materials.Pentlandite, <GenerationFeatures>,
// <TypeRef>,31_766+909);
- // public static Werkstoff Spodumene = new Werkstoff(Materials.Spodumene, <GenerationFeatures>,
+ // public static Werkstoff Spodumene = new Werkstoff(Materials.Spodumene, <GenerationFeatures>,
// <TypeRef>,31_766+920);
- // public static Werkstoff Pollucite = new Werkstoff(Materials.Pollucite, <GenerationFeatures>,
+ // public static Werkstoff Pollucite = new Werkstoff(Materials.Pollucite, <GenerationFeatures>,
// <TypeRef>,31_766+919);
- // public static Werkstoff Tantalite = new Werkstoff(Materials.Tantalite, <GenerationFeatures>,
+ // public static Werkstoff Tantalite = new Werkstoff(Materials.Tantalite, <GenerationFeatures>,
// <TypeRef>,31_766+921);
- // public static Werkstoff Lepidolite = new Werkstoff(Materials.Lepidolite, <GenerationFeatures>,
+ // public static Werkstoff Lepidolite = new Werkstoff(Materials.Lepidolite, <GenerationFeatures>,
// <TypeRef>,31_766+907);
- // public static Werkstoff Glauconite = new Werkstoff(Materials.Glauconite, <GenerationFeatures>,
+ // public static Werkstoff Glauconite = new Werkstoff(Materials.Glauconite, <GenerationFeatures>,
// <TypeRef>,31_766+933);
- // public static Werkstoff GlauconiteSand = new Werkstoff(Materials.GlauconiteSand, <GenerationFeatures>,
+ // public static Werkstoff GlauconiteSand = new Werkstoff(Materials.GlauconiteSand, <GenerationFeatures>,
// <TypeRef>,31_766+949);
- // public static Werkstoff Vermiculite = new Werkstoff(Materials.Vermiculite, <GenerationFeatures>,
+ // public static Werkstoff Vermiculite = new Werkstoff(Materials.Vermiculite, <GenerationFeatures>,
// <TypeRef>,31_766+932);
- // public static Werkstoff Bentonite = new Werkstoff(Materials.Bentonite, <GenerationFeatures>,
+ // public static Werkstoff Bentonite = new Werkstoff(Materials.Bentonite, <GenerationFeatures>,
// <TypeRef>,31_766+927);
- // public static Werkstoff FullersEarth = new Werkstoff(Materials.FullersEarth, <GenerationFeatures>,
+ // public static Werkstoff FullersEarth = new Werkstoff(Materials.FullersEarth, <GenerationFeatures>,
// <TypeRef>,31_766+928);
- // public static Werkstoff Pitchblende = new Werkstoff(Materials.Pitchblende, <GenerationFeatures>,
+ // public static Werkstoff Pitchblende = new Werkstoff(Materials.Pitchblende, <GenerationFeatures>,
// <TypeRef>,31_766+873);
- // public static Werkstoff Monazite = new Werkstoff(Materials.Monazite, <GenerationFeatures>,
+ // public static Werkstoff Monazite = new Werkstoff(Materials.Monazite, <GenerationFeatures>,
// <TypeRef>,31_766+520);
- // public static Werkstoff Malachite = new Werkstoff(Materials.Malachite, <GenerationFeatures>,
+ // public static Werkstoff Malachite = new Werkstoff(Materials.Malachite, <GenerationFeatures>,
// <TypeRef>,31_766+871);
- // public static Werkstoff Mirabilite = new Werkstoff(Materials.Mirabilite, <GenerationFeatures>,
+ // public static Werkstoff Mirabilite = new Werkstoff(Materials.Mirabilite, <GenerationFeatures>,
// <TypeRef>,31_766+900);
- // public static Werkstoff Mica = new Werkstoff(Materials.Mica, <GenerationFeatures>, <TypeRef>,31_766+901);
- // public static Werkstoff Trona = new Werkstoff(Materials.Trona, <GenerationFeatures>, <TypeRef>,31_766+903);
- // public static Werkstoff Barite = new Werkstoff(Materials.Barite, <GenerationFeatures>, <TypeRef>,31_766+904);
- // public static Werkstoff Gypsum = new Werkstoff(Materials.Gypsum, <GenerationFeatures>, <TypeRef>,31_766+934);
- // public static Werkstoff Alunite = new Werkstoff(Materials.Alunite, <GenerationFeatures>,
+ // public static Werkstoff Mica = new Werkstoff(Materials.Mica, <GenerationFeatures>, <TypeRef>,31_766+901);
+ // public static Werkstoff Trona = new Werkstoff(Materials.Trona, <GenerationFeatures>, <TypeRef>,31_766+903);
+ // public static Werkstoff Barite = new Werkstoff(Materials.Barite, <GenerationFeatures>, <TypeRef>,31_766+904);
+ // public static Werkstoff Gypsum = new Werkstoff(Materials.Gypsum, <GenerationFeatures>, <TypeRef>,31_766+934);
+ // public static Werkstoff Alunite = new Werkstoff(Materials.Alunite, <GenerationFeatures>,
// <TypeRef>,31_766+911);
- // public static Werkstoff Dolomite = new Werkstoff(Materials.Dolomite, <GenerationFeatures>,
+ // public static Werkstoff Dolomite = new Werkstoff(Materials.Dolomite, <GenerationFeatures>,
// <TypeRef>,31_766+914);
- // public static Werkstoff Wollastonite = new Werkstoff(Materials.Wollastonite, <GenerationFeatures>,
+ // public static Werkstoff Wollastonite = new Werkstoff(Materials.Wollastonite, <GenerationFeatures>,
// <TypeRef>,31_766+915);
- // public static Werkstoff Zeolite = new Werkstoff(Materials.Zeolite, <GenerationFeatures>,
+ // public static Werkstoff Zeolite = new Werkstoff(Materials.Zeolite, <GenerationFeatures>,
// <TypeRef>,31_766+916);
- // public static Werkstoff Kyanite = new Werkstoff(Materials.Kyanite, <GenerationFeatures>,
+ // public static Werkstoff Kyanite = new Werkstoff(Materials.Kyanite, <GenerationFeatures>,
// <TypeRef>,31_766+924);
- // public static Werkstoff Kaolinite = new Werkstoff(Materials.Kaolinite, <GenerationFeatures>,
+ // public static Werkstoff Kaolinite = new Werkstoff(Materials.Kaolinite, <GenerationFeatures>,
// <TypeRef>,31_766+929);
- // public static Werkstoff Talc = new Werkstoff(Materials.Talc, <GenerationFeatures>, <TypeRef>,31_766+902);
- // public static Werkstoff Soapstone = new Werkstoff(Materials.Soapstone, <GenerationFeatures>,
+ // public static Werkstoff Talc = new Werkstoff(Materials.Talc, <GenerationFeatures>, <TypeRef>,31_766+902);
+ // public static Werkstoff Soapstone = new Werkstoff(Materials.Soapstone, <GenerationFeatures>,
// <TypeRef>,31_766+877);
- // public static Werkstoff Concrete = new Werkstoff(Materials.Concrete, <GenerationFeatures>,
+ // public static Werkstoff Concrete = new Werkstoff(Materials.Concrete, <GenerationFeatures>,
// <TypeRef>,31_766+947);
- // public static Werkstoff IronMagnetic = new Werkstoff(Materials.IronMagnetic, <GenerationFeatures>,
+ // public static Werkstoff IronMagnetic = new Werkstoff(Materials.IronMagnetic, <GenerationFeatures>,
// <TypeRef>,31_766+354);
- // public static Werkstoff SteelMagnetic = new Werkstoff(Materials.SteelMagnetic, <GenerationFeatures>,
+ // public static Werkstoff SteelMagnetic = new Werkstoff(Materials.SteelMagnetic, <GenerationFeatures>,
// <TypeRef>,31_766+355);
- // public static Werkstoff NeodymiumMagnetic = new Werkstoff(Materials.NeodymiumMagnetic, <GenerationFeatures>,
+ // public static Werkstoff NeodymiumMagnetic = new Werkstoff(Materials.NeodymiumMagnetic, <GenerationFeatures>,
// <TypeRef>,31_766+356);
- // public static Werkstoff SamariumMagnetic = new Werkstoff(Materials.SamariumMagnetic, <GenerationFeatures>,
+ // public static Werkstoff SamariumMagnetic = new Werkstoff(Materials.SamariumMagnetic, <GenerationFeatures>,
// <TypeRef>,31_766+399);
- // public static DilutedSulfuricAcid = new MaterialBuilder(31_766+640)
- // public static Werkstoff EpoxidFiberReinforced = new Werkstoff(Materials.EpoxidFiberReinforced,
+ // public static DilutedSulfuricAcid = new MaterialBuilder(31_766+640)
+ // public static Werkstoff EpoxidFiberReinforced = new Werkstoff(Materials.EpoxidFiberReinforced,
// <GenerationFeatures>, <TypeRef>,31_766+610);
- // public static PotassiumNitrade = new MaterialBuilder(59
- // public static ChromiumTrioxide = new MaterialBuilder(31_766+591)
- // public static Nitrochlorobenzene = new MaterialBuilder(31_766+592)
- // public static Dimethylbenzene = new MaterialBuilder(31_766+593)
- // public static Potassiumdichromate = new MaterialBuilder(594
- // public static PhthalicAcid = new MaterialBuilder(31_766+595)
- // public static Dichlorobenzidine = new MaterialBuilder(31_766+596)
- // public static Diaminobenzidin = new MaterialBuilder(31_766+597)
- // public static Diphenylisophthalate = new MaterialBuilder(59
- // public static Werkstoff Polybenzimidazole = new Werkstoff(Materials.Polybenzimidazole, <GenerationFeatures>,
- // <TypeRef>, 31_766+599);
- // public static NitrousOxide = new MaterialBuilder(31_766+993)
- // public static AntiKnock = new MaterialBuilder(31_766+994)
- // public static Octane = new MaterialBuilder(31_766+995)
- // public static GasolineRaw = new MaterialBuilder(31_766+996)
- // public static GasolineRegular = new MaterialBuilder(31_766+997)
- // public static GasolinePremium = new MaterialBuilder(31_766+998)
- // public static Werkstoff Electrotine = new Werkstoff(Materials.Electrotine, <GenerationFeatures>,
+ // public static PotassiumNitrade = new MaterialBuilder(59
+ // public static ChromiumTrioxide = new MaterialBuilder(31_766+591)
+ // public static Nitrochlorobenzene = new MaterialBuilder(31_766+592)
+ // public static Dimethylbenzene = new MaterialBuilder(31_766+593)
+ // public static Potassiumdichromate = new MaterialBuilder(594
+ // public static PhthalicAcid = new MaterialBuilder(31_766+595)
+ // public static Dichlorobenzidine = new MaterialBuilder(31_766+596)
+ // public static Diaminobenzidin = new MaterialBuilder(31_766+597)
+ // public static Diphenylisophthalate = new MaterialBuilder(59
+ // public static Werkstoff Polybenzimidazole = new Werkstoff(Materials.Polybenzimidazole, <GenerationFeatures>,
+ // <TypeRef>, 31_766+599);
+ // public static NitrousOxide = new MaterialBuilder(31_766+993)
+ // public static AntiKnock = new MaterialBuilder(31_766+994)
+ // public static Octane = new MaterialBuilder(31_766+995)
+ // public static GasolineRaw = new MaterialBuilder(31_766+996)
+ // public static GasolineRegular = new MaterialBuilder(31_766+997)
+ // public static GasolinePremium = new MaterialBuilder(31_766+998)
+ // public static Werkstoff Electrotine = new Werkstoff(Materials.Electrotine, <GenerationFeatures>,
// <TypeRef>,31_766+812);
- // public static Galgadorian = new Werkstoff(Materials.Galgadorian, <GenerationFeatures>, <TypeRef>,31_766+384);
- // public static Werkstoff EnhancedGalgadorian = new Werkstoff(Materials.EnhancedGalgadorian,
+ // public static Galgadorian = new Werkstoff(Materials.Galgadorian, <GenerationFeatures>, <TypeRef>,31_766+384);
+ // public static Werkstoff EnhancedGalgadorian = new Werkstoff(Materials.EnhancedGalgadorian,
// <GenerationFeatures>, <TypeRef>,31_766+385);
- // public static Werkstoff BloodInfusedIron = new Werkstoff(Materials.BloodInfusedIron, <GenerationFeatures>,
+ // public static Werkstoff BloodInfusedIron = new Werkstoff(Materials.BloodInfusedIron, <GenerationFeatures>,
// <TypeRef>,31_766+977);
- // public static Werkstoff Shadow = new Werkstoff(Materials.Shadow, <GenerationFeatures>, <TypeRef>,31_766+368);
- // public static Werkstoff Ledox = new Werkstoff(Materials.Ledox, <GenerationFeatures>, <TypeRef>,31_766+390);
- // public static Werkstoff Quantium = new Werkstoff(Materials.Quantium, <GenerationFeatures>,
+ // public static Werkstoff Shadow = new Werkstoff(Materials.Shadow, <GenerationFeatures>, <TypeRef>,31_766+368);
+ // public static Werkstoff Ledox = new Werkstoff(Materials.Ledox, <GenerationFeatures>, <TypeRef>,31_766+390);
+ // public static Werkstoff Quantium = new Werkstoff(Materials.Quantium, <GenerationFeatures>,
// <TypeRef>,31_766+391);
- // public static Werkstoff Mytryl = new Werkstoff(Materials.Mytryl, <GenerationFeatures>, <TypeRef>,31_766+387);
- // public static Werkstoff BlackPlutonium = new Werkstoff(Materials.BlackPlutonium, <GenerationFeatures>,
+ // public static Werkstoff Mytryl = new Werkstoff(Materials.Mytryl, <GenerationFeatures>, <TypeRef>,31_766+387);
+ // public static Werkstoff BlackPlutonium = new Werkstoff(Materials.BlackPlutonium, <GenerationFeatures>,
// <TypeRef>,31_766+388);
- // public static Werkstoff CallistoIce = new Werkstoff(Materials.CallistoIce, <GenerationFeatures>,
+ // public static Werkstoff CallistoIce = new Werkstoff(Materials.CallistoIce, <GenerationFeatures>,
// <TypeRef>,31_766+389);
- // public static Werkstoff Duralumin = new Werkstoff(Materials.Duralumin, <GenerationFeatures>,
+ // public static Werkstoff Duralumin = new Werkstoff(Materials.Duralumin, <GenerationFeatures>,
// <TypeRef>,31_766+392);
- // public static Werkstoff Oriharukon = new Werkstoff(Materials.Oriharukon, <GenerationFeatures>,
+ // public static Werkstoff Oriharukon = new Werkstoff(Materials.Oriharukon, <GenerationFeatures>,
// <TypeRef>,31_766+393);
- // public static Werkstoff MysteriousCrystal = new Werkstoff(Materials.MysteriousCrystal, <GenerationFeatures>,
+ // public static Werkstoff MysteriousCrystal = new Werkstoff(Materials.MysteriousCrystal, <GenerationFeatures>,
// <TypeRef>,31_766+398);
- // public static Werkstoff RedstoneAlloy = new Werkstoff(Materials.RedstoneAlloy, <GenerationFeatures>,
+ // public static Werkstoff RedstoneAlloy = new Werkstoff(Materials.RedstoneAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+381);
- // public static Werkstoff Soularium = new Werkstoff(Materials.Soularium, <GenerationFeatures>,
+ // public static Werkstoff Soularium = new Werkstoff(Materials.Soularium, <GenerationFeatures>,
// <TypeRef>,31_766+379);
- // public static Werkstoff ConductiveIron = new Werkstoff(Materials.ConductiveIron, <GenerationFeatures>,
+ // public static Werkstoff ConductiveIron = new Werkstoff(Materials.ConductiveIron, <GenerationFeatures>,
// <TypeRef>,31_766+369);
- // public static Werkstoff ElectricalSteel = new Werkstoff(Materials.ElectricalSteel, <GenerationFeatures>,
+ // public static Werkstoff ElectricalSteel = new Werkstoff(Materials.ElectricalSteel, <GenerationFeatures>,
// <TypeRef>,31_766+365);
- // public static Werkstoff EnergeticAlloy = new Werkstoff(Materials.EnergeticAlloy, <GenerationFeatures>,
+ // public static Werkstoff EnergeticAlloy = new Werkstoff(Materials.EnergeticAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+366);
- // public static Werkstoff VibrantAlloy = new Werkstoff(Materials.VibrantAlloy, <GenerationFeatures>,
+ // public static Werkstoff VibrantAlloy = new Werkstoff(Materials.VibrantAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+367);
- // public static Werkstoff PulsatingIron = new Werkstoff(Materials.PulsatingIron, <GenerationFeatures>,
+ // public static Werkstoff PulsatingIron = new Werkstoff(Materials.PulsatingIron, <GenerationFeatures>,
// <TypeRef>,31_766+378);
- // public static Werkstoff DarkSteel = new Werkstoff(Materials.DarkSteel, <GenerationFeatures>,
+ // public static Werkstoff DarkSteel = new Werkstoff(Materials.DarkSteel, <GenerationFeatures>,
// <TypeRef>,31_766+364);
- // public static Werkstoff EndSteel = new Werkstoff(Materials.EndSteel, <GenerationFeatures>,
+ // public static Werkstoff EndSteel = new Werkstoff(Materials.EndSteel, <GenerationFeatures>,
// <TypeRef>,31_766+401);
- // public static Werkstoff CrudeSteel = new Werkstoff(Materials.CrudeSteel, <GenerationFeatures>,
+ // public static Werkstoff CrudeSteel = new Werkstoff(Materials.CrudeSteel, <GenerationFeatures>,
// <TypeRef>,31_766+402);
- // public static Werkstoff CrystallineAlloy = new Werkstoff(Materials.CrystallineAlloy, <GenerationFeatures>,
+ // public static Werkstoff CrystallineAlloy = new Werkstoff(Materials.CrystallineAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+403);
- // public static Werkstoff MelodicAlloy = new Werkstoff(Materials.MelodicAlloy, <GenerationFeatures>,
+ // public static Werkstoff MelodicAlloy = new Werkstoff(Materials.MelodicAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+404);
- // public static Werkstoff StellarAlloy = new Werkstoff(Materials.StellarAlloy, <GenerationFeatures>,
+ // public static Werkstoff StellarAlloy = new Werkstoff(Materials.StellarAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+405);
- // public static Werkstoff CrystallinePinkSlime = new Werkstoff(Materials.CrystallinePinkSlime,
+ // public static Werkstoff CrystallinePinkSlime = new Werkstoff(Materials.CrystallinePinkSlime,
// <GenerationFeatures>, <TypeRef>,31_766+406);
- // public static Werkstoff EnergeticSilver = new Werkstoff(Materials.EnergeticSilver, <GenerationFeatures>,
+ // public static Werkstoff EnergeticSilver = new Werkstoff(Materials.EnergeticSilver, <GenerationFeatures>,
// <TypeRef>,31_766+407);
- // public static Werkstoff VividAlloy = new Werkstoff(Materials.VividAlloy, <GenerationFeatures>,
+ // public static Werkstoff VividAlloy = new Werkstoff(Materials.VividAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+408);
- // public static Werkstoff Enderium = new Werkstoff(Materials.Enderium, <GenerationFeatures>,
+ // public static Werkstoff Enderium = new Werkstoff(Materials.Enderium, <GenerationFeatures>,
// <TypeRef>,31_766+321);
- // public static Werkstoff Mithril = new Werkstoff(Materials.Mithril, <GenerationFeatures>,
+ // public static Werkstoff Mithril = new Werkstoff(Materials.Mithril, <GenerationFeatures>,
// <TypeRef>,31_766+331);
- // public static Werkstoff BlueAlloy = new Werkstoff(Materials.BlueAlloy, <GenerationFeatures>,
+ // public static Werkstoff BlueAlloy = new Werkstoff(Materials.BlueAlloy, <GenerationFeatures>,
// <TypeRef>,31_766+309);
- // public static Werkstoff ShadowIron = new Werkstoff(Materials.ShadowIron, <GenerationFeatures>,
+ // public static Werkstoff ShadowIron = new Werkstoff(Materials.ShadowIron, <GenerationFeatures>,
// <TypeRef>,31_766+336);
- // public static Werkstoff ShadowSteel = new Werkstoff(Materials.ShadowSteel, <GenerationFeatures>,
+ // public static Werkstoff ShadowSteel = new Werkstoff(Materials.ShadowSteel, <GenerationFeatures>,
// <TypeRef>,31_766+337);
- // public static Werkstoff AstralSilver = new Werkstoff(Materials.AstralSilver, <GenerationFeatures>,
+ // public static Werkstoff AstralSilver = new Werkstoff(Materials.AstralSilver, <GenerationFeatures>,
// <TypeRef>,31_766+333);
- // public static Werkstoff InfinityCatalyst = new Werkstoff(Materials.InfinityCatalyst, <GenerationFeatures>,
+ // public static Werkstoff InfinityCatalyst = new Werkstoff(Materials.InfinityCatalyst, <GenerationFeatures>,
// <TypeRef>, 31_766 + 394);
- // public static Werkstoff Infinity = new Werkstoff(Materials.Infinity, <GenerationFeatures>, <TypeRef>, 31_766 +
+ // public static Werkstoff Infinity = new Werkstoff(Materials.Infinity, <GenerationFeatures>, <TypeRef>, 31_766 +
// 397);
- // public static Werkstoff Bedrockium = new Werkstoff(Materials.Bedrockium, <GenerationFeatures>, <TypeRef>,
+ // public static Werkstoff Bedrockium = new Werkstoff(Materials.Bedrockium, <GenerationFeatures>, <TypeRef>,
// 31_766 + 395);
- // public static Werkstoff Trinium = new Werkstoff(Materials.Trinium, <GenerationFeatures>, <TypeRef>, 31_766 +
+ // public static Werkstoff Trinium = new Werkstoff(Materials.Trinium, <GenerationFeatures>, <TypeRef>, 31_766 +
// 868);
- // public static Werkstoff Ichorium = new Werkstoff(Materials.Ichorium, <GenerationFeatures>, <TypeRef>, 31_766 +
+ // public static Werkstoff Ichorium = new Werkstoff(Materials.Ichorium, <GenerationFeatures>, <TypeRef>, 31_766 +
// 978);
- // public static Werkstoff CosmicNeutronium = new Werkstoff(Materials.CosmicNeutronium, <GenerationFeatures>,
+ // public static Werkstoff CosmicNeutronium = new Werkstoff(Materials.CosmicNeutronium, <GenerationFeatures>,
// <TypeRef>, 31_766 + 982);
- // public static Werkstoff Pentacadmiummagnesiumhexaoxid = new Werkstoff(Materials.Pentacadmiummagnesiumhexaoxid,
+ // public static Werkstoff Pentacadmiummagnesiumhexaoxid = new Werkstoff(Materials.Pentacadmiummagnesiumhexaoxid,
// <GenerationFeatures>, <TypeRef>, 31_766 + 987);
- // public static Werkstoff Titaniumonabariumdecacoppereikosaoxid = new
+ // public static Werkstoff Titaniumonabariumdecacoppereikosaoxid = new
// Werkstoff(Materials.Titaniumonabariumdecacoppereikosaoxid, <GenerationFeatures>, <TypeRef>, 31_766 + 988);
- // public static Werkstoff Uraniumtriplatinid = new Werkstoff(Materials.Uraniumtriplatinid, <GenerationFeatures>,
+ // public static Werkstoff Uraniumtriplatinid = new Werkstoff(Materials.Uraniumtriplatinid, <GenerationFeatures>,
// <TypeRef>, 31_766 + 989);
- // public static Werkstoff Vanadiumtriindinid = new Werkstoff(Materials.Vanadiumtriindinid, <GenerationFeatures>,
+ // public static Werkstoff Vanadiumtriindinid = new Werkstoff(Materials.Vanadiumtriindinid, <GenerationFeatures>,
// <TypeRef>, 31_766 + 990);
- // public static Werkstoff Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid = new
+ // public static Werkstoff Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid = new
// Werkstoff(Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, <GenerationFeatures>, <TypeRef>,
// 31_766 + 991);
- // public static Werkstoff Tetranaquadahdiindiumhexaplatiumosminid = new
+ // public static Werkstoff Tetranaquadahdiindiumhexaplatiumosminid = new
// Werkstoff(Materials.Tetranaquadahdiindiumhexaplatiumosminid, <GenerationFeatures>, <TypeRef>, 31_766 + 992);
- // public static Werkstoff Longasssuperconductornameforuvwire = new
+ // public static Werkstoff Longasssuperconductornameforuvwire = new
// Werkstoff(Materials.Longasssuperconductornameforuvwire, <GenerationFeatures>, <TypeRef>, 31_766 + 986);
- // public static Werkstoff Longasssuperconductornameforuhvwire = new
+ // public static Werkstoff Longasssuperconductornameforuhvwire = new
// Werkstoff(Materials.Longasssuperconductornameforuhvwire, <GenerationFeatures>, <TypeRef>, 31_766 + 985);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java
index d0c177e8f3..651bf98047 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java
@@ -1,59 +1,44 @@
/*
- * 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.system.material;
import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.werkstoffHashMap;
-import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Utility;
+
public class BW_MetaGeneratedBlock_Item extends BW_ItemBlocks {
public BW_MetaGeneratedBlock_Item(Block par1) {
super(par1);
}
- public boolean onItemUseFirst(
- ItemStack stack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float hitX,
- float hitY,
- float hitZ) {
+ public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float hitX, float hitY, float hitZ) {
return false;
}
@@ -68,8 +53,8 @@ public class BW_MetaGeneratedBlock_Item extends BW_ItemBlocks {
int aMetaData = aStack.getItemDamage();
Werkstoff werkstoff = werkstoffHashMap.get((short) aMetaData);
if (werkstoff == null) werkstoff = Werkstoff.default_null_Werkstoff;
- return ((BW_MetaGenerated_Blocks) block)
- .blockTypeLocalizedName.replace("%material", werkstoff.getLocalizedName());
+ return ((BW_MetaGenerated_Blocks) block).blockTypeLocalizedName
+ .replace("%material", werkstoff.getLocalizedName());
}
}
return GT_LanguageManager.getTranslation(getUnlocalizedName(aStack) + ".name");
@@ -103,18 +88,8 @@ public class BW_MetaGeneratedBlock_Item extends BW_ItemBlocks {
}
}
- public boolean placeBlockAt(
- ItemStack aStack,
- EntityPlayer aPlayer,
- World aWorld,
- int aX,
- int aY,
- int aZ,
- int side,
- float hitX,
- float hitY,
- float hitZ,
- int aMeta) {
+ public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side,
+ float hitX, float hitY, float hitZ, int aMeta) {
short tDamage = (short) this.getDamage(aStack);
if (tDamage > 0) {
if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java
index 6893bb3ae5..aca8dfe63f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java
@@ -1,33 +1,21 @@
/*
- * 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.system.material;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.OrePrefixes;
import java.util.List;
import java.util.Optional;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -38,11 +26,16 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.OrePrefixes;
+
public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks
implements com.gtnewhorizon.structurelib.structure.ICustomBlockSetting {
- public BW_MetaGeneratedBlocks_Casing(
- Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName, OrePrefixes prefixes) {
+ public BW_MetaGeneratedBlocks_Casing(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName,
+ OrePrefixes prefixes) {
super(p_i45386_1_, tileEntity, blockName, prefixes);
}
@@ -100,15 +93,15 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks
@SuppressWarnings("unchecked")
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
Werkstoff.werkstoffHashSet.stream()
- .filter(pMaterial -> pMaterial.getType().equals(Werkstoff.Types.BIOLOGICAL)
+ .filter(
+ pMaterial -> pMaterial.getType().equals(Werkstoff.Types.BIOLOGICAL)
&& pMaterial.hasGenerationFeature(WerkstoffLoader.blockCasing)
- || pMaterial.doesOreDictedItemExists(OrePrefixes.plate)
- && pMaterial.doesOreDictedItemExists(OrePrefixes.screw)
- && pMaterial.doesOreDictedItemExists(OrePrefixes.plateDouble)
- && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGt)
- && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGtSmall))
- .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID()))
- .forEach(aList::add);
+ || pMaterial.doesOreDictedItemExists(OrePrefixes.plate)
+ && pMaterial.doesOreDictedItemExists(OrePrefixes.screw)
+ && pMaterial.doesOreDictedItemExists(OrePrefixes.plateDouble)
+ && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGt)
+ && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGtSmall))
+ .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())).forEach(aList::add);
}
/**
@@ -119,11 +112,8 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks
try {
Thread.sleep(1);
// Fucking Minecraft TE settings.
- } catch (InterruptedException ignored) {
- }
- Optional.ofNullable(world.getTileEntity(x, y, z))
- .filter(te -> te instanceof BW_MetaGenerated_Block_TE)
- .map(te -> (BW_MetaGenerated_Block_TE) te)
- .ifPresent(te -> te.mMetaData = (short) meta);
+ } catch (InterruptedException ignored) {}
+ Optional.ofNullable(world.getTileEntity(x, y, z)).filter(te -> te instanceof BW_MetaGenerated_Block_TE)
+ .map(te -> (BW_MetaGenerated_Block_TE) te).ifPresent(te -> te.mMetaData = (short) meta);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java
index 4a1e088679..3c64631373 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.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.system.material;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
public class BW_MetaGeneratedBlocks_CasingAdvanced_TE extends BW_MetaGenerated_Block_TE {
@@ -45,16 +38,13 @@ public class BW_MetaGeneratedBlocks_CasingAdvanced_TE extends BW_MetaGenerated_B
if ((aMaterial != null)) {
TextureSet set = aMaterial.getTexSet();
ITexture aIconSet = TextureFactory.of(
- PrefixTextureLinker.texMapBlocks
- .get(WerkstoffLoader.blockCasingAdvanced)
+ PrefixTextureLinker.texMapBlocks.get(WerkstoffLoader.blockCasingAdvanced)
.getOrDefault(set, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]),
aMaterial.getRGBA());
- return new ITexture[] {TextureFactory.of(Blocks.iron_block), aIconSet};
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block), aIconSet };
}
}
- return new ITexture[] {
- TextureFactory.of(Blocks.iron_block),
- TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])
- };
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java
index 9c06ed7f25..f52767969e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.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.system.material;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
public class BW_MetaGeneratedBlocks_Casing_TE extends BW_MetaGenerated_Block_TE {
@@ -45,16 +38,13 @@ public class BW_MetaGeneratedBlocks_Casing_TE extends BW_MetaGenerated_Block_TE
if ((aMaterial != null)) {
TextureSet set = aMaterial.getTexSet();
ITexture aIconSet = TextureFactory.of(
- PrefixTextureLinker.texMapBlocks
- .get(WerkstoffLoader.blockCasing)
+ PrefixTextureLinker.texMapBlocks.get(WerkstoffLoader.blockCasing)
.getOrDefault(set, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]),
aMaterial.getRGBA());
- return new ITexture[] {TextureFactory.of(Blocks.iron_block), aIconSet};
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block), aIconSet };
}
}
- return new ITexture[] {
- TextureFactory.of(Blocks.iron_block),
- TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])
- };
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java
index 789a802d20..4f43533cff 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java
@@ -1,29 +1,23 @@
/*
- * 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.system.material;
import static gregtech.api.enums.GT_Values.RA;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.OrePrefixes;
@@ -35,8 +29,6 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_ModHandler.RecipeBits;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class BW_MetaGeneratedFrames extends MetaPipeEntity {
@@ -50,7 +42,7 @@ public class BW_MetaGeneratedFrames extends MetaPipeEntity {
GT_ModHandler.addCraftingRecipe(
getStackForm(2),
RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {"SSS", "SwS", "SSS", 'S', mMaterial.get(OrePrefixes.stick)});
+ new Object[] { "SSS", "SwS", "SSS", 'S', mMaterial.get(OrePrefixes.stick) });
RA.addAssemblerRecipe(
GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.getVarName(), 4),
ItemList.Circuit_Integrated.getWithDamage(0, 4),
@@ -75,23 +67,16 @@ public class BW_MetaGeneratedFrames extends MetaPipeEntity {
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aConnections,
- byte aColorIndex,
- boolean aConnected,
- boolean aRedstone) {
- return new ITexture[] {
- TextureFactory.of(
- this.mMaterial.getTexSet().mTextures[OrePrefixes.frameGt.mTextureIndex],
- Dyes.getModulation(aColorIndex, this.mMaterial.getRGBA()))
- };
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections,
+ byte aColorIndex, boolean aConnected, boolean aRedstone) {
+ return new ITexture[] { TextureFactory.of(
+ this.mMaterial.getTexSet().mTextures[OrePrefixes.frameGt.mTextureIndex],
+ Dyes.getModulation(aColorIndex, this.mMaterial.getRGBA())) };
}
@Override
public String[] getDescription() {
- return new String[] {"Just something you can put a Cover or CFoam on."};
+ return new String[] { "Just something you can put a Cover or CFoam on." };
}
@Override
@@ -121,23 +106,23 @@ public class BW_MetaGeneratedFrames extends MetaPipeEntity {
@Override
public final void saveNBTData(NBTTagCompound aNBT) {
- /*Do nothing*/
+ /* Do nothing */
}
@Override
public final void loadNBTData(NBTTagCompound aNBT) {
- /*Do nothing*/
+ /* Do nothing */
}
@Override
- public final boolean allowPutStack(
- IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide,
+ ItemStack aStack) {
return false;
}
@Override
- public final boolean allowPullStack(
- IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide,
+ ItemStack aStack) {
return false;
}
@@ -146,6 +131,6 @@ public class BW_MetaGeneratedFrames extends MetaPipeEntity {
}
public void disconnect(byte aSide) {
- /* Do nothing*/
+ /* Do nothing */
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java
index a32db89a1c..150578965b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java
@@ -1,32 +1,24 @@
/*
- * 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.system.material;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
public class BW_MetaGeneratedOreTE extends BW_MetaGenerated_Block_TE {
@@ -34,14 +26,12 @@ public class BW_MetaGeneratedOreTE extends BW_MetaGenerated_Block_TE {
public ITexture[] getTexture(Block aBlock, byte aSide) {
Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
if ((aMaterial != null)) {
- ITexture aIconSet = TextureFactory.of(
- aMaterial.getTexSet().mTextures[OrePrefixes.ore.mTextureIndex], aMaterial.getRGBA());
- return new ITexture[] {TextureFactory.of(Blocks.stone), aIconSet};
+ ITexture aIconSet = TextureFactory
+ .of(aMaterial.getTexSet().mTextures[OrePrefixes.ore.mTextureIndex], aMaterial.getRGBA());
+ return new ITexture[] { TextureFactory.of(Blocks.stone), aIconSet };
}
- return new ITexture[] {
- TextureFactory.of(Blocks.stone),
- TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])
- };
+ return new ITexture[] { TextureFactory.of(Blocks.stone),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java
index fd73fde587..8ffd1ef475 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java
@@ -1,27 +1,25 @@
/*
- * 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.system.material;
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
@@ -29,11 +27,6 @@ import gregtech.api.objects.XSTR;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
@@ -46,14 +39,20 @@ public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
ArrayList<ItemStack> tSelector = new ArrayList<>();
ItemStack tStack = GT_OreDictUnificator.get(
- OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ OrePrefixes.gemExquisite,
+ aMaterial,
+ GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L),
+ 1L);
if (tStack != null) {
for (int i = 0; i < 1; i++) {
tSelector.add(tStack);
}
}
tStack = GT_OreDictUnificator.get(
- OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ OrePrefixes.gemFlawless,
+ aMaterial,
+ GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L),
+ 1L);
if (tStack != null) {
for (int i = 0; i < 2; i++) {
tSelector.add(tStack);
@@ -66,7 +65,10 @@ public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
}
}
tStack = GT_OreDictUnificator.get(
- OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L);
+ OrePrefixes.gemFlawed,
+ aMaterial,
+ GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L),
+ 1L);
if (tStack != null) {
for (int i = 0; i < 5; i++) {
tSelector.add(tStack);
@@ -102,8 +104,11 @@ public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
}
}
if (tRandom.nextInt(3 + aFortune) > 1) {
- rList.add(GT_OreDictUnificator.get(
- tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L));
+ rList.add(
+ GT_OreDictUnificator.get(
+ tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust,
+ Materials.Stone,
+ 1L));
}
}
return rList;
@@ -113,14 +118,12 @@ public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
public ITexture[] getTexture(Block aBlock, byte aSide) {
Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
if ((aMaterial != null)) {
- ITexture aIconSet = TextureFactory.of(
- aMaterial.getTexSet().mTextures[OrePrefixes.oreSmall.mTextureIndex], aMaterial.getRGBA());
- return new ITexture[] {TextureFactory.of(Blocks.stone), aIconSet};
+ ITexture aIconSet = TextureFactory
+ .of(aMaterial.getTexSet().mTextures[OrePrefixes.oreSmall.mTextureIndex], aMaterial.getRGBA());
+ return new ITexture[] { TextureFactory.of(Blocks.stone), aIconSet };
}
- return new ITexture[] {
- TextureFactory.of(Blocks.stone),
- TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.oreSmall.mTextureIndex])
- };
+ return new ITexture[] { TextureFactory.of(Blocks.stone), TextureFactory
+ .of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.oreSmall.mTextureIndex]) };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java
index d3ba33be2f..65aa1bde00 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java
@@ -1,32 +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.system.material;
import static com.github.bartimaeusnek.bartworks.MainMod.BW_Network_instance;
-import com.github.bartimaeusnek.bartworks.common.net.MetaBlockPacket;
-import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
import java.util.ArrayList;
+
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -34,6 +24,9 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
+import com.github.bartimaeusnek.bartworks.common.net.MetaBlockPacket;
+import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
+
public abstract class BW_MetaGenerated_Block_TE extends TileEntity implements ITexturedTileEntity {
public short mMetaData;
@@ -54,12 +47,11 @@ public abstract class BW_MetaGenerated_Block_TE extends TileEntity implements IT
@Override
public Packet getDescriptionPacket() {
- if (!this.worldObj.isRemote)
- BW_Network_instance.sendPacketToAllPlayersInRange(
- this.worldObj,
- new MetaBlockPacket(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData),
- this.xCoord,
- this.zCoord);
+ if (!this.worldObj.isRemote) BW_Network_instance.sendPacketToAllPlayersInRange(
+ this.worldObj,
+ new MetaBlockPacket(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData),
+ this.xCoord,
+ this.zCoord);
return null;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java
index 0defff39f6..ad850c2c5f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java
@@ -1,37 +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.system.material;
import static com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Items.metaTab;
-import com.github.bartimaeusnek.bartworks.client.renderer.BW_Renderer_Block_Ores;
-import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
-import com.github.bartimaeusnek.bartworks.util.BW_Util;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
import java.util.ArrayList;
+
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
@@ -39,6 +24,15 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.client.renderer.BW_Renderer_Block_Ores;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_LanguageManager;
+
public abstract class BW_MetaGenerated_Blocks extends BW_TileEntityContainer {
public static ThreadLocal<BW_MetaGenerated_Block_TE> mTemporaryTileEntity = new ThreadLocal<>();
@@ -49,8 +43,8 @@ public abstract class BW_MetaGenerated_Blocks extends BW_TileEntityContainer {
this(p_i45386_1_, tileEntity, blockName, null);
}
- public BW_MetaGenerated_Blocks(
- Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName, OrePrefixes types) {
+ public BW_MetaGenerated_Blocks(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName,
+ OrePrefixes types) {
super(p_i45386_1_, tileEntity, blockName);
this.setHardness(5.0F);
this.setResistance(5.0F);
@@ -125,8 +119,6 @@ public abstract class BW_MetaGenerated_Blocks extends BW_TileEntityContainer {
if ((tTileEntity instanceof BW_MetaGenerated_Block_TE)) {
return ((BW_MetaGenerated_Block_TE) tTileEntity).getDrops(aFortune);
}
- return mTemporaryTileEntity.get() == null
- ? new ArrayList<>()
- : mTemporaryTileEntity.get().getDrops(aFortune);
+ return mTemporaryTileEntity.get() == null ? new ArrayList<>() : mTemporaryTileEntity.get().getDrops(aFortune);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java
index b75edf88a0..30f1a6813f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material;
@@ -25,21 +16,8 @@ package com.github.bartimaeusnek.bartworks.system.material;
import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.werkstoffHashMap;
import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.werkstoffHashSet;
-import com.github.bartimaeusnek.bartworks.API.IRadMaterial;
-import com.github.bartimaeusnek.bartworks.API.SideReference;
-import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
-import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Item;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import ic2.core.IC2Potion;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@@ -55,6 +33,22 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.API.IRadMaterial;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Item;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import ic2.core.IC2Potion;
+
public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRadMaterial {
public static final CreativeTabs metaTab = new CreativeTabs("bartworksMetaMaterials") {
@@ -91,8 +85,7 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa
}
public boolean onEntityItemUpdate(EntityItem aItemEntity) {
- if (this.orePrefixes == OrePrefixes.dustImpure
- || this.orePrefixes == OrePrefixes.dustPure
+ if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure
|| this.orePrefixes == OrePrefixes.crushed) {
int aDamage = aItemEntity.getEntityItem().getItemDamage();
if ((aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) {
@@ -105,15 +98,21 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa
byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
if ((this.orePrefixes == OrePrefixes.dustImpure) || (this.orePrefixes == OrePrefixes.dustPure)) {
if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
- aItemEntity.setEntityItemStack(WerkstoffLoader.getCorrespondingItemStack(
- OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize));
+ aItemEntity.setEntityItemStack(
+ WerkstoffLoader.getCorrespondingItemStack(
+ OrePrefixes.dust,
+ aMaterial,
+ aItemEntity.getEntityItem().stackSize));
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true;
}
} else {
if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
- aItemEntity.setEntityItemStack(WerkstoffLoader.getCorrespondingItemStack(
- OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize));
+ aItemEntity.setEntityItemStack(
+ WerkstoffLoader.getCorrespondingItemStack(
+ OrePrefixes.crushedPurified,
+ aMaterial,
+ aItemEntity.getEntityItem().stackSize));
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true;
}
@@ -127,17 +126,16 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa
@Override
@SuppressWarnings("unchecked")
protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
- // String tooltip = GT_LanguageManager.getTranslation(this.getUnlocalizedName(aStack) + ".tooltip");
- // if (!tooltip.isEmpty())
- // aList.add(tooltip);
+ // String tooltip = GT_LanguageManager.getTranslation(this.getUnlocalizedName(aStack) + ".tooltip");
+ // if (!tooltip.isEmpty())
+ // aList.add(tooltip);
if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure) {
aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.purify"));
}
if (this.orePrefixes == OrePrefixes.crushed)
aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.purify.2"));
- if (aStack != null
- && aStack.getItem() instanceof BW_MetaGenerated_Items
+ if (aStack != null && aStack.getItem() instanceof BW_MetaGenerated_Items
&& aStack.getItemDamage() == WerkstoffLoader.Tiberium.getmID())
aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.nqgen"));
@@ -175,10 +173,8 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa
}
protected IIconContainer getIconContainerBartWorks(int aMetaData) {
- if (SideReference.Side.Client)
- return PrefixTextureLinker.texMap
- .get(this.orePrefixes)
- .get(werkstoffHashMap.get((short) aMetaData).getTexSet());
+ if (SideReference.Side.Client) return PrefixTextureLinker.texMap.get(this.orePrefixes)
+ .get(werkstoffHashMap.get((short) aMetaData).getTexSet());
return null;
}
@@ -259,21 +255,15 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa
@Override
public int getCapacity(ItemStack aStack) {
- return this.orePrefixes == OrePrefixes.capsule
- || this.orePrefixes == OrePrefixes.cell
- || this.orePrefixes == OrePrefixes.cellPlasma
- ? 1000
- : this.orePrefixes == WerkstoffLoader.cellMolten || this.orePrefixes == WerkstoffLoader.capsuleMolten
- ? 144
- : 0;
+ return this.orePrefixes == OrePrefixes.capsule || this.orePrefixes == OrePrefixes.cell
+ || this.orePrefixes == OrePrefixes.cellPlasma ? 1000
+ : this.orePrefixes == WerkstoffLoader.cellMolten
+ || this.orePrefixes == WerkstoffLoader.capsuleMolten ? 144 : 0;
}
@Override
public ItemStack getContainerItem(ItemStack aStack) {
- return this.orePrefixes == OrePrefixes.cell
- || this.orePrefixes == OrePrefixes.cellPlasma
- || this.orePrefixes == WerkstoffLoader.cellMolten
- ? Materials.Empty.getCells(1)
- : null;
+ return this.orePrefixes == OrePrefixes.cell || this.orePrefixes == OrePrefixes.cellPlasma
+ || this.orePrefixes == WerkstoffLoader.cellMolten ? Materials.Empty.getCells(1) : null;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java
index 51107af501..36d7eb46fc 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java
@@ -1,33 +1,21 @@
/*
- * 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.system.material;
-import com.github.bartimaeusnek.bartworks.util.MathUtils;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -39,6 +27,12 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.util.MathUtils;
+
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_ModHandler;
+
public class BW_MetaGenerated_Ores extends BW_MetaGenerated_Blocks {
public BW_MetaGenerated_Ores(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
@@ -55,8 +49,8 @@ public class BW_MetaGenerated_Ores extends BW_MetaGenerated_Blocks {
}
}
- public static boolean setOreBlock(
- World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air, Block block, int[] aBlockMeta) {
+ public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air, Block block,
+ int[] aBlockMeta) {
if (!air) {
aY = MathUtils.clamp(aY, 1, aWorld.getActualHeight());
}
@@ -108,8 +102,7 @@ public class BW_MetaGenerated_Ores extends BW_MetaGenerated_Blocks {
@SuppressWarnings("unchecked")
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
for (Werkstoff tMaterial : Werkstoff.werkstoffHashSet) {
- if ((tMaterial != null)
- && tMaterial.hasItemType(OrePrefixes.ore)
+ if ((tMaterial != null) && tMaterial.hasItemType(OrePrefixes.ore)
&& ((tMaterial.getGenerationFeatures().blacklist & 0x8) == 0)) {
aList.add(new ItemStack(aItem, 1, tMaterial.getmID()));
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java
index 98507565a5..54825526de 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java
@@ -1,38 +1,32 @@
/*
- * 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.system.material;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
import java.util.Arrays;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_ModHandler;
+
public class BW_MetaGenerated_SmallOres extends BW_MetaGenerated_Ores {
+
public BW_MetaGenerated_SmallOres(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
super(p_i45386_1_, tileEntity, blockName);
this.blockTypeLocalizedName = GT_LanguageManager.addStringLocalization(
@@ -53,8 +47,8 @@ public class BW_MetaGenerated_SmallOres extends BW_MetaGenerated_Ores {
return "bw.blockores.02";
}
- public static boolean setOreBlock(
- World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air, Block block, int[] aBlockMeta) {
+ public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air, Block block,
+ int[] aBlockMeta) {
if (!air) {
aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java
index d2ce3fe266..ce3f26a020 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.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.system.material;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
public class BW_MetaGenerated_WerkstoffBlock_TE extends BW_MetaGenerated_Block_TE {
@@ -40,16 +33,14 @@ public class BW_MetaGenerated_WerkstoffBlock_TE extends BW_MetaGenerated_Block_T
if ((aMaterial != null)) {
TextureSet set = aMaterial.getTexSet();
ITexture aIconSet = TextureFactory.of(
- set.mTextures[
- PrefixTextureLinker.blockTexMap.getOrDefault(set, OrePrefixes.block.mTextureIndex)],
+ set.mTextures[PrefixTextureLinker.blockTexMap
+ .getOrDefault(set, OrePrefixes.block.mTextureIndex)],
aMaterial.getRGBA());
- return new ITexture[] {TextureFactory.of(Blocks.iron_block), aIconSet};
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block), aIconSet };
}
}
- return new ITexture[] {
- TextureFactory.of(Blocks.iron_block),
- TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])
- };
+ return new ITexture[] { TextureFactory.of(Blocks.iron_block),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java
index 44f3a90f2b..9c7d251688 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java
@@ -1,30 +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.system.material;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_LanguageManager;
import java.util.List;
+
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
@@ -34,10 +24,13 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_LanguageManager;
+
public class BW_MetaGenerated_WerkstoffBlocks extends BW_MetaGenerated_Blocks {
- public BW_MetaGenerated_WerkstoffBlocks(
- Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
+ public BW_MetaGenerated_WerkstoffBlocks(Material p_i45386_1_, Class<? extends TileEntity> tileEntity,
+ String blockName) {
super(p_i45386_1_, tileEntity, blockName);
this.blockTypeLocalizedName = GT_LanguageManager.addStringLocalization(
"bw.blocktype." + OrePrefixes.block,
@@ -67,7 +60,6 @@ public class BW_MetaGenerated_WerkstoffBlocks extends BW_MetaGenerated_Blocks {
public void getSubBlocks(Item aItem, CreativeTabs p_149666_2_, List aList) {
Werkstoff.werkstoffHashSet.stream()
.filter(tMaterial -> tMaterial.hasItemType(OrePrefixes.gem) || tMaterial.hasItemType(OrePrefixes.ingot))
- .map(tMaterial -> new ItemStack(aItem, 1, tMaterial.getmID()))
- .forEach(aList::add);
+ .map(tMaterial -> new ItemStack(aItem, 1, tMaterial.getmID())).forEach(aList::add);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java
index 5c64a2075d..67bfa6c0af 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java
@@ -1,38 +1,31 @@
/*
- * 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.system.material;
import static gregtech.api.enums.GT_Values.W;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
import gregtech.api.interfaces.IItemContainer;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
public enum BW_NonMeta_MaterialItems implements IItemContainer {
+
Depleted_Tiberium_1,
Depleted_Tiberium_2,
Depleted_Tiberium_4,
@@ -41,6 +34,7 @@ public enum BW_NonMeta_MaterialItems implements IItemContainer {
TiberiumCell_4,
TheCoreCell,
Depleted_TheCoreCell;
+
private ItemStack mStack;
private boolean mHasNotBeenSet = true;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java
index 8f34416122..6bd186a050 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.CircuitGeneration;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java
index caaa55b252..b333812740 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java
@@ -1,33 +1,36 @@
/*
- * 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.system.material.CircuitGeneration;
+import java.util.*;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -37,15 +40,6 @@ import gregtech.api.interfaces.IItemContainer;
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.objects.ItemData;
import gregtech.api.util.*;
-import java.util.*;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.FluidStack;
public class BW_Meta_Items {
@@ -66,17 +60,18 @@ public class BW_Meta_Items {
BW_Meta_Items.NEWCIRCUITS.getStack(2),
300,
480);
- GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {BW_Meta_Items.NEWCIRCUITS.getStack(2)},
- new ItemStack[] {BW_Meta_Items.NEWCIRCUITS.getStack(3)},
- null,
- new int[] {7500},
- new FluidStack[] {Materials.SolderingAlloy.getMolten(576)},
- null,
- 300,
- BW_Util.getMachineVoltageFromTier(4),
- BW_Util.CLEANROOM));
+ GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.NEWCIRCUITS.getStack(2) },
+ new ItemStack[] { BW_Meta_Items.NEWCIRCUITS.getStack(3) },
+ null,
+ new int[] { 7500 },
+ new FluidStack[] { Materials.SolderingAlloy.getMolten(576) },
+ null,
+ 300,
+ BW_Util.getMachineVoltageFromTier(4),
+ BW_Util.CLEANROOM));
}
@SuppressWarnings("deprecation")
@@ -204,12 +199,14 @@ public class BW_Meta_Items {
i,
0,
2,
- Objects.requireNonNull(CircuitImprintLoader.circuitIIconRefs.get(i))
- .get(1)
- .getIconIndex(),
+ Objects.requireNonNull(CircuitImprintLoader.circuitIIconRefs.get(i)).get(1).getIconIndex(),
this.mIconList);
BW_Util.set2DCoordTo1DArray(
- i, 1, 2, aIconRegister.registerIcon(MainMod.MOD_ID + ":WrapOverlay"), this.mIconList);
+ i,
+ 1,
+ 2,
+ aIconRegister.registerIcon(MainMod.MOD_ID + ":WrapOverlay"),
+ this.mIconList);
// aIconRegister.registerIcon("gregtech:" + (GT_Config.troll ? "troll" : this.getUnlocalizedName() +
// "/" + i));
}
@@ -219,25 +216,26 @@ public class BW_Meta_Items {
@Override
@SuppressWarnings("unchecked")
protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
- if (aStack.getItemDamage() == 0)
- if (aStack.getTagCompound() != null
- && CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()) != null)
- aList.add("An Imprint for: "
- + GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(
- CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()))));
- else aList.add("An Imprint for a Circuit");
- else if (aStack.getItemDamage() == 1)
- if (aStack.getTagCompound() != null
- && CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()) != null)
- aList.add("A Sliced "
- + GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(
- CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()))));
- else aList.add("A Sliced Circuit");
+ if (aStack.getItemDamage() == 0) if (aStack.getTagCompound() != null
+ && CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()) != null)
+ aList.add(
+ "An Imprint for: " + GT_LanguageManager.getTranslation(
+ GT_LanguageManager.getTranslateableItemStackName(
+ CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()))));
+ else aList.add("An Imprint for a Circuit");
+ else if (aStack.getItemDamage() == 1) if (aStack.getTagCompound() != null
+ && CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()) != null)
+ aList.add(
+ "A Sliced " + GT_LanguageManager.getTranslation(
+ GT_LanguageManager.getTranslateableItemStackName(
+ CircuitImprintLoader.getStackFromTag(aStack.getTagCompound()))));
+ else aList.add("A Sliced Circuit");
super.addAdditionalToolTips(aList, aStack, aPlayer);
}
}
public static class BW_GT_MetaGen_Item_Hook extends GT_MetaBase_Item {
+
public static final HashSet<BW_Meta_Items.BW_GT_MetaGen_Item_Hook> sInstances = new HashSet<>();
public final IIcon[] mIconList;
public final BitSet mEnabledItems;
@@ -251,6 +249,7 @@ public class BW_Meta_Items {
super(aUnlocalized);
this.setCreativeTab(new CreativeTabs("bw.MetaItems.0") {
+
@Override
public Item getTabIconItem() {
return ItemRegistry.TAB;
@@ -271,7 +270,7 @@ public class BW_Meta_Items {
return null;
}
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public final ItemStack addItem(int aID, String aEnglish, String aToolTip, Object... aRandomData) {
if (aToolTip == null) {
aToolTip = "";
@@ -369,8 +368,8 @@ public class BW_Meta_Items {
}
@Override
- public IIcon getIcon(
- ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
+ public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem,
+ int useRemaining) {
return this.getIconFromDamage(stack.getItemDamage());
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java
index 19bf5bb662..da02250010 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.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.system.material.CircuitGeneration;
-import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
import java.nio.ByteBuffer;
+import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
+
public class CircuitData {
private long aVoltage;
@@ -50,11 +42,7 @@ public class CircuitData {
@Override
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(13)
- .put(this.aTier)
- .putInt(this.aSpecial)
- .putLong(this.aVoltage)
- .array(),
+ ByteBuffer.allocate(13).put(this.aTier).putInt(this.aSpecial).putLong(this.aVoltage).array(),
0,
13,
31);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
index 6cfe902668..91ac70820f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
@@ -1,27 +1,33 @@
/*
- * 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.system.material.CircuitGeneration;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.CraftingManager;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+import net.minecraftforge.oredict.ShapedOreRecipe;
+
import com.github.bartimaeusnek.bartworks.ASM.BWCoreStaticReplacementMethodes;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
@@ -31,6 +37,7 @@ import com.github.bartimaeusnek.bartworks.util.Pair;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -39,19 +46,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.CraftingManager;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
-import net.minecraftforge.oredict.ShapedOreRecipe;
public class CircuitImprintLoader {
@@ -66,7 +60,7 @@ public class CircuitImprintLoader {
private static final HashSet<GT_Recipe> ORIGINAL_CAL_RECIPES = new HashSet<>();
private static final HashSet<GT_Recipe> MODIFIED_CAL_RECIPES = new HashSet<>();
- @SuppressWarnings({"unused", "RedundantSuppression"})
+ @SuppressWarnings({ "unused", "RedundantSuppression" })
public static void run() {
HashSet<GT_Recipe> toRem = new HashSet<>();
HashSet<GT_Recipe> toAdd = new HashSet<>();
@@ -89,19 +83,19 @@ public class CircuitImprintLoader {
private static void rebuildCircuitAssemblerMap(HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd) {
reAddOriginalRecipes();
- GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.mRecipeList.forEach(
- e -> CircuitImprintLoader.handleCircuitRecipeRebuilding(e, toRem, toAdd));
+ GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.mRecipeList
+ .forEach(e -> CircuitImprintLoader.handleCircuitRecipeRebuilding(e, toRem, toAdd));
}
- private static void handleCircuitRecipeRebuilding(
- GT_Recipe circuitRecipe, HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd) {
+ private static void handleCircuitRecipeRebuilding(GT_Recipe circuitRecipe, HashSet<GT_Recipe> toRem,
+ HashSet<GT_Recipe> toAdd) {
ItemStack[] outputs = circuitRecipe.mOutputs;
boolean isOrePass = isCircuitOreDict(outputs[0]);
String unlocalizedName = outputs[0].getUnlocalizedName();
if (isOrePass || unlocalizedName.contains("Circuit") || unlocalizedName.contains("circuit")) {
- CircuitImprintLoader.recipeTagMap.put(
- CircuitImprintLoader.getTagFromStack(outputs[0]), circuitRecipe.copy());
+ CircuitImprintLoader.recipeTagMap
+ .put(CircuitImprintLoader.getTagFromStack(outputs[0]), circuitRecipe.copy());
Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
? FluidRegistry.getFluid("molten.indalloy140")
@@ -116,9 +110,7 @@ public class CircuitImprintLoader {
|| circuitRecipe.mFluidInputs[0].isFluidEqual(new FluidStack(solderUEV, 0))) {
GT_Recipe newRecipe = CircuitImprintLoader.reBuildRecipe(circuitRecipe);
if (newRecipe != null)
- BWRecipes.instance
- .getMappingsFor(BWRecipes.CIRCUITASSEMBLYLINE)
- .addRecipe(newRecipe);
+ BWRecipes.instance.getMappingsFor(BWRecipes.CIRCUITASSEMBLYLINE).addRecipe(newRecipe);
addCutoffRecipeToSets(toRem, toAdd, circuitRecipe);
} else {
if (circuitRecipe.mEUt > BW_Util.getTierVoltage(ConfigHandler.cutoffTier)) toRem.add(circuitRecipe);
@@ -147,8 +139,8 @@ public class CircuitImprintLoader {
MODIFIED_CAL_RECIPES.addAll(toAdd);
}
- private static void addCutoffRecipeToSets(
- HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd, GT_Recipe circuitRecipe) {
+ private static void addCutoffRecipeToSets(HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd,
+ GT_Recipe circuitRecipe) {
if (circuitRecipe.mEUt > BW_Util.getTierVoltage(ConfigHandler.cutoffTier)) {
toRem.add(circuitRecipe);
toAdd.add(CircuitImprintLoader.makeMoreExpensive(circuitRecipe));
@@ -192,7 +184,7 @@ public class CircuitImprintLoader {
return new BWRecipes.DynamicGTRecipe(
false,
in,
- new ItemStack[] {getOutputMultiplied(original)},
+ new ItemStack[] { getOutputMultiplied(original) },
BW_Meta_Items.getNEWCIRCUITS()
.getStackWithNBT(CircuitImprintLoader.getTagFromStack(original.mOutputs[0]), 0, 0),
null,
@@ -209,18 +201,18 @@ public class CircuitImprintLoader {
return out;
}
- private static void replaceCircuits(
- BiMap<ItemList, Short> inversed, GT_Recipe original, ItemStack[] in, int index) {
+ private static void replaceCircuits(BiMap<ItemList, Short> inversed, GT_Recipe original, ItemStack[] in,
+ int index) {
for (ItemList il : inversed.keySet()) {
if (GT_Utility.areStacksEqual(il.get(1), replaceCircuitParts(original.mInputs[index]))) {
- in[index] =
- BW_Meta_Items.getNEWCIRCUITS().getStack(inversed.get(il), original.mInputs[index].stackSize);
+ in[index] = BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(inversed.get(il), original.mInputs[index].stackSize);
}
}
}
- private static final List<Pair<ItemStack, ItemStack>> circuitPartsToReplace =
- Collections.unmodifiableList(Arrays.asList(
+ private static final List<Pair<ItemStack, ItemStack>> circuitPartsToReplace = Collections.unmodifiableList(
+ Arrays.asList(
new Pair<>(ItemList.Circuit_Parts_Resistor.get(1), ItemList.Circuit_Parts_ResistorSMD.get(1)),
new Pair<>(ItemList.Circuit_Parts_Diode.get(1), ItemList.Circuit_Parts_DiodeSMD.get(1)),
new Pair<>(ItemList.Circuit_Parts_Transistor.get(1), ItemList.Circuit_Parts_TransistorSMD.get(1)),
@@ -252,24 +244,24 @@ public class CircuitImprintLoader {
// fine wires
} else if (BW_Util.checkStackAndPrefix(original.mInputs[index])
&& GT_OreDictUnificator.getAssociation(original.mInputs[index]).mPrefix == OrePrefixes.wireFine) {
- in[index] = GT_OreDictUnificator.get(
- OrePrefixes.wireGt04,
- GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial,
- original.mInputs[index].stackSize);
- if (in[index] == null) {
- in[index] = GT_OreDictUnificator.get(
- OrePrefixes.wireFine,
- GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial,
- original.mInputs[index].stackSize * 16);
- }
- // other components
- } else {
- in[index] = original.mInputs[index].copy();
- in[index].stackSize *= 16;
- if (in[index].stackSize > in[index].getItem().getItemStackLimit()
- || in[index].stackSize > in[index].getMaxStackSize())
- in[index].stackSize = in[index].getMaxStackSize();
- }
+ in[index] = GT_OreDictUnificator.get(
+ OrePrefixes.wireGt04,
+ GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial,
+ original.mInputs[index].stackSize);
+ if (in[index] == null) {
+ in[index] = GT_OreDictUnificator.get(
+ OrePrefixes.wireFine,
+ GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial,
+ original.mInputs[index].stackSize * 16);
+ }
+ // other components
+ } else {
+ in[index] = original.mInputs[index].copy();
+ in[index].stackSize *= 16;
+ if (in[index].stackSize > in[index].getItem().getItemStackLimit()
+ || in[index].stackSize > in[index].getMaxStackSize())
+ in[index].stackSize = in[index].getMaxStackSize();
+ }
}
}
@@ -315,14 +307,17 @@ public class CircuitImprintLoader {
eut = Math.min(
eut,
- BW_Util.getMachineVoltageFromTier(BW_Util.getCircuitTierFromOreDictName(OreDictionary.getOreName(
- (OreDictionary.getOreIDs(stack) != null && OreDictionary.getOreIDs(stack).length > 0)
- ? OreDictionary.getOreIDs(stack)[0]
- : -1))));
+ BW_Util.getMachineVoltageFromTier(
+ BW_Util.getCircuitTierFromOreDictName(
+ OreDictionary.getOreName(
+ (OreDictionary.getOreIDs(stack) != null
+ && OreDictionary.getOreIDs(stack).length > 0)
+ ? OreDictionary.getOreIDs(stack)[0]
+ : -1))));
GT_Recipe slicingRecipe = new BWRecipes.DynamicGTRecipe(
true,
- new ItemStack[] {stack, ItemList.Shape_Slicer_Flat.get(0)},
- new ItemStack[] {BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag, 1, 1)},
+ new ItemStack[] { stack, ItemList.Shape_Slicer_Flat.get(0) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag, 1, 1) },
null,
null,
null,
@@ -336,23 +331,14 @@ public class CircuitImprintLoader {
private static void makeAndAddCraftingRecipes(NBTTagCompound tag) {
ItemStack circuit = BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag, 0, 1);
- Object[] imprintRecipe = {
- " X ",
- "GPG",
- " X ",
- 'P',
- BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag, 1, 1),
- 'G',
- WerkstoffLoader.Prasiolite.get(OrePrefixes.gemExquisite, 1),
- 'X',
- BW_Meta_Items.getNEWCIRCUITS().getStack(3)
- };
+ Object[] imprintRecipe = { " X ", "GPG", " X ", 'P', BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag, 1, 1),
+ 'G', WerkstoffLoader.Prasiolite.get(OrePrefixes.gemExquisite, 1), 'X',
+ BW_Meta_Items.getNEWCIRCUITS().getStack(3) };
IRecipe bwrecipe = new BWRecipes.BWNBTDependantCraftingRecipe(circuit, imprintRecipe);
ShapedOreRecipe gtrecipe = BW_Util.createGTCraftingRecipe(
circuit,
- GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
- | GT_ModHandler.RecipeBits.KEEPNBT
+ GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.KEEPNBT
| GT_ModHandler.RecipeBits.BUFFERED,
imprintRecipe);
@@ -375,10 +361,7 @@ public class CircuitImprintLoader {
}
private static void deleteCALRecipesAndTags() {
- BWRecipes.instance
- .getMappingsFor(BWRecipes.CIRCUITASSEMBLYLINE)
- .mRecipeList
- .clear();
+ BWRecipes.instance.getMappingsFor(BWRecipes.CIRCUITASSEMBLYLINE).mRecipeList.clear();
recipeTagMap.clear();
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java
index 617609a850..f1e4c90679 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.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.system.material.CircuitGeneration;
import static gregtech.api.enums.ItemList.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.client.renderer.BW_GT_ItemRenderer;
+
import cpw.mods.fml.common.FMLCommonHandler;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.item.ItemStack;
public class CircuitPartLoader implements Runnable {
+
@Override
public void run() {
CircuitPartLoader.makeCircuitParts();
@@ -48,8 +43,7 @@ public class CircuitPartLoader implements Runnable {
ItemList[] itemLists = values();
for (ItemList single : itemLists) {
if (!single.hasBeenSet()) continue;
- if (single.toString().contains("Wafer")
- || single.toString().contains("Circuit_Silicon_Ingot")
+ if (single.toString().contains("Wafer") || single.toString().contains("Circuit_Silicon_Ingot")
|| single.toString().contains("Raw")
|| single.toString().contains("raw")
|| single.toString().contains("Glass_Tube")
@@ -75,12 +69,12 @@ public class CircuitPartLoader implements Runnable {
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
single.getItem().addInformation(single.get(1).copy(), null, toolTip, true);
String tt = (toolTip.size() > 0 ? toolTip.get(0) : "");
- // tt += "Internal Name = "+single;
- String localised =
- GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(itemStack));
+ // tt += "Internal Name = "+single;
+ String localised = GT_LanguageManager
+ .getTranslation(GT_LanguageManager.getTranslateableItemStackName(itemStack));
BW_Meta_Items.getNEWCIRCUITS().addItem(CircuitImprintLoader.reverseIDs, "Wrap of " + localised + "s", tt);
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {single.get(16).copy(), GT_Utility.getIntegratedCircuit(16)},
+ new ItemStack[] { single.get(16).copy(), GT_Utility.getIntegratedCircuit(16) },
Materials.Plastic.getMolten(72),
BW_Meta_Items.getNEWCIRCUITS().getStack(CircuitImprintLoader.reverseIDs),
600,
@@ -91,74 +85,75 @@ public class CircuitPartLoader implements Runnable {
}
/**
- * Contains all the circuit parts we want to generate wrapped version of.
- * New entries MUST be placed at the END of this list, to prevent id shift.
+ * Contains all the circuit parts we want to generate wrapped version of. New entries MUST be placed at the END of
+ * this list, to prevent id shift.
*/
- private static final List<ItemList> CIRCUIT_PARTS = Collections.unmodifiableList(Arrays.asList(
- Circuit_Board_Basic,
- Circuit_Board_Advanced,
- Circuit_Board_Elite,
- Circuit_Parts_Crystal_Chip_Elite,
- Circuit_Parts_Crystal_Chip_Master,
- Circuit_Board_Coated,
- Circuit_Board_Coated_Basic,
- Circuit_Board_Phenolic,
- Circuit_Board_Phenolic_Good,
- Circuit_Board_Epoxy,
- Circuit_Board_Epoxy_Advanced,
- Circuit_Board_Fiberglass,
- Circuit_Board_Fiberglass_Advanced,
- Circuit_Board_Multifiberglass_Elite,
- Circuit_Board_Multifiberglass,
- Circuit_Board_Wetware,
- Circuit_Board_Wetware_Extreme,
- Circuit_Board_Plastic,
- Circuit_Board_Plastic_Advanced,
- Circuit_Board_Bio,
- Circuit_Board_Bio_Ultra,
- Circuit_Parts_ResistorSMD,
- Circuit_Parts_InductorSMD,
- Circuit_Parts_DiodeSMD,
- Circuit_Parts_TransistorSMD,
- Circuit_Parts_CapacitorSMD,
- Circuit_Parts_ResistorASMD,
- Circuit_Parts_DiodeASMD,
- Circuit_Parts_TransistorASMD,
- Circuit_Parts_CapacitorASMD,
- Circuit_Chip_ILC,
- Circuit_Chip_Ram,
- Circuit_Chip_NAND,
- Circuit_Chip_NOR,
- Circuit_Chip_CPU,
- Circuit_Chip_SoC,
- Circuit_Chip_SoC2,
- Circuit_Chip_PIC,
- Circuit_Chip_Simple_SoC,
- Circuit_Chip_HPIC,
- Circuit_Chip_UHPIC,
- Circuit_Chip_ULPIC,
- Circuit_Chip_LPIC,
- Circuit_Chip_NPIC,
- Circuit_Chip_PPIC,
- Circuit_Chip_QPIC,
- Circuit_Chip_NanoCPU,
- Circuit_Chip_QuantumCPU,
- Circuit_Chip_CrystalCPU,
- Circuit_Chip_CrystalSoC,
- Circuit_Chip_CrystalSoC2,
- Circuit_Chip_NeuroCPU,
- Circuit_Chip_BioCPU,
- Circuit_Chip_Stemcell,
- Circuit_Chip_Biocell,
- Circuit_Parts_ResistorXSMD,
- Circuit_Parts_DiodeXSMD,
- Circuit_Parts_TransistorXSMD,
- Circuit_Parts_CapacitorXSMD,
- Circuit_Parts_InductorASMD,
- Circuit_Parts_InductorXSMD,
- Circuit_Chip_Optical,
- Circuit_Board_Optical,
- Optically_Perfected_CPU,
- Optical_Cpu_Containment_Housing,
- Optically_Compatible_Memory));
+ private static final List<ItemList> CIRCUIT_PARTS = Collections.unmodifiableList(
+ Arrays.asList(
+ Circuit_Board_Basic,
+ Circuit_Board_Advanced,
+ Circuit_Board_Elite,
+ Circuit_Parts_Crystal_Chip_Elite,
+ Circuit_Parts_Crystal_Chip_Master,
+ Circuit_Board_Coated,
+ Circuit_Board_Coated_Basic,
+ Circuit_Board_Phenolic,
+ Circuit_Board_Phenolic_Good,
+ Circuit_Board_Epoxy,
+ Circuit_Board_Epoxy_Advanced,
+ Circuit_Board_Fiberglass,
+ Circuit_Board_Fiberglass_Advanced,
+ Circuit_Board_Multifiberglass_Elite,
+ Circuit_Board_Multifiberglass,
+ Circuit_Board_Wetware,
+ Circuit_Board_Wetware_Extreme,
+ Circuit_Board_Plastic,
+ Circuit_Board_Plastic_Advanced,
+ Circuit_Board_Bio,
+ Circuit_Board_Bio_Ultra,
+ Circuit_Parts_ResistorSMD,
+ Circuit_Parts_InductorSMD,
+ Circuit_Parts_DiodeSMD,
+ Circuit_Parts_TransistorSMD,
+ Circuit_Parts_CapacitorSMD,
+ Circuit_Parts_ResistorASMD,
+ Circuit_Parts_DiodeASMD,
+ Circuit_Parts_TransistorASMD,
+ Circuit_Parts_CapacitorASMD,
+ Circuit_Chip_ILC,
+ Circuit_Chip_Ram,
+ Circuit_Chip_NAND,
+ Circuit_Chip_NOR,
+ Circuit_Chip_CPU,
+ Circuit_Chip_SoC,
+ Circuit_Chip_SoC2,
+ Circuit_Chip_PIC,
+ Circuit_Chip_Simple_SoC,
+ Circuit_Chip_HPIC,
+ Circuit_Chip_UHPIC,
+ Circuit_Chip_ULPIC,
+ Circuit_Chip_LPIC,
+ Circuit_Chip_NPIC,
+ Circuit_Chip_PPIC,
+ Circuit_Chip_QPIC,
+ Circuit_Chip_NanoCPU,
+ Circuit_Chip_QuantumCPU,
+ Circuit_Chip_CrystalCPU,
+ Circuit_Chip_CrystalSoC,
+ Circuit_Chip_CrystalSoC2,
+ Circuit_Chip_NeuroCPU,
+ Circuit_Chip_BioCPU,
+ Circuit_Chip_Stemcell,
+ Circuit_Chip_Biocell,
+ Circuit_Parts_ResistorXSMD,
+ Circuit_Parts_DiodeXSMD,
+ Circuit_Parts_TransistorXSMD,
+ Circuit_Parts_CapacitorXSMD,
+ Circuit_Parts_InductorASMD,
+ Circuit_Parts_InductorXSMD,
+ Circuit_Chip_Optical,
+ Circuit_Board_Optical,
+ Optically_Perfected_CPU,
+ Optical_Cpu_Containment_Housing,
+ Optically_Compatible_Memory));
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java
index 69b43684ce..96bc459e91 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java
@@ -1,35 +1,41 @@
/*
- * 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.system.material.GT_Enhancement;
import static com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.GTMetaItemEnhancer.NoMetaValue;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Items;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
@@ -38,18 +44,6 @@ import gregtech.api.enums.TextureSet;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.util.GT_OreDictUnificator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.oredict.OreDictionary;
public class BWGTMetaItems extends BW_MetaGenerated_Items {
@@ -64,17 +58,18 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items {
Materials material = Materials.values()[i];
if (((material.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten)
|| ((material.getFluid(1) == null && material.getGas(1) == null)
- && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue;
+ && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))))
+ continue;
// for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet)
- // if (material.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName()))
- // continue materialloop;
- if (OreDictionary.doesOreNameExist(
- this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ", ""))) {
+ // if (material.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName()))
+ // continue materialloop;
+ if (OreDictionary
+ .doesOreNameExist(this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ", ""))) {
hiddenThings.add(i);
continue;
}
- GT_OreDictUnificator.registerOre(
- this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ", ""), tStack);
+ GT_OreDictUnificator
+ .registerOre(this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ", ""), tStack);
}
if (noSubIDMaterials != null) {
@@ -88,14 +83,14 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items {
&& (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))))
continue;
// for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet)
- // if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName()))
- // continue materialloop;
+ // if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName()))
+ // continue materialloop;
if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ", ""))) {
hiddenThings.add(i);
continue;
}
- GT_OreDictUnificator.registerOre(
- this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ", ""), tStack);
+ GT_OreDictUnificator
+ .registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ", ""), tStack);
}
}
}
@@ -163,28 +158,28 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items {
public void getSubItems(Item var1, CreativeTabs aCreativeTab, List aList) {
for (int i = 0; i < Materials.values().length; i++) {
Materials w = Materials.values()[i];
- if ((w == null)
- || (w.mTypes & Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes)) == 0
- && Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes) != 0) continue;
+ if ((w == null) || (w.mTypes & Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes)) == 0
+ && Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes) != 0)
+ continue;
else if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten)
|| ((w.getFluid(1) == null && w.getGas(1) == null)
- && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue;
+ && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))))
+ continue;
else if (hiddenThings.contains(i)) continue;
aList.add(new ItemStack(this, 1, i));
}
- if (hasList)
- for (int i = 0; i < NoMetaValue.size(); i++) {
- Materials w = NoMetaValue.get(i);
- if ((w == null)
- || (w.mTypes & Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes)) == 0
- && Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes) != 0) continue;
- else if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten)
- || ((w.getFluid(1) == null && w.getGas(1) == null)
- && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))))
- continue;
- else if (hiddenThings.contains(i)) continue;
- aList.add(new ItemStack(this, 1, i + 1001));
- }
+ if (hasList) for (int i = 0; i < NoMetaValue.size(); i++) {
+ Materials w = NoMetaValue.get(i);
+ if ((w == null) || (w.mTypes & Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes)) == 0
+ && Werkstoff.GenerationFeatures.getPrefixDataRaw(this.orePrefixes) != 0)
+ continue;
+ else if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten)
+ || ((w.getFluid(1) == null && w.getGas(1) == null)
+ && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))))
+ continue;
+ else if (hiddenThings.contains(i)) continue;
+ aList.add(new ItemStack(this, 1, i + 1001));
+ }
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java
index 5f0730b1a3..cc3f6d6611 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java
@@ -1,37 +1,21 @@
/*
- * 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.system.material.GT_Enhancement;
-import com.github.bartimaeusnek.bartworks.API.LoaderReference;
-import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
import java.util.List;
import java.util.stream.Collectors;
+
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
@@ -39,7 +23,18 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
+import com.github.bartimaeusnek.bartworks.API.LoaderReference;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+
public class GTMetaItemEnhancer {
+
static List<Materials> NoMetaValue;
private GTMetaItemEnhancer() {}
@@ -51,11 +46,10 @@ public class GTMetaItemEnhancer {
for (int i = 0, valuesLength = values.length; i < valuesLength; i++) {
Materials m = values[i];
if (m == null || m.mStandardMoltenFluid == null) continue;
- final FluidContainerRegistry.FluidContainerData emptyData =
- new FluidContainerRegistry.FluidContainerData(
- m.getMolten(144),
- new ItemStack(moltenCell, 1, i),
- GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L));
+ final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
+ m.getMolten(144),
+ new ItemStack(moltenCell, 1, i),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L));
FluidContainerRegistry.registerFluidContainer(emptyData);
GT_Utility.addFluidContainerData(emptyData);
GT_Values.RA.addFluidCannerRecipe(
@@ -73,8 +67,7 @@ public class GTMetaItemEnhancer {
if (!LoaderReference.Forestry) {
return;
}
- NoMetaValue = Materials.getMaterialsMap().values().stream()
- .filter(m -> m.mMetaItemSubID == -1)
+ NoMetaValue = Materials.getMaterialsMap().values().stream().filter(m -> m.mMetaItemSubID == -1)
.collect(Collectors.toList());
Item moltenCapsuls = new BWGTMetaItems(WerkstoffLoader.capsuleMolten, null);
Item capsuls = new BWGTMetaItems(OrePrefixes.capsule, NoMetaValue);
@@ -84,11 +77,10 @@ public class GTMetaItemEnhancer {
for (int i = 0, valuesLength = values.length; i < valuesLength; i++) {
Materials m = values[i];
if (m.mStandardMoltenFluid != null && GT_OreDictUnificator.get(WerkstoffLoader.cellMolten, m, 1) != null) {
- final FluidContainerRegistry.FluidContainerData emptyData =
- new FluidContainerRegistry.FluidContainerData(
- m.getMolten(144),
- new ItemStack(moltenCapsuls, 1, i),
- GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1));
+ final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
+ m.getMolten(144),
+ new ItemStack(moltenCapsuls, 1, i),
+ GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1));
FluidContainerRegistry.registerFluidContainer(emptyData);
GT_Utility.addFluidContainerData(emptyData);
GT_Values.RA.addFluidCannerRecipe(
@@ -97,30 +89,35 @@ public class GTMetaItemEnhancer {
m.getMolten(144),
GT_Values.NF);
GT_Values.RA.addFluidCannerRecipe(
- new ItemStack(moltenCapsuls, 1, i), GT_Values.NI, GT_Values.NF, m.getMolten(144));
+ new ItemStack(moltenCapsuls, 1, i),
+ GT_Values.NI,
+ GT_Values.NF,
+ m.getMolten(144));
}
if (m.getFluid(1) == null && m.getGas(1) == null) continue;
if (OreDictionary.doesOreNameExist("capsule" + m.mName)) continue;
addFluidData(m, GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), capsuls, 1000, i, true);
- // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i, false);
+ // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i, false);
}
for (int i = 0, valuesLength = NoMetaValue.size(); i < valuesLength; i++) {
Materials m = NoMetaValue.get(i);
if (m.getFluid(1) == null && m.getGas(1) == null) continue;
if (OreDictionary.doesOreNameExist("capsule" + m.mName)) continue;
addFluidData(m, GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), capsuls, 1000, i + 1001, true);
- // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i + 1001, false);
+ // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i + 1001, false);
}
}
private static void addFluidData(Materials m, ItemStack container, Item filled, int amount, int it, boolean empty) {
Fluid f = m.getFluid(1) != null ? m.getFluid(1).getFluid() : m.getGas(1).getFluid();
final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
- new FluidStack(f, amount), new ItemStack(filled, 1, it), container);
+ new FluidStack(f, amount),
+ new ItemStack(filled, 1, it),
+ container);
FluidContainerRegistry.registerFluidContainer(emptyData);
GT_Utility.addFluidContainerData(emptyData);
- GT_Values.RA.addFluidCannerRecipe(
- container, new ItemStack(filled, 1, it), new FluidStack(f, amount), GT_Values.NF);
+ GT_Values.RA
+ .addFluidCannerRecipe(container, new ItemStack(filled, 1, it), new FluidStack(f, amount), GT_Values.NF);
GT_Values.RA.addFluidCannerRecipe(
new ItemStack(filled, 1, it),
empty ? GT_Values.NI : container,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java
index 91596427b6..534a18476b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.GT_Enhancement;
@@ -25,12 +16,28 @@ package com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement;
import static com.github.bartimaeusnek.bartworks.MainMod.MOD_ID;
import static gregtech.api.enums.OrePrefixes.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.CraftingManager;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.reflect.MethodUtils;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.AfterLuVTierEnhacement;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -39,18 +46,6 @@ import gregtech.api.util.*;
import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.*;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.CraftingManager;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.reflect.FieldUtils;
-import org.apache.commons.lang3.reflect.MethodUtils;
@SuppressWarnings("ALL")
public class LuVTierEnhancer implements Runnable {
@@ -59,14 +54,18 @@ public class LuVTierEnhancer implements Runnable {
static {
addToBlackListForOsmiridiumReplacement(ItemList.Casing_MiningOsmiridium.get(1));
- addToBlackListForOsmiridiumReplacement(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- 170, 1, Materials.Osmiridium, Materials.Osmiridium, null));
- addToBlackListForOsmiridiumReplacement(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- 172, 1, Materials.Osmiridium, Materials.Osmiridium, null));
- addToBlackListForOsmiridiumReplacement(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- 174, 1, Materials.Osmiridium, Materials.Osmiridium, null));
- addToBlackListForOsmiridiumReplacement(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- 176, 1, Materials.Osmiridium, Materials.Osmiridium, null));
+ addToBlackListForOsmiridiumReplacement(
+ GT_MetaGenerated_Tool_01.INSTANCE
+ .getToolWithStats(170, 1, Materials.Osmiridium, Materials.Osmiridium, null));
+ addToBlackListForOsmiridiumReplacement(
+ GT_MetaGenerated_Tool_01.INSTANCE
+ .getToolWithStats(172, 1, Materials.Osmiridium, Materials.Osmiridium, null));
+ addToBlackListForOsmiridiumReplacement(
+ GT_MetaGenerated_Tool_01.INSTANCE
+ .getToolWithStats(174, 1, Materials.Osmiridium, Materials.Osmiridium, null));
+ addToBlackListForOsmiridiumReplacement(
+ GT_MetaGenerated_Tool_01.INSTANCE
+ .getToolWithStats(176, 1, Materials.Osmiridium, Materials.Osmiridium, null));
}
public void run() {
@@ -74,19 +73,17 @@ public class LuVTierEnhancer implements Runnable {
List<IRecipe> bufferedRecipeList = null;
try {
- bufferedRecipeList =
- (List<IRecipe>) FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true)
- .get(null);
+ bufferedRecipeList = (List<IRecipe>) FieldUtils
+ .getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true).get(null);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
HashSet<ItemStack> LuVMachines = new HashSet<>();
LuVMachines.add(ItemRegistry.cal);
- OrePrefixes[] LuVMaterialsGenerated = {dust, ingot, plate, stick, stickLong, rotor, plateDouble, plateDense};
+ OrePrefixes[] LuVMaterialsGenerated = { dust, ingot, plate, stick, stickLong, rotor, plateDouble, plateDense };
- Arrays.stream(ItemList.values())
- .filter(item -> item.toString().contains("LuV") && item.hasBeenSet())
+ Arrays.stream(ItemList.values()).filter(item -> item.toString().contains("LuV") && item.hasBeenSet())
.forEach(item -> LuVMachines.add(item.get(1)));
if (LoaderReference.dreamcraft) {
@@ -95,11 +92,10 @@ public class LuVTierEnhancer implements Runnable {
GT_ModHandler.addCraftingRecipe(
ItemList.Casing_LuV.get(1),
- GT_ModHandler.RecipeBits.BUFFERED
- | GT_ModHandler.RecipeBits.REVERSIBLE
+ GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.REVERSIBLE
| GT_ModHandler.RecipeBits.NOT_REMOVABLE
| GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES,
- new Object[] {"PPP", "PwP", "PPP", 'P', WerkstoffLoader.LuVTierMaterial.get(plate)});
+ new Object[] { "PPP", "PwP", "PPP", 'P', WerkstoffLoader.LuVTierMaterial.get(plate) });
replaceAllRecipes(LuVMachines, LuVMaterialsGenerated, bufferedRecipeList);
@@ -113,8 +109,8 @@ public class LuVTierEnhancer implements Runnable {
blackListForOsmiridium.add(stack);
}
- private static void replaceAllRecipes(
- Collection<ItemStack> LuVMachines, OrePrefixes[] LuVMaterialsGenerated, List<IRecipe> bufferedRecipeList) {
+ private static void replaceAllRecipes(Collection<ItemStack> LuVMachines, OrePrefixes[] LuVMaterialsGenerated,
+ List<IRecipe> bufferedRecipeList) {
LuVTierEnhancer.replaceOsmiridiumInLuVRecipes();
for (GT_Recipe_AssemblyLine sAssemblylineRecipe : GT_Recipe_AssemblyLine.sAssemblylineRecipes) {
@@ -143,8 +139,7 @@ public class LuVTierEnhancer implements Runnable {
Class customItemListClass = Class.forName("com.dreammaster.gthandler.CustomItemList");
Method hasnotBeenSet = MethodUtils.getAccessibleMethod(customItemListClass, "hasBeenSet");
Method get = MethodUtils.getAccessibleMethod(customItemListClass, "get", long.class, Object[].class);
- for (Enum customItemList : (Enum[])
- FieldUtils.getField(customItemListClass, "$VALUES", true).get(null)) {
+ for (Enum customItemList : (Enum[]) FieldUtils.getField(customItemListClass, "$VALUES", true).get(null)) {
if (customItemList.toString().contains("LuV") && (boolean) hasnotBeenSet.invoke(customItemList))
LuVMachines.add((ItemStack) get.invoke(customItemList, 1, new Object[0]));
}
@@ -153,8 +148,8 @@ public class LuVTierEnhancer implements Runnable {
}
}
- private static void rewriteCraftingRecipes(
- List<IRecipe> bufferedRecipeList, OrePrefixes[] LuVMaterialsGenerated, Predicate recipeFilter) {
+ private static void rewriteCraftingRecipes(List<IRecipe> bufferedRecipeList, OrePrefixes[] LuVMaterialsGenerated,
+ Predicate recipeFilter) {
for (OrePrefixes prefixes : LuVMaterialsGenerated) {
Consumer recipeAction = obj -> LuVTierEnhancer.doStacksContainAndReplace(
@@ -164,9 +159,7 @@ public class LuVTierEnhancer implements Runnable {
true,
WerkstoffLoader.LuVTierMaterial.get(prefixes));
- CraftingManager.getInstance().getRecipeList().stream()
- .filter(recipeFilter)
- .forEach(recipeAction);
+ CraftingManager.getInstance().getRecipeList().stream().filter(recipeFilter).forEach(recipeAction);
bufferedRecipeList.stream().filter(recipeFilter).forEach(recipeAction);
}
}
@@ -230,8 +223,8 @@ public class LuVTierEnhancer implements Runnable {
}
}
- private static void rewriteAsslineRecipes(
- ItemStack stack, OrePrefixes[] LuVMaterialsGenerated, GT_Recipe.GT_Recipe_AssemblyLine recipe) {
+ private static void rewriteAsslineRecipes(ItemStack stack, OrePrefixes[] LuVMaterialsGenerated,
+ GT_Recipe.GT_Recipe_AssemblyLine recipe) {
for (OrePrefixes prefixes : LuVMaterialsGenerated) {
if (LuVTierEnhancer.doStacksContainAndReplace(recipe, recipe.mInputs, stack, false)) {
LuVTierEnhancer.doStacksContainAndReplace(
@@ -242,12 +235,12 @@ public class LuVTierEnhancer implements Runnable {
WerkstoffLoader.LuVTierMaterial.get(prefixes));
LuVTierEnhancer.doStacksContainAndReplace(
recipe,
- new Object[] {recipe.mOutput},
+ new Object[] { recipe.mOutput },
GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1),
true,
WerkstoffLoader.LuVTierMaterial.get(prefixes));
}
- if (LuVTierEnhancer.doStacksContainAndReplace(recipe, new Object[] {recipe.mOutput}, stack, false)) {
+ if (LuVTierEnhancer.doStacksContainAndReplace(recipe, new Object[] { recipe.mOutput }, stack, false)) {
LuVTierEnhancer.doStacksContainAndReplace(
recipe,
recipe.mInputs,
@@ -256,7 +249,7 @@ public class LuVTierEnhancer implements Runnable {
WerkstoffLoader.LuVTierMaterial.get(prefixes));
LuVTierEnhancer.doStacksContainAndReplace(
recipe,
- new Object[] {recipe.mOutput},
+ new Object[] { recipe.mOutput },
GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1),
true,
WerkstoffLoader.LuVTierMaterial.get(prefixes));
@@ -270,7 +263,7 @@ public class LuVTierEnhancer implements Runnable {
true,
WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
}
- if (LuVTierEnhancer.doStacksContainAndReplace(recipe, new Object[] {recipe.mOutput}, stack, false)) {
+ if (LuVTierEnhancer.doStacksContainAndReplace(recipe, new Object[] { recipe.mOutput }, stack, false)) {
LuVTierEnhancer.doStacksContainAndReplace(
recipe,
recipe.mFluidInputs,
@@ -281,21 +274,25 @@ public class LuVTierEnhancer implements Runnable {
}
private static void replaceOsmiridiumInLuVRecipes() {
- Consumer<GT_Recipe> replace = gt_recipe -> gt_recipe.mInputs =
- replaceArrayWith(gt_recipe.mInputs, Materials.Osmiridium, WerkstoffLoader.Ruridit, gt_recipe);
+ Consumer<GT_Recipe> replace = gt_recipe -> gt_recipe.mInputs = replaceArrayWith(
+ gt_recipe.mInputs,
+ Materials.Osmiridium,
+ WerkstoffLoader.Ruridit,
+ gt_recipe);
GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.stream()
- .filter(recipe_assemblyLine -> recipe_assemblyLine.mEUt <= 6000)
- .forEach(recipe_assemblyLine -> recipe_assemblyLine.mInputs = replaceArrayWith(
- recipe_assemblyLine.mInputs,
- Materials.Osmiridium,
- WerkstoffLoader.Ruridit,
- recipe_assemblyLine));
+ .filter(recipe_assemblyLine -> recipe_assemblyLine.mEUt <= 6000).forEach(
+ recipe_assemblyLine -> recipe_assemblyLine.mInputs = replaceArrayWith(
+ recipe_assemblyLine.mInputs,
+ Materials.Osmiridium,
+ WerkstoffLoader.Ruridit,
+ recipe_assemblyLine));
GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream()
- .filter(gt_recipe -> gt_recipe.mEUt < BW_Util.getTierVoltage(6)
- && !BW_Util.checkStackAndPrefix(gt_recipe.mOutputs[0])
- && !isOutputBlackListed(gt_recipe.mOutputs[0]))
+ .filter(
+ gt_recipe -> gt_recipe.mEUt < BW_Util.getTierVoltage(6)
+ && !BW_Util.checkStackAndPrefix(gt_recipe.mOutputs[0])
+ && !isOutputBlackListed(gt_recipe.mOutputs[0]))
.forEach(replace);
GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.stream()
@@ -308,8 +305,8 @@ public class LuVTierEnhancer implements Runnable {
return false;
}
- private static ItemStack[] replaceArrayWith(
- ItemStack[] stackArray, Materials source, Werkstoff target, Object recipe) {
+ private static ItemStack[] replaceArrayWith(ItemStack[] stackArray, Materials source, Werkstoff target,
+ Object recipe) {
boolean replaced = false;
for (int i = 0; i < stackArray.length; i++) {
ItemStack stack = stackArray[i];
@@ -334,17 +331,16 @@ public class LuVTierEnhancer implements Runnable {
return stack;
}
- private static boolean doStacksContainAndReplace(
- Object recipe, FluidStack[] stacks, FluidStack stack, boolean replace, Fluid... replacement) {
+ private static boolean doStacksContainAndReplace(Object recipe, FluidStack[] stacks, FluidStack stack,
+ boolean replace, Fluid... replacement) {
boolean replaced = false;
for (int i = 0; i < stacks.length; i++) {
- if (GT_Utility.areFluidsEqual(stack, stacks[i]))
- if (!replace) return true;
- else {
- int amount = stacks[i].amount;
- stacks[i] = new FluidStack(replacement[0], amount);
- replaced = true;
- }
+ if (GT_Utility.areFluidsEqual(stack, stacks[i])) if (!replace) return true;
+ else {
+ int amount = stacks[i].amount;
+ stacks[i] = new FluidStack(replacement[0], amount);
+ replaced = true;
+ }
}
if (replace && replaced) {
if (recipe instanceof GT_Recipe) {
@@ -356,8 +352,8 @@ public class LuVTierEnhancer implements Runnable {
return replaced;
}
- private static boolean doStacksContainAndReplace(
- Object recipe, Object[] stacks, ItemStack stack, boolean replace, ItemStack... replacement) {
+ private static boolean doStacksContainAndReplace(Object recipe, Object[] stacks, ItemStack stack, boolean replace,
+ ItemStack... replacement) {
boolean replaced = false;
for (int i = 0; i < stacks.length; i++) {
if (!GT_Utility.isStackValid(stacks[i])) {
@@ -372,13 +368,12 @@ public class LuVTierEnhancer implements Runnable {
}
} else continue;
- } else if (GT_Utility.areStacksEqual(stack, (ItemStack) stacks[i], true))
- if (!replace) return true;
- else {
- int amount = ((ItemStack) stacks[i]).stackSize;
- stacks[i] = BW_Util.setStackSize(replacement[0], amount);
- replaced = true;
- }
+ } else if (GT_Utility.areStacksEqual(stack, (ItemStack) stacks[i], true)) if (!replace) return true;
+ else {
+ int amount = ((ItemStack) stacks[i]).stackSize;
+ stacks[i] = BW_Util.setStackSize(replacement[0], amount);
+ replaced = true;
+ }
}
if (replace && replaced) {
if (recipe instanceof GT_Recipe) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
index 92c6dc696c..1f09532556 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.GT_Enhancement;
@@ -25,6 +16,18 @@ package com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement;
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.*;
import static gregtech.api.enums.OrePrefixes.*;
+import java.lang.reflect.Field;
+import java.util.*;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.*;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.ShapedOreRecipe;
+import net.minecraftforge.oredict.ShapelessOreRecipe;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Items;
@@ -32,6 +35,7 @@ import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.bartworks.util.CachedReflectionUtils;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
@@ -47,28 +51,14 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.blocks.GT_Block_Ores_Abstract;
-import java.lang.reflect.Field;
-import java.util.*;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.*;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.ShapedOreRecipe;
-import net.minecraftforge.oredict.ShapelessOreRecipe;
-import org.apache.commons.lang3.reflect.FieldUtils;
public class PlatinumSludgeOverHaul {
- private static final Materials[] BLACKLIST = {
- Materials.HSSS,
- Materials.EnderiumBase,
- Materials.Osmiridium,
- Materials.get("Uraniumtriplatinid"),
- Materials.get("Tetranaquadahdiindiumhexaplatiumosminid"),
- Materials.get("Longasssuperconductornameforuvwire"),
- };
- private static final OrePrefixes[] OPBLACKLIST = {
- crushedCentrifuged, crushed, crushedPurified, dustPure, dustImpure, dustRefined, dust, dustTiny, dustSmall
- };
+
+ private static final Materials[] BLACKLIST = { Materials.HSSS, Materials.EnderiumBase, Materials.Osmiridium,
+ Materials.get("Uraniumtriplatinid"), Materials.get("Tetranaquadahdiindiumhexaplatiumosminid"),
+ Materials.get("Longasssuperconductornameforuvwire"), };
+ private static final OrePrefixes[] OPBLACKLIST = { crushedCentrifuged, crushed, crushedPurified, dustPure,
+ dustImpure, dustRefined, dust, dustTiny, dustSmall };
private PlatinumSludgeOverHaul() {}
@@ -194,57 +184,55 @@ public class PlatinumSludgeOverHaul {
15);
// base sollution
- for (Werkstoff w : Werkstoff.werkstoffHashSet)
- if (w.containsStuff(Materials.Sulfur)
- && (w.containsStuff(Materials.Copper) || w.containsStuff(Materials.Nickel))) {
- GT_Values.RA.addChemicalRecipe(
- w.get(crushedPurified),
- GT_Utility.getIntegratedCircuit(1),
- AquaRegia.getFluidOrGas(150),
- PTConcentrate.getFluidOrGas(150),
- null,
- 250);
- GT_Values.RA.addChemicalRecipe(
- w.get(crushedPurified, 9),
- GT_Utility.getIntegratedCircuit(9),
- AquaRegia.getFluidOrGas(1350),
- PTConcentrate.getFluidOrGas(1350),
- null,
- 2250);
- GT_Values.RA.addChemicalRecipe(
- w.get(crushedPurified, 9),
- PTMetallicPowder.get(dust, 9),
- AquaRegia.getFluidOrGas(10350),
- PTConcentrate.getFluidOrGas(10350),
- PTResidue.get(dust),
- 2250);
- }
- for (Materials m : Materials.values())
- if (PlatinumSludgeOverHaul.materialsContains(m, Materials.Sulfur)
- && (PlatinumSludgeOverHaul.materialsContains(m, Materials.Copper)
- || PlatinumSludgeOverHaul.materialsContains(m, Materials.Nickel))) {
- GT_Values.RA.addChemicalRecipe(
- GT_OreDictUnificator.get(crushedPurified, m, 1),
- GT_Utility.getIntegratedCircuit(1),
- AquaRegia.getFluidOrGas(150),
- PTConcentrate.getFluidOrGas(150),
- null,
- 250);
- GT_Values.RA.addChemicalRecipe(
- GT_OreDictUnificator.get(crushedPurified, m, 9),
- GT_Utility.getIntegratedCircuit(9),
- AquaRegia.getFluidOrGas(1350),
- PTConcentrate.getFluidOrGas(1350),
- null,
- 2250);
- GT_Values.RA.addChemicalRecipe(
- GT_OreDictUnificator.get(crushedPurified, m, 9),
- PTMetallicPowder.get(dust, 9),
- AquaRegia.getFluidOrGas(10350),
- PTConcentrate.getFluidOrGas(10350),
- PTResidue.get(dust),
- 2250);
- }
+ for (Werkstoff w : Werkstoff.werkstoffHashSet) if (w.containsStuff(Materials.Sulfur)
+ && (w.containsStuff(Materials.Copper) || w.containsStuff(Materials.Nickel))) {
+ GT_Values.RA.addChemicalRecipe(
+ w.get(crushedPurified),
+ GT_Utility.getIntegratedCircuit(1),
+ AquaRegia.getFluidOrGas(150),
+ PTConcentrate.getFluidOrGas(150),
+ null,
+ 250);
+ GT_Values.RA.addChemicalRecipe(
+ w.get(crushedPurified, 9),
+ GT_Utility.getIntegratedCircuit(9),
+ AquaRegia.getFluidOrGas(1350),
+ PTConcentrate.getFluidOrGas(1350),
+ null,
+ 2250);
+ GT_Values.RA.addChemicalRecipe(
+ w.get(crushedPurified, 9),
+ PTMetallicPowder.get(dust, 9),
+ AquaRegia.getFluidOrGas(10350),
+ PTConcentrate.getFluidOrGas(10350),
+ PTResidue.get(dust),
+ 2250);
+ }
+ for (Materials m : Materials.values()) if (PlatinumSludgeOverHaul.materialsContains(m, Materials.Sulfur)
+ && (PlatinumSludgeOverHaul.materialsContains(m, Materials.Copper)
+ || PlatinumSludgeOverHaul.materialsContains(m, Materials.Nickel))) {
+ GT_Values.RA.addChemicalRecipe(
+ GT_OreDictUnificator.get(crushedPurified, m, 1),
+ GT_Utility.getIntegratedCircuit(1),
+ AquaRegia.getFluidOrGas(150),
+ PTConcentrate.getFluidOrGas(150),
+ null,
+ 250);
+ GT_Values.RA.addChemicalRecipe(
+ GT_OreDictUnificator.get(crushedPurified, m, 9),
+ GT_Utility.getIntegratedCircuit(9),
+ AquaRegia.getFluidOrGas(1350),
+ PTConcentrate.getFluidOrGas(1350),
+ null,
+ 2250);
+ GT_Values.RA.addChemicalRecipe(
+ GT_OreDictUnificator.get(crushedPurified, m, 9),
+ PTMetallicPowder.get(dust, 9),
+ AquaRegia.getFluidOrGas(10350),
+ PTConcentrate.getFluidOrGas(10350),
+ PTResidue.get(dust),
+ 2250);
+ }
// Pt
GT_Values.RA.addBlastRecipe(
PTMetallicPowder.get(dust, 3),
@@ -286,43 +274,27 @@ public class PlatinumSludgeOverHaul {
1200,
30);
GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] {GT_Utility.getIntegratedCircuit(1)},
- new FluidStack[] {PTConcentrate.getFluidOrGas(2000), AmmoniumChloride.getFluidOrGas(400)},
- new FluidStack[] {
- PDAmmonia.getFluidOrGas(400),
- Materials.NitrogenDioxide.getGas(1000),
- Materials.DilutedSulfuricAcid.getFluid(1000)
- },
- new ItemStack[] {PTSaltCrude.get(dustTiny, 16), PTRawPowder.get(dustTiny, 4)},
+ new ItemStack[] { GT_Utility.getIntegratedCircuit(1) },
+ new FluidStack[] { PTConcentrate.getFluidOrGas(2000), AmmoniumChloride.getFluidOrGas(400) },
+ new FluidStack[] { PDAmmonia.getFluidOrGas(400), Materials.NitrogenDioxide.getGas(1000),
+ Materials.DilutedSulfuricAcid.getFluid(1000) },
+ new ItemStack[] { PTSaltCrude.get(dustTiny, 16), PTRawPowder.get(dustTiny, 4) },
1200,
30);
GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] {GT_Utility.getIntegratedCircuit(2)},
- new FluidStack[] {PTConcentrate.getFluidOrGas(18000), AmmoniumChloride.getFluidOrGas(3600)},
- new FluidStack[] {
- PDAmmonia.getFluidOrGas(3600),
- Materials.NitrogenDioxide.getGas(9000),
- Materials.DilutedSulfuricAcid.getFluid(9000)
- },
- new ItemStack[] {PTSaltCrude.get(dust, 16), PTRawPowder.get(dust, 4)},
+ new ItemStack[] { GT_Utility.getIntegratedCircuit(2) },
+ new FluidStack[] { PTConcentrate.getFluidOrGas(18000), AmmoniumChloride.getFluidOrGas(3600) },
+ new FluidStack[] { PDAmmonia.getFluidOrGas(3600), Materials.NitrogenDioxide.getGas(9000),
+ Materials.DilutedSulfuricAcid.getFluid(9000) },
+ new ItemStack[] { PTSaltCrude.get(dust, 16), PTRawPowder.get(dust, 4) },
1400,
240);
GT_Values.RA.addSifterRecipe(
PTSaltCrude.get(dust),
- new ItemStack[] {
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- PTSaltRefined.get(dust),
- },
- new int[] {
- 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500,
- },
+ new ItemStack[] { PTSaltRefined.get(dust), PTSaltRefined.get(dust), PTSaltRefined.get(dust),
+ PTSaltRefined.get(dust), PTSaltRefined.get(dust), PTSaltRefined.get(dust),
+ PTSaltRefined.get(dust), PTSaltRefined.get(dust), PTSaltRefined.get(dust), },
+ new int[] { 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500, },
600,
30);
GT_Values.RA.addBlastRecipe(
@@ -369,23 +341,18 @@ public class PlatinumSludgeOverHaul {
PDRawPowder.get(dust, 2),
2250);
GT_Values.RA.addChemicalRecipe(
- GT_Utility.getIntegratedCircuit(2), null, PDAmmonia.getFluidOrGas(1000), null, PDSalt.get(dust), 250);
+ GT_Utility.getIntegratedCircuit(2),
+ null,
+ PDAmmonia.getFluidOrGas(1000),
+ null,
+ PDSalt.get(dust),
+ 250);
GT_Values.RA.addSifterRecipe(
PDSalt.get(dust),
- new ItemStack[] {
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- PDMetallicPowder.get(dust),
- },
- new int[] {
- 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500,
- },
+ new ItemStack[] { PDMetallicPowder.get(dust), PDMetallicPowder.get(dust), PDMetallicPowder.get(dust),
+ PDMetallicPowder.get(dust), PDMetallicPowder.get(dust), PDMetallicPowder.get(dust),
+ PDMetallicPowder.get(dust), PDMetallicPowder.get(dust), PDMetallicPowder.get(dust), },
+ new int[] { 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500, },
600,
30);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(
@@ -398,12 +365,11 @@ public class PlatinumSludgeOverHaul {
250,
30);
GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] {PDRawPowder.get(dust, 4)},
- new FluidStack[] {FormicAcid.getFluidOrGas(4000)},
- new FluidStack[] {
- Materials.Ammonia.getGas(4000), Materials.Ethylene.getGas(1000), Materials.Water.getFluid(1000)
- },
- new ItemStack[] {Materials.Palladium.getDust(2)},
+ new ItemStack[] { PDRawPowder.get(dust, 4) },
+ new FluidStack[] { FormicAcid.getFluidOrGas(4000) },
+ new FluidStack[] { Materials.Ammonia.getGas(4000), Materials.Ethylene.getGas(1000),
+ Materials.Water.getFluid(1000) },
+ new ItemStack[] { Materials.Palladium.getDust(2) },
250,
30);
// Na2SO4 + 2H = 2Na + H2SO4
@@ -463,7 +429,7 @@ public class PlatinumSludgeOverHaul {
480);
GT_Values.RA.addDistillationTowerRecipe(
HotRutheniumTetroxideSollution.getFluidOrGas(9000),
- new FluidStack[] {Materials.Water.getFluid(1800), RutheniumTetroxide.getFluidOrGas(7200)},
+ new FluidStack[] { Materials.Water.getFluid(1800), RutheniumTetroxide.getFluidOrGas(7200) },
Materials.Salt.getDust(6),
1500,
480);
@@ -489,7 +455,7 @@ public class PlatinumSludgeOverHaul {
775);
GT_Values.RA.addDistillationTowerRecipe(
AcidicOsmiumSolution.getFluidOrGas(1000),
- new FluidStack[] {OsmiumSolution.getFluidOrGas(100), Materials.Water.getFluid(900)},
+ new FluidStack[] { OsmiumSolution.getFluidOrGas(100), Materials.Water.getFluid(900) },
null,
150,
BW_Util.getMachineVoltageFromTier(5));
@@ -550,10 +516,10 @@ public class PlatinumSludgeOverHaul {
300,
30);
GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] {GT_Utility.getIntegratedCircuit(3)},
- new FluidStack[] {Materials.Water.getFluid(36000), RHSulfate.getFluidOrGas(39600)},
- new FluidStack[] {Materials.Potassium.getMolten(7200), RHSulfateSolution.getFluidOrGas(39600)},
- new ItemStack[] {LeachResidue.get(dust, 4)},
+ new ItemStack[] { GT_Utility.getIntegratedCircuit(3) },
+ new FluidStack[] { Materials.Water.getFluid(36000), RHSulfate.getFluidOrGas(39600) },
+ new FluidStack[] { Materials.Potassium.getMolten(7200), RHSulfateSolution.getFluidOrGas(39600) },
+ new ItemStack[] { LeachResidue.get(dust, 4) },
1200,
30);
@@ -604,20 +570,10 @@ public class PlatinumSludgeOverHaul {
60);
GT_Values.RA.addSifterRecipe(
RHNitrate.get(dust),
- new ItemStack[] {
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- RhFilterCake.get(dust),
- },
- new int[] {
- 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500,
- },
+ new ItemStack[] { RhFilterCake.get(dust), RhFilterCake.get(dust), RhFilterCake.get(dust),
+ RhFilterCake.get(dust), RhFilterCake.get(dust), RhFilterCake.get(dust), RhFilterCake.get(dust),
+ RhFilterCake.get(dust), RhFilterCake.get(dust), },
+ new int[] { 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500, },
600,
30);
GT_Values.RA.addMixerRecipe(
@@ -654,7 +610,7 @@ public class PlatinumSludgeOverHaul {
return false;
}
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public static void replacePureElements() {
// furnace
for (Object entry : FurnaceRecipes.smelting().getSmeltingList().entrySet()) {
@@ -666,72 +622,79 @@ public class PlatinumSludgeOverHaul {
|| !association.mMaterial.mMaterial.equals(Materials.Platinum))
if (GT_Utility.isStackValid(realEntry.getValue())
&& BW_Util.checkStackAndPrefix((ItemStack) realEntry.getValue())) {
- ItemData ass = GT_OreDictUnificator.getAssociation((ItemStack) realEntry.getValue());
- if (ass.mMaterial.mMaterial.equals(Materials.Platinum))
- if (!PlatinumSludgeOverHaul.isInBlackList((ItemStack) realEntry.getKey()))
- realEntry.setValue(PTMetallicPowder.get(
- ass.mPrefix == nugget ? dustTiny : dust,
- ((ItemStack) realEntry.getValue()).stackSize * 2));
- else if (ass.mMaterial.mMaterial.equals(Materials.Palladium))
- if (!PlatinumSludgeOverHaul.isInBlackList((ItemStack) realEntry.getKey()))
- realEntry.setValue(PDMetallicPowder.get(
- ass.mPrefix == nugget ? dustTiny : dust,
- ((ItemStack) realEntry.getValue()).stackSize * 2));
- }
+ ItemData ass = GT_OreDictUnificator.getAssociation((ItemStack) realEntry.getValue());
+ if (ass.mMaterial.mMaterial.equals(Materials.Platinum))
+ if (!PlatinumSludgeOverHaul.isInBlackList((ItemStack) realEntry.getKey()))
+ realEntry.setValue(
+ PTMetallicPowder.get(
+ ass.mPrefix == nugget ? dustTiny : dust,
+ ((ItemStack) realEntry.getValue()).stackSize * 2));
+ else if (ass.mMaterial.mMaterial.equals(Materials.Palladium))
+ if (!PlatinumSludgeOverHaul.isInBlackList((ItemStack) realEntry.getKey()))
+ realEntry.setValue(
+ PDMetallicPowder.get(
+ ass.mPrefix == nugget ? dustTiny : dust,
+ ((ItemStack) realEntry.getValue()).stackSize * 2));
+ }
}
}
// vanilla crafting
CraftingManager.getInstance().getRecipeList().forEach(PlatinumSludgeOverHaul::setnewMaterialInRecipe);
// gt crafting
try {
- ((List<IRecipe>) FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true)
- .get(null))
+ ((List<IRecipe>) FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true).get(null))
.forEach(PlatinumSludgeOverHaul::setnewMaterialInRecipe);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
// gt machines
- maploop:
- for (GT_Recipe.GT_Recipe_Map map : GT_Recipe.GT_Recipe_Map.sMappings) {
- if (map == GT_Recipe.GT_Recipe_Map.sFusionRecipes
- || map == GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes
- || map == GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes) continue;
+ maploop: for (GT_Recipe.GT_Recipe_Map map : GT_Recipe.GT_Recipe_Map.sMappings) {
+ if (map == GT_Recipe.GT_Recipe_Map.sFusionRecipes || map == GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes
+ || map == GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes)
+ continue;
HashSet<GT_Recipe> toDel = new HashSet<>();
- recipeloop:
- for (GT_Recipe recipe : map.mRecipeList) {
+ recipeloop: for (GT_Recipe recipe : map.mRecipeList) {
if (recipe.mFakeRecipe) continue maploop;
for (int i = 0; i < recipe.mFluidOutputs.length; i++) {
if (map.equals(GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes)) continue maploop;
else if (map.equals(GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes)
|| map.equals(GT_Recipe.GT_Recipe_Map.sChemicalRecipes)) {
- if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])) {
- recipe.mFluidOutputs[i] = AcidicIridiumSolution.getFluidOrGas(1000);
- recipe.reloadOwner();
- } else if (GT_Utility.areFluidsEqual(
- Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i])) {
- recipe.mFluidOutputs[i] = PTConcentrate.getFluidOrGas(1000);
- recipe.reloadOwner();
- } else if (GT_Utility.areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i])) {
- recipe.mFluidOutputs[i] = AcidicOsmiumSolution.getFluidOrGas(1000);
- recipe.reloadOwner();
- }
- } else {
- if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- else if (GT_Utility.areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i]))
- toDel.add(recipe);
- }
+ if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility
+ .areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])) {
+ recipe.mFluidOutputs[i] = AcidicIridiumSolution.getFluidOrGas(1000);
+ recipe.reloadOwner();
+ } else
+ if (GT_Utility
+ .areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i])) {
+ recipe.mFluidOutputs[i] = PTConcentrate.getFluidOrGas(1000);
+ recipe.reloadOwner();
+ } else
+ if (GT_Utility.areFluidsEqual(
+ Materials.Osmium.getMolten(1),
+ recipe.mFluidOutputs[i])) {
+ recipe.mFluidOutputs[i] = AcidicOsmiumSolution.getFluidOrGas(1000);
+ recipe.reloadOwner();
+ }
+ } else {
+ if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility
+ .areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility
+ .areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ else if (GT_Utility
+ .areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i]))
+ toDel.add(recipe);
+ }
}
for (int i = 0; i < recipe.mOutputs.length; i++) {
if (!GT_Utility.isStackValid(recipe.mOutputs[i])) continue;
@@ -759,135 +722,112 @@ public class PlatinumSludgeOverHaul {
}
if (!BW_Util.checkStackAndPrefix(recipe.mOutputs[i])) continue;
// Pt
- if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mMaterial
- .mMaterial
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mMaterial.mMaterial
.equals(Materials.Platinum)) {
for (int j = 0; j < recipe.mInputs.length; j++) {
if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j])) continue recipeloop;
}
- if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dust)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustImpure)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustPure)) {
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dust)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dustImpure)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dustPure)) {
int amount = recipe.mOutputs[i].stackSize;
recipe.mOutputs[i] = BW_Util.setStackSize(PTMetallicPowder.get(dust), amount * 2);
recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustSmall)) {
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dustSmall)) {
int amount = recipe.mOutputs[i].stackSize;
recipe.mOutputs[i] = BW_Util.setStackSize(PTMetallicPowder.get(dustSmall), amount * 2);
recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustTiny)) {
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dustTiny)) {
int amount = recipe.mOutputs[i].stackSize;
recipe.mOutputs[i] = BW_Util.setStackSize(PTMetallicPowder.get(dustTiny), amount * 2);
recipe.reloadOwner();
}
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mMaterial
- .mMaterial
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mMaterial.mMaterial
.equals(Materials.Palladium)) {
- for (int j = 0; j < recipe.mInputs.length; j++) {
- if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j])) continue recipeloop;
- }
- if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dust)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustImpure)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustPure)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(PDMetallicPowder.get(dust), amount * 4);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustSmall)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(PDMetallicPowder.get(dustSmall), amount * 4);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustTiny)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(PDMetallicPowder.get(dustTiny), amount * 4);
- recipe.reloadOwner();
- }
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mMaterial
- .mMaterial
- .equals(Materials.Osmium)) {
- for (int j = 0; j < recipe.mInputs.length; j++) {
- if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j])) continue recipeloop;
- }
- if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dust)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustImpure)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustPure)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrOsLeachResidue.get(dust), amount);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustSmall)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrOsLeachResidue.get(dustSmall), amount);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustTiny)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrOsLeachResidue.get(dustTiny), amount);
- recipe.reloadOwner();
- }
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mMaterial
- .mMaterial
- .equals(Materials.Iridium)) {
- for (int j = 0; j < recipe.mInputs.length; j++) {
- if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j])) continue recipeloop;
- }
- if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dust)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustImpure)
- || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustPure)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrLeachResidue.get(dust), amount);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustSmall)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrLeachResidue.get(dustSmall), amount);
- recipe.reloadOwner();
- } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i])
- .mPrefix
- .equals(dustTiny)) {
- int amount = recipe.mOutputs[i].stackSize;
- recipe.mOutputs[i] = BW_Util.setStackSize(IrLeachResidue.get(dustTiny), amount);
- recipe.reloadOwner();
- }
- }
+ for (int j = 0; j < recipe.mInputs.length; j++) {
+ if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j])) continue recipeloop;
+ }
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dust)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustImpure)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustPure)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(PDMetallicPowder.get(dust), amount * 4);
+ recipe.reloadOwner();
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustSmall)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(PDMetallicPowder.get(dustSmall), amount * 4);
+ recipe.reloadOwner();
+ } else
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustTiny)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(PDMetallicPowder.get(dustTiny), amount * 4);
+ recipe.reloadOwner();
+ }
+ } else
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mMaterial.mMaterial
+ .equals(Materials.Osmium)) {
+ for (int j = 0; j < recipe.mInputs.length; j++) {
+ if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j]))
+ continue recipeloop;
+ }
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dust)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustImpure)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustPure)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(IrOsLeachResidue.get(dust), amount);
+ recipe.reloadOwner();
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustSmall)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrOsLeachResidue.get(dustSmall), amount);
+ recipe.reloadOwner();
+ } else
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustTiny)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrOsLeachResidue.get(dustTiny), amount);
+ recipe.reloadOwner();
+ }
+ } else
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mMaterial.mMaterial
+ .equals(Materials.Iridium)) {
+ for (int j = 0; j < recipe.mInputs.length; j++) {
+ if (PlatinumSludgeOverHaul.isInBlackList(recipe.mInputs[j]))
+ continue recipeloop;
+ }
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix.equals(dust)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustImpure)
+ || GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustPure)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(IrLeachResidue.get(dust), amount);
+ recipe.reloadOwner();
+ } else if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustSmall)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrLeachResidue.get(dustSmall), amount);
+ recipe.reloadOwner();
+ } else
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix
+ .equals(dustTiny)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrLeachResidue.get(dustTiny), amount);
+ recipe.reloadOwner();
+ }
+ }
}
}
map.mRecipeList.removeAll(toDel);
@@ -936,10 +876,8 @@ public class PlatinumSludgeOverHaul {
inputItemName = "recipeItems";
} else if (LoaderReference.miscutils) {
try {
- if (Class.forName("gtPlusPlus.api.objects.minecraft.ShapedRecipe")
- .isAssignableFrom(obj.getClass()))
- obj = CachedReflectionUtils.getField(obj.getClass(), "mRecipe")
- .get(obj);
+ if (Class.forName("gtPlusPlus.api.objects.minecraft.ShapedRecipe").isAssignableFrom(obj.getClass()))
+ obj = CachedReflectionUtils.getField(obj.getClass(), "mRecipe").get(obj);
} catch (ClassNotFoundException | IllegalAccessException e) {
e.printStackTrace();
}
@@ -995,7 +933,7 @@ public class PlatinumSludgeOverHaul {
}
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
private static boolean checkRecipe(Object input, Materials mat) {
if (input instanceof List || input instanceof Object[]) {
Set lists = new HashSet(), stacks = new HashSet();
@@ -1026,10 +964,7 @@ public class PlatinumSludgeOverHaul {
for (Object stack : stacks) {
if (stack instanceof ItemStack) {
allSame = BW_Util.checkStackAndPrefix((ItemStack) stack)
- && GT_OreDictUnificator.getAssociation((ItemStack) stack)
- .mMaterial
- .mMaterial
- .equals(mat);
+ && GT_OreDictUnificator.getAssociation((ItemStack) stack).mMaterial.mMaterial.equals(mat);
} else {
allSame = false;
break;
@@ -1052,20 +987,21 @@ public class PlatinumSludgeOverHaul {
if (GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId.equals("dreamcraft")
&& !stack.getUnlocalizedName().contains("dust")
- && !stack.getUnlocalizedName().contains("Dust")) return true;
+ && !stack.getUnlocalizedName().contains("Dust"))
+ return true;
if (Block.getBlockFromItem(stack.getItem()) instanceof GT_Generic_Block
- && !(Block.getBlockFromItem(stack.getItem()) instanceof GT_Block_Ores_Abstract)) return true;
+ && !(Block.getBlockFromItem(stack.getItem()) instanceof GT_Block_Ores_Abstract))
+ return true;
- if (Arrays.stream(ItemList.values())
- .filter(ItemList::hasBeenSet)
+ if (Arrays.stream(ItemList.values()).filter(ItemList::hasBeenSet)
.anyMatch(e -> !BW_Util.checkStackAndPrefix(stack) && GT_Utility.areStacksEqual(e.get(1), stack, true)))
return true;
if (stack.getItem() instanceof GT_Generic_Item) {
if (!BW_Util.checkStackAndPrefix(stack)) return false;
return (!Arrays.asList(PlatinumSludgeOverHaul.OPBLACKLIST)
- .contains(GT_OreDictUnificator.getAssociation(stack).mPrefix))
+ .contains(GT_OreDictUnificator.getAssociation(stack).mPrefix))
|| Arrays.asList(PlatinumSludgeOverHaul.BLACKLIST)
.contains(GT_OreDictUnificator.getAssociation(stack).mMaterial.mMaterial);
}
@@ -1073,12 +1009,13 @@ public class PlatinumSludgeOverHaul {
if (LoaderReference.miscutils) {
try {
if (Class.forName("gtPlusPlus.core.item.base.BaseItemComponent")
- .isAssignableFrom(stack.getItem().getClass())
+ .isAssignableFrom(stack.getItem().getClass())
&& !(stack.getUnlocalizedName().contains("dust")
- || stack.getUnlocalizedName().contains("Dust"))) return true;
+ || stack.getUnlocalizedName().contains("Dust")))
+ return true;
if (Class.forName("gtPlusPlus.core.block.base.BlockBaseModular")
- .isAssignableFrom(
- Block.getBlockFromItem(stack.getItem()).getClass())) return true;
+ .isAssignableFrom(Block.getBlockFromItem(stack.getItem()).getClass()))
+ return true;
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java
index 9de2ff0549..779183e439 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material;
@@ -25,6 +16,13 @@ package com.github.bartimaeusnek.bartworks.system.material;
import static net.minecraft.util.EnumChatFormatting.DARK_PURPLE;
import static net.minecraft.util.EnumChatFormatting.GREEN;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.ByteBuffer;
+import java.util.*;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.StaticRecipeChangeLoaders;
import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
@@ -32,6 +30,7 @@ import com.github.bartimaeusnek.bartworks.util.*;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import com.github.bartimaeusnek.crossmod.tgregworks.MaterialsInjector;
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+
import cpw.mods.fml.common.Loader;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
@@ -39,11 +38,6 @@ import gregtech.api.interfaces.IColorModulationContainer;
import gregtech.api.interfaces.ISubTagContainer;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_OreDictUnificator;
-import java.lang.reflect.InvocationTargetException;
-import java.nio.ByteBuffer;
-import java.util.*;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("ALL")
public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
@@ -53,19 +47,20 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public static final LinkedHashMap<String, Werkstoff> werkstoffNameHashMap = new LinkedHashMap<>();
public static final Map<String, String> modNameOverrides = new HashMap() {
+
{
put("GalaxySpace", DARK_PURPLE + "GalaxySpace");
}
};
- private static final List<String> BWModNames =
- Arrays.asList(MainMod.NAME, BartWorksCrossmod.NAME, MaterialsInjector.NAME);
+ private static final List<String> BWModNames = Arrays
+ .asList(MainMod.NAME, BartWorksCrossmod.NAME, MaterialsInjector.NAME);
private static final HashSet<Short> idHashSet = new HashSet<>();
private static final Werkstoff.Stats DEFAULT_NULL_STATS = new Werkstoff.Stats();
- private static final Werkstoff.GenerationFeatures DEFAULT_NULL_GENERATION_FEATURES =
- new Werkstoff.GenerationFeatures().disable();
+ private static final Werkstoff.GenerationFeatures DEFAULT_NULL_GENERATION_FEATURES = new Werkstoff.GenerationFeatures()
+ .disable();
public static Werkstoff default_null_Werkstoff;
private final HashSet<String> ADDITIONAL_OREDICT = new HashSet<>();
@@ -106,10 +101,11 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
/**
* GT Materials Bridge Constructor
- * @param materials a GT Materials
+ *
+ * @param materials a GT Materials
* @param generationFeatures the new Types you want to add
- * @param type - self explainatory
- * @param mID > 31_766 && <= 32_767
+ * @param type - self explainatory
+ * @param mID > 31_766 && <= 32_767
*/
public Werkstoff(Materials materials, Werkstoff.GenerationFeatures generationFeatures, Types type, int mID) {
this(
@@ -143,14 +139,8 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Types type,
- int meltingpoint,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, int meltingpoint,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
Pair<ISubTagContainer, Integer>... contents) {
this(
rgba,
@@ -163,13 +153,8 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
contents);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
Pair<ISubTagContainer, Integer>... contents) {
this(
rgba,
@@ -182,16 +167,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
contents);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Types type,
- int meltingpoint,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
- List<ISubTagContainer> oreByProduct,
- Pair<ISubTagContainer, Integer>... contents) {
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, int meltingpoint,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(
rgba,
defaultName,
@@ -204,15 +182,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
contents);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
- List<ISubTagContainer> oreByProduct,
- Pair<ISubTagContainer, Integer>... contents) {
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(
rgba,
defaultName,
@@ -225,16 +197,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
contents);
}
- public Werkstoff(
- short[] rgba,
- String toolTip,
- String defaultName,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
- List<ISubTagContainer> oreByProduct,
- Pair<ISubTagContainer, Integer>... contents) {
+ public Werkstoff(short[] rgba, String toolTip, String defaultName, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(
rgba,
toolTip,
@@ -248,58 +213,30 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
contents);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Stats stats,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
- List<ISubTagContainer> oreByProduct,
- Pair<ISubTagContainer, Integer>... contents) {
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Stats stats, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(rgba, defaultName, "", stats, type, generationFeatures, mID, texSet, contents);
this.mOreByProducts.clear();
this.mOreByProducts.addAll(oreByProduct);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- Werkstoff.Stats stats,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Stats stats, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
Pair<ISubTagContainer, Integer>... contents) {
this(rgba, defaultName, "", stats, type, generationFeatures, mID, texSet, contents);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- String toolTip,
- Werkstoff.Stats stats,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
- List<ISubTagContainer> oreByProduct,
- Pair<ISubTagContainer, Integer>... contents) {
+ public Werkstoff(short[] rgba, String defaultName, String toolTip, Werkstoff.Stats stats, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(rgba, defaultName, toolTip, stats, type, generationFeatures, mID, texSet, contents);
this.mOreByProducts.clear();
this.mOreByProducts.addAll(oreByProduct);
}
- public Werkstoff(
- short[] rgba,
- String defaultName,
- String toolTip,
- Werkstoff.Stats stats,
- Werkstoff.Types type,
- Werkstoff.GenerationFeatures generationFeatures,
- int mID,
- TextureSet texSet,
+ public Werkstoff(short[] rgba, String defaultName, String toolTip, Werkstoff.Stats stats, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
Pair<ISubTagContainer, Integer>... contents) {
if (Werkstoff.idHashSet.contains((short) mID))
@@ -310,9 +247,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
this.mID = (short) mID;
this.defaultName = defaultName;
// Ensure that localization key are written to the lang file
- GregTech_API.sAfterGTPreload.add(() -> {
- this.getLocalizedName();
- });
+ GregTech_API.sAfterGTPreload.add(() -> { this.getLocalizedName(); });
this.stats = stats;
this.type = type;
this.generationFeatures = generationFeatures;
@@ -324,38 +259,35 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
if (contents.length > 1) {
if (p.getKey() instanceof Materials) {
if (((Materials) p.getKey()).mMaterialList.size() > 1 && p.getValue() > 1)
- this.toolTip += "(" + getFormula((Materials) p.getKey()) + ")"
+ this.toolTip += "(" + getFormula((Materials) p.getKey())
+ + ")"
+ (BW_Util.subscriptNumber(p.getValue()));
- else
- this.toolTip += getFormula((Materials) p.getKey())
- + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
+ else this.toolTip += getFormula((Materials) p.getKey())
+ + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
}
if (p.getKey() instanceof Werkstoff) {
if (((Werkstoff) p.getKey()).CONTENTS.size() > 1 && p.getValue() > 1)
- this.toolTip += "(" + getFormula((Werkstoff) p.getKey()) + ")"
+ this.toolTip += "(" + getFormula((Werkstoff) p.getKey())
+ + ")"
+ (BW_Util.subscriptNumber(p.getValue()));
- else
- this.toolTip += getFormula((Werkstoff) p.getKey())
- + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
+ else this.toolTip += getFormula((Werkstoff) p.getKey())
+ + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
}
} else {
if (p.getKey() instanceof Materials) {
this.toolTip += getFormula((Materials) p.getKey())
+ (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
- } else if (p.getKey() instanceof Werkstoff)
- this.toolTip += getFormula((Werkstoff) p.getKey())
- + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
+ } else if (p.getKey() instanceof Werkstoff) this.toolTip += getFormula((Werkstoff) p.getKey())
+ + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : "");
}
}
} else this.toolTip = toolTip;
- // if (this.toolTip.length() > 25)
- // this.toolTip = "The formula is to long...";
+ // if (this.toolTip.length() > 25)
+ // this.toolTip = "The formula is to long...";
// Ensure that localization key are written to the lang file
- GregTech_API.sAfterGTPreload.add(() -> {
- this.getLocalizedToolTip();
- });
+ GregTech_API.sAfterGTPreload.add(() -> { this.getLocalizedToolTip(); });
if (this.stats.protons == 0) {
long tmpprotons = 0;
@@ -447,8 +379,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
if (p.getKey() instanceof Materials) tc_aspectStacks.addAll(((Materials) p.getKey()).mAspects);
if (p.getKey() instanceof Werkstoff) set.addAll(Arrays.asList(((Werkstoff) p.getKey()).getTCAspects()));
}
- tc_aspectStacks.forEach(tc_aspectStack ->
- set.add(new Pair<>(tc_aspectStack.mAspect.mAspect, (int) tc_aspectStack.mAmount)));
+ tc_aspectStacks.forEach(
+ tc_aspectStack -> set
+ .add(new Pair<>(tc_aspectStack.mAspect.mAspect, (int) tc_aspectStack.mAmount)));
this.stats.mTC_Aspects = set.toArray(new Pair[0]);
}
Pair<Object, Integer>[] ret = this.stats.mTC_Aspects.clone();
@@ -463,13 +396,11 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
Arrays.stream(getTCAspects()).forEach(objectIntegerPair -> {
try {
new TC_Aspects.TC_AspectStack(
- TC_Aspects.valueOf(((String) ThaumcraftHandler.AspectAdder.getName.invoke(
- objectIntegerPair.getKey()))
+ TC_Aspects.valueOf(
+ ((String) ThaumcraftHandler.AspectAdder.getName.invoke(objectIntegerPair.getKey()))
.toUpperCase(Locale.US)),
- objectIntegerPair.getValue())
- .addToAspectList(ret);
- } catch (IllegalAccessException | InvocationTargetException ignored) {
- }
+ objectIntegerPair.getValue()).addToAspectList(ret);
+ } catch (IllegalAccessException | InvocationTargetException ignored) {}
});
return ret;
}
@@ -538,7 +469,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public String getLocalizedName() {
return GT_LanguageManager.addStringLocalization(
- String.format("bw.werkstoff.%05d.name", this.mID), defaultName, !GregTech_API.sPostloadFinished);
+ String.format("bw.werkstoff.%05d.name", this.mID),
+ defaultName,
+ !GregTech_API.sPostloadFinished);
}
public String getVarName() {
@@ -551,7 +484,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public String getLocalizedToolTip() {
return GT_LanguageManager.addStringLocalization(
- String.format("bw.werkstoff.%05d.tooltip", this.mID), toolTip, !GregTech_API.sPostloadFinished);
+ String.format("bw.werkstoff.%05d.tooltip", this.mID),
+ toolTip,
+ !GregTech_API.sPostloadFinished);
}
public Werkstoff.Stats getStats() {
@@ -575,21 +510,19 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public void setRgb(short[] rgb) {
- this.rgb = new byte[] {(byte) (rgb[0] - 128), (byte) (rgb[1] - 128), (byte) (rgb[2] - 128)};
+ this.rgb = new byte[] { (byte) (rgb[0] - 128), (byte) (rgb[1] - 128), (byte) (rgb[2] - 128) };
}
@Override
public short[] getRGBA() {
- return new short[] {(short) (this.rgb[0] + 128), (short) (this.rgb[1] + 128), (short) (this.rgb[2] + 128), 0};
+ return new short[] { (short) (this.rgb[0] + 128), (short) (this.rgb[1] + 128), (short) (this.rgb[2] + 128), 0 };
}
@Override
public boolean contains(SubTag subTag) {
- if (!subTag.equals(WerkstoffLoader.NOBLE_GAS)
- && !subTag.equals(WerkstoffLoader.ANAEROBE_GAS)
+ if (!subTag.equals(WerkstoffLoader.NOBLE_GAS) && !subTag.equals(WerkstoffLoader.ANAEROBE_GAS)
&& !subTag.equals(WerkstoffLoader.NO_BLAST))
- for (Pair<ISubTagContainer, Integer> p : this.CONTENTS)
- if (p.getKey().contains(subTag)) return true;
+ for (Pair<ISubTagContainer, Integer> p : this.CONTENTS) if (p.getKey().contains(subTag)) return true;
return this.SUBTAGS.contains(subTag);
}
@@ -625,23 +558,20 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public byte getToolQuality() {
- return this.stats.getQualityOverride() > 0
- ? this.stats.getQualityOverride()
- : (byte) ((15f
- * (((float) this.getStats().getProtons() / 188f)
- + (float) this.getStats().getMeltingPoint() / 10801f))
- / (float) this.getContents().getKey());
+ return this.stats
+ .getQualityOverride() > 0
+ ? this.stats.getQualityOverride()
+ : (byte) ((15f * (((float) this.getStats().getProtons() / 188f)
+ + (float) this.getStats().getMeltingPoint() / 10801f))
+ / (float) this.getContents().getKey());
}
public float getToolSpeed() {
- return this.stats.getSpeedOverride() > 0f
- ? this.stats.getSpeedOverride()
+ return this.stats.getSpeedOverride() > 0f ? this.stats.getSpeedOverride()
: Math.max(
1f,
- 2f
- * ((float) -this.getStats().getMass()
- + 0.1f * (float) this.getStats().getMeltingPoint()
- + (float) this.getStats().getProtons())
+ 2f * ((float) -this.getStats().getMass() + 0.1f * (float) this.getStats().getMeltingPoint()
+ + (float) this.getStats().getProtons())
* 0.1f
/ (float) this.getContents().getKey()
* 0.1f
@@ -649,12 +579,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public int getDurability() {
- return this.stats.getDurOverride() > 0
- ? this.stats.getDurOverride()
+ return this.stats.getDurOverride() > 0 ? this.stats.getDurOverride()
: (int) (this.stats.durMod
- * ((0.01f
- * (float) this.getStats().getMeltingPoint()
- * (float) this.getStats().getMass())
+ * ((0.01f * (float) this.getStats().getMeltingPoint() * (float) this.getStats().getMass())
/ (float) this.getContents().getKey()));
}
@@ -668,7 +595,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
/**
- * DOES NOT CHECK BLACKLIST!
+ * DOES NOT CHECK BLACKLIST!
*/
public boolean hasGenerationFeature(OrePrefixes prefixes) {
int unpacked = Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes);
@@ -698,6 +625,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public enum Types {
+
MATERIAL,
COMPOUND,
MIXTURE,
@@ -720,20 +648,14 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
public static class GenerationFeatures {
+
public static final GenerationFeatures DISABLED = new GenerationFeatures().disable();
long toGenerate = 0b0001001;
// logic gate shit
/*
- dust 1
- metal 10 (ingot, nugget)
- gem 100
- ore 1000
- cell 10000
- plasma 100000
- molten 1000000
- crafting metal 10000000 (sticks, plates)
- meta crafting metal 100000000 (gears, screws, bolts, springs)
- multiple ingotWorth stuff 1000000000 (double, triple, quadruple, ingot/plates)
+ * dust 1 metal 10 (ingot, nugget) gem 100 ore 1000 cell 10000 plasma 100000 molten 1000000 crafting metal
+ * 10000000 (sticks, plates) meta crafting metal 100000000 (gears, screws, bolts, springs) multiple ingotWorth
+ * stuff 1000000000 (double, triple, quadruple, ingot/plates)
*/
private boolean isExtension;
private static final NonNullWrappedHashMap<OrePrefixes, Integer> prefixLogic = new NonNullWrappedHashMap<>(0);
@@ -825,19 +747,15 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public boolean enforceUnification;
/*
- * Auto add Chemical Recipes 1
- * Auto add mixer Recipes 10
- * Auto add Sifter Recipe 100
- * Auto add MetalWorking(sticks, plates) Recipe 1000
- * Auto add MetalWorking(crafting components) Recipe 10000
+ * Auto add Chemical Recipes 1 Auto add mixer Recipes 10 Auto add Sifter Recipe 100 Auto add
+ * MetalWorking(sticks, plates) Recipe 1000 Auto add MetalWorking(crafting components) Recipe 10000
*/
public byte extraRecipes;
/*
- * Here so that new recipes don't fuck with existing functionality
- * Auto add Crafting Metal Solidifier recipes 1
- * Auto add Meta Crafting Metal Solidifier recipes 10
- * Auto add Multiple Ingot Metal Solidifier recipes 100 (Unused)
+ * Here so that new recipes don't fuck with existing functionality Auto add Crafting Metal Solidifier recipes 1
+ * Auto add Meta Crafting Metal Solidifier recipes 10 Auto add Multiple Ingot Metal Solidifier recipes 100
+ * (Unused)
*/
public byte extraRecipes2;
@@ -1065,9 +983,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
/**
- * The generated EBF recipes using this gas will have their duration multiplied by this number.
- * If set to a negative value, the default proton count-based logic is used.
- * For GT Materials gases, add the overrides to {@link StaticRecipeChangeLoaders#addEBFGasRecipes()}
+ * The generated EBF recipes using this gas will have their duration multiplied by this number. If set to a
+ * negative value, the default proton count-based logic is used. For GT Materials gases, add the overrides to
+ * {@link StaticRecipeChangeLoaders#addEBFGasRecipes()}
*/
public Werkstoff.Stats setEbfGasRecipeTimeMultiplier(double timeMultiplier) {
this.ebfGasRecipeTimeMultiplier = timeMultiplier;
@@ -1079,8 +997,8 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
/**
- * The generated EBF recipes using this gas will have the amount of gas consumed multiplied by this number.
- * For GT Materials gases, add the overrides to {@link StaticRecipeChangeLoaders#addEBFGasRecipes()}
+ * The generated EBF recipes using this gas will have the amount of gas consumed multiplied by this number. For
+ * GT Materials gases, add the overrides to {@link StaticRecipeChangeLoaders#addEBFGasRecipes()}
*/
public Werkstoff.Stats setEbfGasRecipeConsumedAmountMultiplier(double amountMultiplier) {
this.ebfGasRecipeConsumedAmountMultiplier = amountMultiplier;
@@ -1170,24 +1088,18 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
if (this.electrons != that.electrons) return false;
if (Math.abs(this.ebfGasRecipeTimeMultiplier - that.ebfGasRecipeTimeMultiplier) > 1.0e-6D) return false;
if (Math.abs(this.ebfGasRecipeConsumedAmountMultiplier - that.ebfGasRecipeConsumedAmountMultiplier)
- > 1.0e-6D) return false;
+ > 1.0e-6D)
+ return false;
return this.quality == that.quality;
}
@Override
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(49)
- .put(this.quality)
- .putInt(this.boilingPoint)
- .putInt(this.meltingPoint)
- .putLong(this.protons)
- .putLong(this.neutrons)
- .putLong(this.electrons)
- .putLong(this.mass)
+ ByteBuffer.allocate(49).put(this.quality).putInt(this.boilingPoint).putInt(this.meltingPoint)
+ .putLong(this.protons).putLong(this.neutrons).putLong(this.electrons).putLong(this.mass)
.putDouble(this.ebfGasRecipeTimeMultiplier)
- .putDouble(this.ebfGasRecipeConsumedAmountMultiplier)
- .array(),
+ .putDouble(this.ebfGasRecipeConsumedAmountMultiplier).array(),
0,
49,
31);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java
index 22265423e8..fd5dc54a01 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material;
@@ -26,6 +17,18 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.superscriptNumbers;
import static gregtech.api.enums.OrePrefixes.*;
+import java.lang.reflect.Field;
+import java.util.*;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.oredict.OreDictionary;
+
+import org.apache.logging.log4j.Level;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.API.WerkstoffAdderRegistry;
@@ -47,6 +50,7 @@ import com.github.bartimaeusnek.bartworks.util.Pair;
import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
import com.github.bartimaeusnek.crossmod.cls.CLSCompat;
import com.google.common.collect.HashBiMap;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -59,18 +63,10 @@ import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputOreDict;
import ic2.api.recipe.RecipeOutput;
import ic2.api.recipe.Recipes;
-import java.lang.reflect.Field;
-import java.util.*;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.oredict.OreDictionary;
-import org.apache.logging.log4j.Level;
-@SuppressWarnings({"unchecked", "deprecation"})
+@SuppressWarnings({ "unchecked", "deprecation" })
public class WerkstoffLoader {
+
private WerkstoffLoader() {}
public static final SubTag NOBLE_GAS = SubTag.getNewSubTag("NobleGas");
@@ -131,7 +127,7 @@ public class WerkstoffLoader {
3628800L,
64,
31);
- // GT_LanguageManager.addStringLocalization(".name", this.getDefaultLocalization(w));
+ // GT_LanguageManager.addStringLocalization(".name", this.getDefaultLocalization(w));
} else {
WerkstoffLoader.cellMolten.mMaterialGenerationBits = 0b1000000;
}
@@ -142,8 +138,7 @@ public class WerkstoffLoader {
WerkstoffLoader.smallGearShape = Enum.valueOf(ItemList.class, "Shape_Extruder_Small_Gear");
WerkstoffLoader.ringMold = Enum.valueOf(ItemList.class, "Shape_Mold_Ring");
WerkstoffLoader.boltMold = Enum.valueOf(ItemList.class, "Shape_Mold_Bolt");
- } catch (NullPointerException | IllegalArgumentException ignored) {
- }
+ } catch (NullPointerException | IllegalArgumentException ignored) {}
// add tiberium
Element t = EnumUtils.createNewElement("Tr", 123L, 203L, 0L, -1L, null, "Tiberium", false);
@@ -216,16 +211,16 @@ public class WerkstoffLoader {
}
// TODO:
- // FREE ID RANGE: 12_000-28_998
- // bartimaeusnek reserved 0-10_000
- // GlodBlock reserved range 10_001-10_999
- // Elisis reserved range 11_000-11_499
- // glowredman reserved range 11_500-11_999
- // bot reserved range 29_899-29_999
- // Tec & basdxz reserved range 30_000-31_000
+ // FREE ID RANGE: 12_000-28_998
+ // bartimaeusnek reserved 0-10_000
+ // GlodBlock reserved range 10_001-10_999
+ // Elisis reserved range 11_000-11_499
+ // glowredman reserved range 11_500-11_999
+ // bot reserved range 29_899-29_999
+ // Tec & basdxz reserved range 30_000-31_000
// GT Material range reserved on 31_767-32_767
public static final Werkstoff Bismutite = new Werkstoff(
- new short[] {255, 233, 0, 0},
+ new short[] { 255, 233, 0, 0 },
"Bismutite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures().addGems(),
@@ -236,7 +231,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Oxygen, 2),
new Pair<>(Materials.CarbonDioxide, 2));
public static final Werkstoff Bismuthinit = new Werkstoff(
- new short[] {192, 192, 192, 0},
+ new short[] { 192, 192, 192, 0 },
"Bismuthinite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -246,26 +241,18 @@ public class WerkstoffLoader {
new Pair<>(Materials.Bismuth, 2),
new Pair<>(Materials.Sulfur, 3));
public static final Werkstoff Zirconium = new Werkstoff(
- new short[] {175, 175, 175, 0},
+ new short[] { 175, 175, 175, 0 },
"Zirconium",
"Zr",
- new Werkstoff.Stats()
- .setProtons(40)
- .setBlastFurnace(true)
- .setMeltingPoint(2130)
- .setMeltingVoltage(480),
+ new Werkstoff.Stats().setProtons(40).setBlastFurnace(true).setMeltingPoint(2130).setMeltingVoltage(480),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMetalItems()
- .enforceUnification(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().enforceUnification(),
3,
TextureSet.SET_METALLIC
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff CubicZirconia = new Werkstoff(
- new short[] {255, 255, 255, 0},
+ new short[] { 255, 255, 255, 0 },
"Cubic Zirconia",
Werkstoff.Types.COMPOUND,
3273,
@@ -276,7 +263,7 @@ public class WerkstoffLoader {
new Pair<>(WerkstoffLoader.Zirconium, 1),
new Pair<>(Materials.Oxygen, 2));
public static final Werkstoff FluorBuergerit = new Werkstoff(
- new short[] {0x20, 0x20, 0x20, 0},
+ new short[] { 0x20, 0x20, 0x20, 0 },
"Fluor-Buergerite",
subscriptNumbers("NaFe3Al6(Si6O18)(BO3)3O3F"),
new Werkstoff.Stats().setElektrolysis(false),
@@ -293,18 +280,17 @@ public class WerkstoffLoader {
new Pair<>(Materials.Oxygen, 30),
new Pair<>(Materials.Fluorine, 1));
public static final Werkstoff YttriumOxide = new Werkstoff(
- new short[] {255, 255, 255, 0},
+ new short[] { 255, 255, 255, 0 },
"Yttrium Oxide",
Werkstoff.Types.COMPOUND,
- new Werkstoff.GenerationFeatures()
- .onlyDust()
- .enforceUnification(), // No autoadd here to gate this material by hand
+ new Werkstoff.GenerationFeatures().onlyDust().enforceUnification(), // No autoadd here to gate this material
+ // by hand
6,
TextureSet.SET_DULL,
new Pair<>(Materials.Yttrium, 2),
new Pair<>(Materials.Oxygen, 3));
public static final Werkstoff ChromoAluminoPovondrait = new Werkstoff(
- new short[] {0, 0x79, 0x6A, 0},
+ new short[] { 0, 0x79, 0x6A, 0 },
"Chromo-Alumino-Povondraite",
subscriptNumbers("NaCr3(Al4Mg2)(Si6O18)(BO3)3(OH)3O"),
Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND).setElektrolysis(false),
@@ -321,7 +307,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Oxygen, 31),
new Pair<>(Materials.Hydrogen, 3));
public static final Werkstoff VanadioOxyDravit = new Werkstoff(
- new short[] {0x60, 0xA0, 0xA0, 0},
+ new short[] { 0x60, 0xA0, 0xA0, 0 },
"Vanadio-Oxy-Dravite",
subscriptNumbers("NaV3(Al4Mg2)(Si6O18)(BO3)3(OH)3O"),
Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND).setElektrolysis(false),
@@ -338,7 +324,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Oxygen, 31),
new Pair<>(Materials.Hydrogen, 3));
public static final Werkstoff Olenit = new Werkstoff(
- new short[] {210, 210, 210, 0},
+ new short[] { 210, 210, 210, 0 },
"Olenite",
subscriptNumbers("NaAl3Al6(Si6O18)(BO3)3O3OH"),
Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND).setElektrolysis(false),
@@ -354,7 +340,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Oxygen, 31),
new Pair<>(Materials.Hydrogen, 1));
public static final Werkstoff Arsenopyrite = new Werkstoff(
- new short[] {0xB0, 0xB0, 0xB0, 0},
+ new short[] { 0xB0, 0xB0, 0xB0, 0 },
"Arsenopyrite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -365,7 +351,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Arsenic, 1),
new Pair<>(Materials.Sulfur, 1));
public static final Werkstoff Ferberite = new Werkstoff(
- new short[] {0xB0, 0xB0, 0xB0, 0},
+ new short[] { 0xB0, 0xB0, 0xB0, 0 },
"Ferberite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -376,7 +362,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Tungsten, 1),
new Pair<>(Materials.Oxygen, 3));
public static final Werkstoff Loellingit = new Werkstoff(
- new short[] {0xD0, 0xD0, 0xD0, 0},
+ new short[] { 0xD0, 0xD0, 0xD0, 0 },
"Loellingite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -386,7 +372,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Iron, 1),
new Pair<>(Materials.Arsenic, 2));
public static final Werkstoff Roquesit = new Werkstoff(
- new short[] {0xA0, 0xA0, 0xA0, 0},
+ new short[] { 0xA0, 0xA0, 0xA0, 0 },
"Roquesite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -397,7 +383,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Indium, 1),
new Pair<>(Materials.Sulfur, 2));
public static final Werkstoff Bornite = new Werkstoff(
- new short[] {0x97, 0x66, 0x2B, 0},
+ new short[] { 0x97, 0x66, 0x2B, 0 },
"Bornite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -419,7 +405,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Bismuth, 1),
new Pair<>(Materials.Sulfur, 4));
public static final Werkstoff Djurleit = new Werkstoff(
- new short[] {0x60, 0x60, 0x60, 0},
+ new short[] { 0x60, 0x60, 0x60, 0 },
"Djurleite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -429,7 +415,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Copper, 31),
new Pair<>(Materials.Sulfur, 16));
public static final Werkstoff Huebnerit = new Werkstoff(
- new short[] {0x80, 0x60, 0x60, 0},
+ new short[] { 0x80, 0x60, 0x60, 0 },
"Huebnerite",
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
@@ -440,7 +426,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Tungsten, 1),
new Pair<>(Materials.Oxygen, 3));
public static final Werkstoff Thorianit = new Werkstoff(
- new short[] {0x30, 0x30, 0x30, 0},
+ new short[] { 0x30, 0x30, 0x30, 0 },
"Thorianite",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -451,7 +437,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Thorium, 1),
new Pair<>(Materials.Oxygen, 2));
public static final Werkstoff RedZircon = new Werkstoff(
- new short[] {195, 19, 19, 0},
+ new short[] { 195, 19, 19, 0 },
"Red Zircon",
new Werkstoff.Stats().setElektrolysis(false).setMeltingPoint(2130),
Werkstoff.Types.COMPOUND,
@@ -497,7 +483,7 @@ public class WerkstoffLoader {
// More NonGT Stuff
public static final Werkstoff Fayalit = new Werkstoff(
- new short[] {50, 50, 50, 0},
+ new short[] { 50, 50, 50, 0 },
"Fayalite",
new Werkstoff.Stats().setElektrolysis(false),
Werkstoff.Types.COMPOUND,
@@ -509,7 +495,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Silicon, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff Forsterit = new Werkstoff(
- new short[] {255, 255, 255, 0},
+ new short[] { 255, 255, 255, 0 },
"Forsterite",
new Werkstoff.Stats().setElektrolysis(false),
Werkstoff.Types.COMPOUND,
@@ -521,7 +507,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Silicon, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff Hedenbergit = new Werkstoff(
- new short[] {100, 150, 100, 0},
+ new short[] { 100, 150, 100, 0 },
"Hedenbergite",
new Werkstoff.Stats().setElektrolysis(false),
Werkstoff.Types.COMPOUND,
@@ -534,7 +520,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Silicon, 2),
new Pair<>(Materials.Oxygen, 6));
public static final Werkstoff DescloiziteZNVO4 = new Werkstoff(
- new short[] {0xBF, 0x18, 0x0F, 0},
+ new short[] { 0xBF, 0x18, 0x0F, 0 },
"Red Descloizite", // Pb(Zn,Cu)[OH|VO4
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -547,7 +533,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Vanadium, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff DescloiziteCUVO4 = new Werkstoff(
- new short[] {0xf9, 0x6d, 0x18, 0},
+ new short[] { 0xf9, 0x6d, 0x18, 0 },
"Orange Descloizite", // Pb(Zn,Cu)[OH|VO4
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -560,7 +546,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Vanadium, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff FuchsitAL = new Werkstoff(
- new short[] {0x4D, 0x7F, 0x64, 0},
+ new short[] { 0x4D, 0x7F, 0x64, 0 },
"Green Fuchsite",
subscriptNumbers("KAl3Si3O10(OH)2"),
new Werkstoff.Stats().setElektrolysis(false),
@@ -576,7 +562,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Hydrogen, 2));
public static final Werkstoff FuchsitCR = new Werkstoff(
- new short[] {128, 0, 0, 0},
+ new short[] { 128, 0, 0, 0 },
"Red Fuchsite",
subscriptNumbers("KCr3Si3O10(OH)2"),
new Werkstoff.Stats().setElektrolysis(false),
@@ -592,26 +578,19 @@ public class WerkstoffLoader {
new Pair<>(Materials.Hydrogen, 2));
public static final Werkstoff Thorium232 = new Werkstoff(
- new short[] {0, 64, 0, 0},
+ new short[] { 0, 64, 0, 0 },
"Thorium 232",
superscriptNumbers("Th232"),
- new Werkstoff.Stats()
- .setRadioactive(true)
- .setBlastFurnace(true)
- .setMass(232)
+ new Werkstoff.Stats().setRadioactive(true).setBlastFurnace(true).setMass(232)
.setProtons(Element.Th.mProtons),
Werkstoff.Types.ISOTOPE,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMetalItems()
- .enforceUnification(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().enforceUnification(),
30,
TextureSet.SET_METALLIC
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff BismuthTellurite = new Werkstoff(
- new short[] {32, 72, 32, 0},
+ new short[] { 32, 72, 32, 0 },
"Bismuth Tellurite",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -622,7 +601,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Bismuth, 2),
new Pair<>(Materials.Tellurium, 3));
public static final Werkstoff Tellurium = new Werkstoff(
- new short[] {0xff, 0xff, 0xff, 0},
+ new short[] { 0xff, 0xff, 0xff, 0 },
"Tellurium",
new Werkstoff.Stats(),
Werkstoff.Types.ELEMENT,
@@ -632,7 +611,7 @@ public class WerkstoffLoader {
// No Byproducts
new Pair<>(Materials.Tellurium, 1));
public static final Werkstoff BismuthHydroBorat = new Werkstoff(
- new short[] {72, 144, 72, 0},
+ new short[] { 72, 144, 72, 0 },
"Dibismuthhydroborat",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -644,7 +623,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Boron, 1),
new Pair<>(Materials.Hydrogen, 1));
public static final Werkstoff ArInGaPhoBiBoTe = new Werkstoff(
- new short[] {36, 36, 36, 0},
+ new short[] { 36, 36, 36, 0 },
"Circuit Compound MK3",
new Werkstoff.Stats().setCentrifuge(true),
Werkstoff.Types.COMPOUND,
@@ -657,7 +636,7 @@ public class WerkstoffLoader {
new Pair<>(WerkstoffLoader.BismuthTellurite, 2));
public static final Werkstoff Prasiolite = new Werkstoff(
- new short[] {0xD0, 0xDD, 0x95, 0},
+ new short[] { 0xD0, 0xDD, 0x95, 0 },
"Prasiolite",
new Werkstoff.Stats().setElektrolysis(false).setMeltingPoint(1923),
Werkstoff.Types.COMPOUND,
@@ -670,7 +649,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Iron, 1));
public static final Werkstoff MagnetoResonaticDust = new Werkstoff(
- new short[] {0xDD, 0x77, 0xDD, 0},
+ new short[] { 0xDD, 0x77, 0xDD, 0 },
"Magneto Resonatic",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -683,7 +662,7 @@ public class WerkstoffLoader {
new Pair<>(WerkstoffLoader.CubicZirconia, 1),
new Pair<>(Materials.SteelMagnetic, 1));
public static final Werkstoff Xenon = new Werkstoff(
- new short[] {0x14, 0x39, 0x7F, 0},
+ new short[] { 0x14, 0x39, 0x7F, 0 },
"Xenon",
"Xe",
new Werkstoff.Stats().setProtons(54).setMass(131).setGas(true),
@@ -691,11 +670,11 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(),
37,
TextureSet.SET_FLUID
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff Oganesson = new Werkstoff(
- new short[] {0x14, 0x39, 0x7F, 0},
+ new short[] { 0x14, 0x39, 0x7F, 0 },
"Oganesson",
"Og",
new Werkstoff.Stats().setProtons(118).setMass(294).setGas(true),
@@ -703,88 +682,62 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().addCells(),
38,
TextureSet.SET_FLUID
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff Californium = new Werkstoff(
- new short[] {0xAA, 0xAA, 0xAA, 0},
+ new short[] { 0xAA, 0xAA, 0xAA, 0 },
"Californium",
"Cf",
- new Werkstoff.Stats()
- .setProtons(98)
- .setMass(251)
- .setBlastFurnace(true)
- .setMeltingPoint(900),
+ new Werkstoff.Stats().setProtons(98).setMass(251).setBlastFurnace(true).setMeltingPoint(900),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMetalItems()
- .addMolten()
- .enforceUnification(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().addMolten().enforceUnification(),
39,
TextureSet.SET_METALLIC
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff Calcium = new Werkstoff(
Materials.Calcium.mRGBa,
"Calcium",
"Ca",
- new Werkstoff.Stats()
- .setProtons(Element.Ca.mProtons)
- .setMass(Element.Ca.getMass())
- .setBlastFurnace(true)
- .setMeltingPoint(1115)
- .setBoilingPoint(1757),
+ new Werkstoff.Stats().setProtons(Element.Ca.mProtons).setMass(Element.Ca.getMass()).setBlastFurnace(true)
+ .setMeltingPoint(1115).setBoilingPoint(1757),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMetalItems()
- .addMolten(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().addMolten(),
40,
Materials.Calcium.mIconSet,
// No Byproducts
new Pair<>(Materials.Calcium, 1));
public static final Werkstoff Neon = new Werkstoff(
- new short[] {0xff, 0x07, 0x3a},
+ new short[] { 0xff, 0x07, 0x3a },
"Neon",
"Ne",
- new Werkstoff.Stats()
- .setProtons(Element.Ne.mProtons)
- .setMass(Element.Ne.getMass())
- .setGas(true),
+ new Werkstoff.Stats().setProtons(Element.Ne.mProtons).setMass(Element.Ne.getMass()).setGas(true),
Werkstoff.Types.ELEMENT,
new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(),
41,
TextureSet.SET_FLUID
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff Krypton = new Werkstoff(
- new short[] {0xb1, 0xff, 0x32},
+ new short[] { 0xb1, 0xff, 0x32 },
"Krypton",
"Kr",
- new Werkstoff.Stats()
- .setProtons(Element.Kr.mProtons)
- .setMass(Element.Kr.getMass())
- .setGas(true),
+ new Werkstoff.Stats().setProtons(Element.Kr.mProtons).setMass(Element.Kr.getMass()).setGas(true),
Werkstoff.Types.ELEMENT,
new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(),
42,
TextureSet.SET_FLUID
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff BArTiMaEuSNeK = new Werkstoff(
- new short[] {0x00, 0xff, 0x00},
+ new short[] { 0x00, 0xff, 0x00 },
"BArTiMaEuSNeK",
"Are you serious?",
- new Werkstoff.Stats()
- .setMeltingPoint(9001)
- .setCentrifuge(true)
- .setBlastFurnace(true)
+ new Werkstoff.Stats().setMeltingPoint(9001).setCentrifuge(true).setBlastFurnace(true)
.setMeltingVoltage(1920),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures().addGems().addMetalItems().addMolten(),
@@ -808,9 +761,9 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().addCells(),
44,
TextureSet.SET_FLUID
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff PTSaltCrude = new Werkstoff(
Materials.Platinum.getRGBA(),
"Platinum Salt",
@@ -820,9 +773,9 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
45,
TextureSet.SET_DULL
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff PTSaltRefined = new Werkstoff(
Materials.Platinum.getRGBA(),
"Refined Platinum Salt",
@@ -832,9 +785,9 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
46,
TextureSet.SET_METALLIC
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff PTMetallicPowder = new Werkstoff(
Materials.Platinum.getRGBA(),
"Platinum Metallic Powder",
@@ -848,7 +801,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Platinum, 1),
new Pair<>(Materials.Stone, 2));
public static final Werkstoff AquaRegia = new Werkstoff(
- new short[] {0xff, 0xb1, 0x32},
+ new short[] { 0xff, 0xb1, 0x32 },
"Aqua Regia",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -859,7 +812,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.DilutedSulfuricAcid, 1),
new Pair<>(Materials.NitricAcid, 1));
public static final Werkstoff PTResidue = new Werkstoff(
- new short[] {0x64, 0x63, 0x2E},
+ new short[] { 0x64, 0x63, 0x2E },
"Platinum Residue",
"??IrOsRhRu??",
new Werkstoff.Stats(),
@@ -867,10 +820,10 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
49,
TextureSet.SET_ROUGH
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff AmmoniumChloride = new Werkstoff(
- new short[] {0xff, 0xff, 0xff},
+ new short[] { 0xff, 0xff, 0xff },
"Ammonium Chloride",
subscriptNumbers("NH4Cl"),
new Werkstoff.Stats(),
@@ -890,8 +843,8 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
51,
TextureSet.SET_METALLIC
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff PDAmmonia = new Werkstoff(
Materials.Palladium.getRGBA(),
"Palladium Enriched Ammonia",
@@ -924,9 +877,9 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
54,
TextureSet.SET_METALLIC
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff PDSalt = new Werkstoff(
Materials.Palladium.getRGBA(),
"Palladium Salt",
@@ -935,11 +888,11 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures().disable().onlyDust(),
55,
TextureSet.SET_METALLIC
- // No Byproducts
- // No Ingredients
- );
+ // No Byproducts
+ // No Ingredients
+ );
public static final Werkstoff Sodiumformate = new Werkstoff(
- new short[] {0xff, 0xaa, 0xaa},
+ new short[] { 0xff, 0xaa, 0xaa },
"Sodium Formate",
"HCOONa",
new Werkstoff.Stats(),
@@ -951,7 +904,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.SodiumHydroxide, 1),
new Pair<>(Materials.CarbonMonoxide, 1));
public static final Werkstoff Sodiumsulfate = new Werkstoff(
- new short[] {0xff, 0xff, 0xff},
+ new short[] { 0xff, 0xff, 0xff },
"Sodium Sulfate",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -963,7 +916,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Sulfur, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff FormicAcid = new Werkstoff(
- new short[] {0xff, 0xaa, 0x77},
+ new short[] { 0xff, 0xaa, 0x77 },
"Formic Acid",
subscriptNumbers("CH2O2"),
new Werkstoff.Stats().setElektrolysis(false),
@@ -976,7 +929,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Hydrogen, 2),
new Pair<>(Materials.Oxygen, 2));
public static final Werkstoff PotassiumDisulfate = new Werkstoff(
- new short[] {0xfb, 0xbb, 0x66},
+ new short[] { 0xfb, 0xbb, 0x66 },
"Potassium Disulfate",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -988,7 +941,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Sulfur, 2),
new Pair<>(Materials.Oxygen, 7));
public static final Werkstoff LeachResidue = new Werkstoff(
- new short[] {0x64, 0x46, 0x29},
+ new short[] { 0x64, 0x46, 0x29 },
"Leach Residue",
"??IrOsRu??",
new Werkstoff.Stats(),
@@ -996,30 +949,30 @@ public class WerkstoffLoader {
new Werkstoff.GenerationFeatures(),
60,
TextureSet.SET_ROUGH
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff RHSulfate = new Werkstoff(
- new short[] {0xee, 0xaa, 0x55},
+ new short[] { 0xee, 0xaa, 0x55 },
"Rhodium Sulfate",
new Werkstoff.Stats().setGas(true),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures().disable().addCells(),
61,
TextureSet.SET_FLUID
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff RHSulfateSolution = new Werkstoff(
- new short[] {0xff, 0xbb, 0x66},
+ new short[] { 0xff, 0xbb, 0x66 },
"Rhodium Sulfate Solution",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
new Werkstoff.GenerationFeatures().disable().addCells(),
62,
TextureSet.SET_FLUID
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff CalciumChloride = new Werkstoff(
- new short[] {0xff, 0xff, 0xff},
+ new short[] { 0xff, 0xff, 0xff },
"Calcium Chloride",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -1028,29 +981,22 @@ public class WerkstoffLoader {
TextureSet.SET_DULL,
new Pair<>(Materials.Calcium, 1),
new Pair<>(Materials.Chlorine, 2)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff Ruthenium = new Werkstoff(
- new short[] {0x64, 0x64, 0x64},
+ new short[] { 0x64, 0x64, 0x64 },
"Ruthenium",
"Ru",
- new Werkstoff.Stats()
- .setBlastFurnace(true)
- .setMeltingPoint(2607)
- .setMass(Element.Ru.getMass())
+ new Werkstoff.Stats().setBlastFurnace(true).setMeltingPoint(2607).setMass(Element.Ru.getMass())
.setProtons(Element.Ru.mProtons),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .onlyDust()
- .addMolten()
- .addMetalItems()
- .enforceUnification(),
+ new Werkstoff.GenerationFeatures().onlyDust().addMolten().addMetalItems().enforceUnification(),
64,
TextureSet.SET_METALLIC
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff SodiumRuthenate = new Werkstoff(
- new short[] {0x3a, 0x40, 0xcb},
+ new short[] { 0x3a, 0x40, 0xcb },
"Sodium Ruthenate",
new Werkstoff.Stats(),
Werkstoff.Types.COMPOUND,
@@ -1060,10 +1006,10 @@ public class WerkstoffLoader {
new Pair<>(Materials.Sodium, 2),
new Pair<>(Ruthenium, 1),
new Pair<>(Materials.Oxygen, 3)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff RutheniumTetroxide = new Werkstoff(
- new short[] {0xc7, 0xc7, 0xc7},
+ new short[] { 0xc7, 0xc7, 0xc7 },
"Ruthenium Tetroxide",
new Werkstoff.Stats().setMeltingPoint(313),
Werkstoff.Types.COMPOUND,
@@ -1072,10 +1018,10 @@ public class WerkstoffLoader {
TextureSet.SET_DULL,
new Pair<>(WerkstoffLoader.Ruthenium, 1),
new Pair<>(Materials.Oxygen, 4)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff HotRutheniumTetroxideSollution = new Werkstoff(
- new short[] {0xc7, 0xc7, 0xc7},
+ new short[] { 0xc7, 0xc7, 0xc7 },
"Hot Ruthenium Tetroxide Solution",
"???",
new Werkstoff.Stats().setGas(true).setMeltingPoint(700),
@@ -1088,10 +1034,10 @@ public class WerkstoffLoader {
new Pair<>(Materials.Chlorine, 2),
new Pair<>(Materials.Sodium, 2),
new Pair<>(Materials.Water, 2)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff RutheniumTetroxideSollution = new Werkstoff(
- new short[] {0xc7, 0xc7, 0xc7},
+ new short[] { 0xc7, 0xc7, 0xc7 },
"Ruthenium Tetroxide Solution",
"???",
new Werkstoff.Stats().setMeltingPoint(313),
@@ -1104,10 +1050,10 @@ public class WerkstoffLoader {
new Pair<>(Materials.Chlorine, 2),
new Pair<>(Materials.Sodium, 2),
new Pair<>(Materials.Water, 2)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff IrOsLeachResidue = new Werkstoff(
- new short[] {0x64, 0x46, 0x29},
+ new short[] { 0x64, 0x46, 0x29 },
"Rarest Metal Residue",
"??OsIr??",
new Werkstoff.Stats(),
@@ -1119,7 +1065,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Osmiridium, 1),
new Pair<>(Materials.Stone, 2));
public static final Werkstoff IrLeachResidue = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Iridium Metal Residue",
"??Ir??",
new Werkstoff.Stats(),
@@ -1129,10 +1075,10 @@ public class WerkstoffLoader {
TextureSet.SET_ROUGH,
new Pair<>(Materials.Iridium, 1),
new Pair<>(Materials.Stone, 2)
- // No Byproducts
- );
+ // No Byproducts
+ );
public static final Werkstoff PGSDResidue = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Sludge Dust Residue",
new Werkstoff.Stats().setCentrifuge(true),
Werkstoff.Types.MIXTURE,
@@ -1142,7 +1088,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.SiliconDioxide, 3),
new Pair<>(Materials.Gold, 2));
public static final Werkstoff AcidicOsmiumSolution = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Acidic Osmium Solution",
"???",
new Werkstoff.Stats(),
@@ -1153,7 +1099,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Osmium, 1),
new Pair<>(Materials.HydrochloricAcid, 1));
public static final Werkstoff IridiumDioxide = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Iridium Dioxide",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1163,7 +1109,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Iridium, 1),
new Pair<>(Materials.Oxygen, 2));
public static final Werkstoff OsmiumSolution = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Osmium Solution",
"???",
new Werkstoff.Stats(),
@@ -1174,7 +1120,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Osmium, 1),
new Pair<>(Materials.Hydrogen, 1));
public static final Werkstoff AcidicIridiumSolution = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Acidic Iridium Solution",
"???",
new Werkstoff.Stats(),
@@ -1185,7 +1131,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Iridium, 1),
new Pair<>(Materials.Hydrogen, 1));
public static final Werkstoff IridiumChloride = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Iridium Chloride",
subscriptNumbers("IrCl3"),
new Werkstoff.Stats(),
@@ -1196,7 +1142,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Iridium, 1),
new Pair<>(Materials.Chlorine, 3));
public static final Werkstoff PGSDResidue2 = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Metallic Sludge Dust Residue",
new Werkstoff.Stats().setCentrifuge(true),
Werkstoff.Types.MIXTURE,
@@ -1206,25 +1152,17 @@ public class WerkstoffLoader {
new Pair<>(Materials.Nickel, 1),
new Pair<>(Materials.Copper, 1));
public static final Werkstoff Rhodium = new Werkstoff(
- new short[] {0xF4, 0xF4, 0xF4},
+ new short[] { 0xF4, 0xF4, 0xF4 },
"Rhodium",
"Rh",
- new Werkstoff.Stats()
- .setProtons(Element.Rh.mProtons)
- .setMass(Element.Rh.getMass())
- .setBlastFurnace(true)
+ new Werkstoff.Stats().setProtons(Element.Rh.mProtons).setMass(Element.Rh.getMass()).setBlastFurnace(true)
.setMeltingPoint(2237),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMetalItems()
- .addMolten()
- .enforceUnification(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().addMolten().enforceUnification(),
78,
TextureSet.SET_METALLIC);
public static final Werkstoff CrudeRhMetall = new Werkstoff(
- new short[] {0x66, 0x66, 0x66},
+ new short[] { 0x66, 0x66, 0x66 },
"Crude Rhodium Metal",
"??Rh??",
new Werkstoff.Stats(),
@@ -1235,7 +1173,7 @@ public class WerkstoffLoader {
new Pair<>(Rhodium, 1),
new Pair<>(Materials.Stone, 1));
public static final Werkstoff RHSalt = new Werkstoff(
- new short[] {0x84, 0x84, 0x84},
+ new short[] { 0x84, 0x84, 0x84 },
"Rhodium Salt",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1243,7 +1181,7 @@ public class WerkstoffLoader {
80,
TextureSet.SET_GEM_VERTICAL);
public static final Werkstoff RHSaltSolution = new Werkstoff(
- new short[] {0x66, 0x77, 0x88},
+ new short[] { 0x66, 0x77, 0x88 },
"Rhodium Salt Solution",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1251,7 +1189,7 @@ public class WerkstoffLoader {
81,
TextureSet.SET_FLUID);
public static final Werkstoff SodiumNitrate = new Werkstoff(
- new short[] {0x84, 0x66, 0x84},
+ new short[] { 0x84, 0x66, 0x84 },
"Sodium Nitrate",
subscriptNumbers("NaNO3"),
new Werkstoff.Stats(),
@@ -1263,7 +1201,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Nitrogen, 1),
new Pair<>(Materials.Oxygen, 3));
public static final Werkstoff RHNitrate = new Werkstoff(
- new short[] {0x77, 0x66, 0x49},
+ new short[] { 0x77, 0x66, 0x49 },
"Rhodium Nitrate",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1271,7 +1209,7 @@ public class WerkstoffLoader {
83,
TextureSet.SET_QUARTZ);
public static final Werkstoff ZincSulfate = new Werkstoff(
- new short[] {0x84, 0x66, 0x49},
+ new short[] { 0x84, 0x66, 0x49 },
"Zinc Sulfate",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.MIXTURE,
@@ -1282,7 +1220,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Sulfur, 1),
new Pair<>(Materials.Oxygen, 4));
public static final Werkstoff RhFilterCake = new Werkstoff(
- new short[] {0x77, 0x66, 0x49},
+ new short[] { 0x77, 0x66, 0x49 },
"Rhodium Filter Cake",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1290,7 +1228,7 @@ public class WerkstoffLoader {
85,
TextureSet.SET_QUARTZ);
public static final Werkstoff RHFilterCakeSolution = new Werkstoff(
- new short[] {0x66, 0x77, 0x88},
+ new short[] { 0x66, 0x77, 0x88 },
"Rhodium Filter Cake Solution",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1298,7 +1236,7 @@ public class WerkstoffLoader {
86,
TextureSet.SET_FLUID);
public static final Werkstoff ReRh = new Werkstoff(
- new short[] {0x77, 0x66, 0x49},
+ new short[] { 0x77, 0x66, 0x49 },
"Reprecipitated Rhodium",
subscriptNumbers("Rh2NH4"),
new Werkstoff.Stats(),
@@ -1309,67 +1247,41 @@ public class WerkstoffLoader {
public static final Werkstoff LuVTierMaterial = new Werkstoff(
Materials.Chrome.getRGBA(),
"Rhodium-Plated Palladium",
- new Werkstoff.Stats()
- .setCentrifuge(true)
- .setBlastFurnace(true)
- .setMeltingPoint(4500)
+ new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setMeltingPoint(4500)
.setMeltingVoltage(480),
Werkstoff.Types.COMPOUND,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMolten()
- .addMetalItems()
- .addMixerRecipes((short) 1)
- .addSimpleMetalWorkingItems()
- .addCraftingMetalWorkingItems()
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMolten().addMetalItems()
+ .addMixerRecipes((short) 1).addSimpleMetalWorkingItems().addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems(),
88,
TextureSet.SET_METALLIC,
new Pair<>(Materials.Palladium, 3),
new Pair<>(WerkstoffLoader.Rhodium, 1));
public static final Werkstoff Tiberium = new Werkstoff(
- new short[] {0x22, 0xEE, 0x22},
+ new short[] { 0x22, 0xEE, 0x22 },
"Tiberium",
"Tr",
- new Werkstoff.Stats()
- .setProtons(123)
- .setMass(326)
- .setBlastFurnace(true)
- .setMeltingPoint(1800)
- .setRadioactive(true)
- .setToxic(true),
+ new Werkstoff.Stats().setProtons(123).setMass(326).setBlastFurnace(true).setMeltingPoint(1800)
+ .setRadioactive(true).setToxic(true),
Werkstoff.Types.ELEMENT,
- new Werkstoff.GenerationFeatures()
- .addGems()
- .addCraftingMetalWorkingItems()
- .addSimpleMetalWorkingItems(),
+ new Werkstoff.GenerationFeatures().addGems().addCraftingMetalWorkingItems().addSimpleMetalWorkingItems(),
89,
TextureSet.SET_DIAMOND);
public static final Werkstoff Ruridit = new Werkstoff(
- new short[] {0xA4, 0xA4, 0xA4},
+ new short[] { 0xA4, 0xA4, 0xA4 },
"Ruridit",
- new Werkstoff.Stats()
- .setCentrifuge(true)
- .setBlastFurnace(true)
- .setMeltingPoint(4500)
+ new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setMeltingPoint(4500)
.setMeltingVoltage(480),
Werkstoff.Types.COMPOUND,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMolten()
- .addMetalItems()
- .addMixerRecipes((short) 1)
- .addSimpleMetalWorkingItems()
- .addCraftingMetalWorkingItems()
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMolten().addMetalItems()
+ .addMixerRecipes((short) 1).addSimpleMetalWorkingItems().addCraftingMetalWorkingItems()
.addMultipleIngotMetalWorkingItems(),
90,
TextureSet.SET_METALLIC,
new Pair<>(WerkstoffLoader.Ruthenium, 2),
new Pair<>(Materials.Iridium, 1));
public static final Werkstoff Fluorspar = new Werkstoff(
- new short[] {185, 69, 251},
+ new short[] { 185, 69, 251 },
"Fluorspar",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -1379,23 +1291,13 @@ public class WerkstoffLoader {
new Pair<>(Materials.Calcium, 1),
new Pair<>(Materials.Fluorine, 2));
public static final Werkstoff HDCS = new Werkstoff(
- new short[] {0x33, 0x44, 0x33},
+ new short[] { 0x33, 0x44, 0x33 },
"High Durability Compound Steel",
- new Werkstoff.Stats()
- .setCentrifuge(true)
- .setBlastFurnace(true)
- .setMeltingPoint(9000)
+ new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setMeltingPoint(9000)
.setMeltingVoltage(7680),
Werkstoff.Types.MIXTURE,
- new Werkstoff.GenerationFeatures()
- .disable()
- .onlyDust()
- .addMolten()
- .addMetalItems()
- .addMixerRecipes()
- .addSimpleMetalWorkingItems()
- .addCraftingMetalWorkingItems()
- .addMultipleIngotMetalWorkingItems(),
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMolten().addMetalItems().addMixerRecipes()
+ .addSimpleMetalWorkingItems().addCraftingMetalWorkingItems().addMultipleIngotMetalWorkingItems(),
92,
TextureSet.SET_SHINY,
new Pair<>(Materials.TungstenSteel, 12),
@@ -1405,7 +1307,7 @@ public class WerkstoffLoader {
new Pair<>(WerkstoffLoader.MagnetoResonaticDust, 2),
new Pair<>(Materials.Plutonium, 1));
public static final Werkstoff Atheneite = new Werkstoff(
- new short[] {175, 175, 175},
+ new short[] { 175, 175, 175 },
"Atheneite",
subscriptNumbers("(Pd,Hg)3As"),
new Werkstoff.Stats().setElektrolysis(true),
@@ -1417,7 +1319,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Mercury, 3),
new Pair<>(Materials.Arsenic, 1));
public static final Werkstoff Temagamite = new Werkstoff(
- new short[] {245, 245, 245},
+ new short[] { 245, 245, 245 },
"Temagamite",
subscriptNumbers("Pd3HgTe"),
new Werkstoff.Stats().setElektrolysis(true),
@@ -1429,7 +1331,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Mercury, 1),
new Pair<>(Materials.Tellurium, 1));
public static final Werkstoff Terlinguaite = new Werkstoff(
- new short[] {245, 245, 245},
+ new short[] { 245, 245, 245 },
"Terlinguaite",
new Werkstoff.Stats().setElektrolysis(true),
Werkstoff.Types.COMPOUND,
@@ -1440,25 +1342,14 @@ public class WerkstoffLoader {
new Pair<>(Materials.Chlorine, 1),
new Pair<>(Materials.Oxygen, 1));
public static final Werkstoff AdemicSteel = new Werkstoff(
- new short[] {0xcc, 0xcc, 0xcc},
+ new short[] { 0xcc, 0xcc, 0xcc },
"Ademic Steel",
"The break in the line",
- new Werkstoff.Stats()
- .setCentrifuge(true)
- .setBlastFurnace(true)
- .setDurOverride(6144)
- .setMeltingPoint(1800)
- .setSpeedOverride(12)
- .setQualityOverride((byte) 4)
- .setMeltingVoltage(1920),
+ new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setDurOverride(6144).setMeltingPoint(1800)
+ .setSpeedOverride(12).setQualityOverride((byte) 4).setMeltingVoltage(1920),
Werkstoff.Types.MIXTURE,
- new Werkstoff.GenerationFeatures()
- .onlyDust()
- .addMetalItems()
- .addCraftingMetalWorkingItems()
- .addMolten()
- .addSimpleMetalWorkingItems()
- .addMultipleIngotMetalWorkingItems(),
+ new Werkstoff.GenerationFeatures().onlyDust().addMetalItems().addCraftingMetalWorkingItems().addMolten()
+ .addSimpleMetalWorkingItems().addMultipleIngotMetalWorkingItems(),
96,
TextureSet.SET_METALLIC,
new Pair<>(Materials.Steel, 2),
@@ -1466,7 +1357,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.DamascusSteel, 1),
new Pair<>(Materials.Carbon, 4));
public static final Werkstoff RawAdemicSteel = new Werkstoff(
- new short[] {0xed, 0xed, 0xed},
+ new short[] { 0xed, 0xed, 0xed },
"Raw Ademic Steel",
new Werkstoff.Stats().setCentrifuge(true),
Werkstoff.Types.MIXTURE,
@@ -1477,7 +1368,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.VanadiumSteel, 1),
new Pair<>(Materials.DamascusSteel, 1));
public static final Werkstoff HexafluorosilicicAcid = new Werkstoff(
- new short[] {0x2c, 0x70, 0xb5},
+ new short[] { 0x2c, 0x70, 0xb5 },
"Hexafluorosilicic Acid",
subscriptNumbers("H2SiF6"),
new Werkstoff.Stats().setElektrolysis(true),
@@ -1489,7 +1380,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Silicon, 1),
new Pair<>(Materials.Fluorine, 6));
public static final Werkstoff Potassiumfluorosilicate = new Werkstoff(
- new short[] {0x2e, 0x97, 0xb2},
+ new short[] { 0x2e, 0x97, 0xb2 },
"Potassiumfluorosilicate",
subscriptNumbers("K2SiF6"),
new Werkstoff.Stats().setElektrolysis(true),
@@ -1501,7 +1392,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Silicon, 1),
new Pair<>(Materials.Fluorine, 6));
public static final Werkstoff Alumina = new Werkstoff(
- new short[] {0xa0, 0xad, 0xb1},
+ new short[] { 0xa0, 0xad, 0xb1 },
"Alumina",
subscriptNumbers("Al2O3"),
new Werkstoff.Stats(),
@@ -1510,7 +1401,7 @@ public class WerkstoffLoader {
100,
TextureSet.SET_DULL);
public static final Werkstoff PotassiumCarbonate = new Werkstoff(
- new short[] {0x7b, 0x96, 0x4f},
+ new short[] { 0x7b, 0x96, 0x4f },
"Potassium Carbonate",
subscriptNumbers("K2CO3"),
new Werkstoff.Stats().setElektrolysis(true),
@@ -1522,7 +1413,7 @@ public class WerkstoffLoader {
new Pair<>(Materials.Carbon, 1),
new Pair<>(Materials.Oxygen, 3));
public static final Werkstoff RawFluorophlogopite = new Werkstoff(
- new short[] {0x36, 0x51, 0x0b},
+ new short[] { 0x36, 0x51, 0x0b },
"Raw Fluorophlogopite",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1530,7 +1421,7 @@ public class WerkstoffLoader {
102,
TextureSet.SET_DULL);
public static final Werkstoff HotFluorophlogopite = new Werkstoff(
- new short[] {0xbf, 0xd3, 0x55},
+ new short[] { 0xbf, 0xd3, 0x55 },
"Unformed Fluorophlogopite",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1538,7 +1429,7 @@ public class WerkstoffLoader {
103,
TextureSet.SET_FLUID);
public static final Werkstoff Fluorophlogopite = new Werkstoff(
- new short[] {0xbf, 0xd3, 0x55},
+ new short[] { 0xbf, 0xd3, 0x55 },
"Fluorophlogopite",
new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
@@ -1592,13 +1483,16 @@ public class WerkstoffLoader {
public static ItemStack getCorrespondingItemStack(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) {
ItemStack stack = getCorrespondingItemStackUnsafe(orePrefixes, werkstoff, amount);
if (stack != null) return stack;
- else
- MainMod.LOGGER.catching(
- Level.ERROR,
- new Exception("NO SUCH ITEM! " + orePrefixes + werkstoff.getVarName()
- + " If you encounter this as a user, make sure to contact the authors of the pack/the mods you're playing! "
- + "If you are a Developer, you forgot to enable " + orePrefixes
- + " OrePrefix for Werkstoff " + werkstoff.getDefaultName()));
+ else MainMod.LOGGER.catching(
+ Level.ERROR,
+ new Exception(
+ "NO SUCH ITEM! " + orePrefixes
+ + werkstoff.getVarName()
+ + " If you encounter this as a user, make sure to contact the authors of the pack/the mods you're playing! "
+ + "If you are a Developer, you forgot to enable "
+ + orePrefixes
+ + " OrePrefix for Werkstoff "
+ + werkstoff.getDefaultName()));
return new ItemStack(WerkstoffLoader.items.get(orePrefixes), amount, werkstoff.getmID()).copy();
}
@@ -1610,43 +1504,38 @@ public class WerkstoffLoader {
addItemsForGeneration();
runAdditionalOreDict();
long timepost = System.nanoTime();
- MainMod.LOGGER.info("Making Meta Items for BW Materials took " + (timepost - timepre) + "ns/"
- + ((timepost - timepre) / 1000000) + "ms/" + ((timepost - timepre) / 1000000000) + "s!");
+ MainMod.LOGGER.info(
+ "Making Meta Items for BW Materials took " + (timepost - timepre)
+ + "ns/"
+ + ((timepost - timepre) / 1000000)
+ + "ms/"
+ + ((timepost - timepre) / 1000000000)
+ + "s!");
}
public static void run() {
if (!registered) {
MainMod.LOGGER.info("Loading Processing Recipes for BW Materials");
long timepre = System.nanoTime();
- ProgressManager.ProgressBar progressBar =
- ProgressManager.push("Register BW Materials", Werkstoff.werkstoffHashSet.size() + 1);
+ ProgressManager.ProgressBar progressBar = ProgressManager
+ .push("Register BW Materials", Werkstoff.werkstoffHashSet.size() + 1);
DebugLog.log("Loading Recipes" + (System.nanoTime() - timepre));
Integer[] clsArr = new Integer[0];
int size = 0;
if (LoaderReference.betterloadingscreen) clsArr = CLSCompat.initCls();
- IWerkstoffRunnable[] werkstoffRunnables = new IWerkstoffRunnable[] {
- new ToolLoader(),
- new DustLoader(),
- new GemLoader(),
- new SimpleMetalLoader(),
- new CasingLoader(),
- new AspectLoader(),
- new OreLoader(),
- new CrushedLoader(),
- new CraftingMaterialLoader(),
- new CellLoader(),
- new MoltenCellLoader(),
- new MultipleMetalLoader(),
- new MetalLoader(),
- new BlockLoader()
- };
+ IWerkstoffRunnable[] werkstoffRunnables = new IWerkstoffRunnable[] { new ToolLoader(), new DustLoader(),
+ new GemLoader(), new SimpleMetalLoader(), new CasingLoader(), new AspectLoader(), new OreLoader(),
+ new CrushedLoader(), new CraftingMaterialLoader(), new CellLoader(), new MoltenCellLoader(),
+ new MultipleMetalLoader(), new MetalLoader(), new BlockLoader() };
long timepreone = 0;
for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
timepreone = System.nanoTime();
- DebugLog.log("Werkstoff is null or id < 0 ? " + (werkstoff == null || werkstoff.getmID() < 0) + " "
- + (System.nanoTime() - timepreone));
+ DebugLog.log(
+ "Werkstoff is null or id < 0 ? " + (werkstoff == null || werkstoff.getmID() < 0)
+ + " "
+ + (System.nanoTime() - timepreone));
if (werkstoff == null || werkstoff.getmID() < 0) {
progressBar.step("");
continue;
@@ -1671,8 +1560,13 @@ public class WerkstoffLoader {
AdditionalRecipes.run();
ProgressManager.pop(progressBar);
long timepost = System.nanoTime();
- MainMod.LOGGER.info("Loading Processing Recipes for BW Materials took " + (timepost - timepre) + "ns/"
- + ((timepost - timepre) / 1000000) + "ms/" + ((timepost - timepre) / 1000000000) + "s!");
+ MainMod.LOGGER.info(
+ "Loading Processing Recipes for BW Materials took " + (timepost - timepre)
+ + "ns/"
+ + ((timepost - timepre) / 1000000)
+ + "ms/"
+ + ((timepost - timepre) / 1000000000)
+ + "s!");
registered = true;
}
}
@@ -1718,8 +1612,7 @@ public class WerkstoffLoader {
Materials.Calcium.mToolQuality = WerkstoffLoader.Calcium.getToolQuality();
for (Werkstoff W : Werkstoff.werkstoffHashSet) {
- for (Pair<ISubTagContainer, Integer> pair :
- W.getContents().getValue().toArray(new Pair[0])) {
+ for (Pair<ISubTagContainer, Integer> pair : W.getContents().getValue().toArray(new Pair[0])) {
if (pair.getKey() instanceof Materials && pair.getKey() == Materials.Neodymium) {
W.add(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM);
@@ -1749,9 +1642,7 @@ public class WerkstoffLoader {
Fluid fluid = GT_FluidFactory.builder(werkstoff.getDefaultName())
.withLocalizedName(werkstoff.getDefaultName())
.withStateAndTemperature(werkstoff.getStats().getFluidState(), 300)
- .withColorRGBA(werkstoff.getRGBA())
- .withTextureName("autogenerated")
- .buildAndRegister()
+ .withColorRGBA(werkstoff.getRGBA()).withTextureName("autogenerated").buildAndRegister()
.asFluid();
WerkstoffLoader.fluids.put(werkstoff, fluid);
} else {
@@ -1765,29 +1656,26 @@ public class WerkstoffLoader {
.withLocalizedName("Molten " + werkstoff.getDefaultName())
.withStateAndTemperature(
FluidState.MOLTEN,
- werkstoff.getStats().getMeltingPoint() > 0
- ? werkstoff.getStats().getMeltingPoint()
+ werkstoff.getStats().getMeltingPoint() > 0 ? werkstoff.getStats().getMeltingPoint()
: 300)
- .withColorRGBA(werkstoff.getRGBA())
- .withTextureName("molten.autogenerated")
- .buildAndRegister()
- .asFluid();
+ .withColorRGBA(werkstoff.getRGBA()).withTextureName("molten.autogenerated")
+ .buildAndRegister().asFluid();
WerkstoffLoader.molten.put(werkstoff, fluid);
} else {
WerkstoffLoader.molten.put(werkstoff, FluidRegistry.getFluid(werkstoff.getDefaultName()));
}
}
- for (OrePrefixes p : values())
- if (Materials.get(werkstoff.getDefaultName()) != null
- && Materials.get(werkstoff.getDefaultName()).mMetaItemSubID != -1
- && (werkstoff.getGenerationFeatures().toGenerate & p.mMaterialGenerationBits) != 0
- && OreDictHandler.getItemStack(werkstoff.getDefaultName(), p, 1) != null) {
- DebugLog.log("Found: " + (p + werkstoff.getVarName())
- + " in GT material system, disable and reroute my Items to that, also add a Tooltip.");
- werkstoff.getGenerationFeatures().setBlacklist(p);
- }
- WerkstoffLoader.toGenerateGlobal =
- (WerkstoffLoader.toGenerateGlobal | werkstoff.getGenerationFeatures().toGenerate);
+ for (OrePrefixes p : values()) if (Materials.get(werkstoff.getDefaultName()) != null
+ && Materials.get(werkstoff.getDefaultName()).mMetaItemSubID != -1
+ && (werkstoff.getGenerationFeatures().toGenerate & p.mMaterialGenerationBits) != 0
+ && OreDictHandler.getItemStack(werkstoff.getDefaultName(), p, 1) != null) {
+ DebugLog.log(
+ "Found: " + (p + werkstoff.getVarName())
+ + " in GT material system, disable and reroute my Items to that, also add a Tooltip.");
+ werkstoff.getGenerationFeatures().setBlacklist(p);
+ }
+ WerkstoffLoader.toGenerateGlobal = (WerkstoffLoader.toGenerateGlobal
+ | werkstoff.getGenerationFeatures().toGenerate);
}
DebugLog.log("GlobalGeneration: " + WerkstoffLoader.toGenerateGlobal);
if ((WerkstoffLoader.toGenerateGlobal & 0b1) != 0) {
@@ -1825,8 +1713,8 @@ public class WerkstoffLoader {
WerkstoffLoader.items.put(cellPlasma, new BW_MetaGenerated_Items(cellPlasma));
}
if ((WerkstoffLoader.toGenerateGlobal & 0b1000000) != 0) {
- WerkstoffLoader.items.put(
- WerkstoffLoader.cellMolten, new BW_MetaGenerated_Items(WerkstoffLoader.cellMolten));
+ WerkstoffLoader.items
+ .put(WerkstoffLoader.cellMolten, new BW_MetaGenerated_Items(WerkstoffLoader.cellMolten));
if (LoaderReference.Forestry)
WerkstoffLoader.items.put(capsuleMolten, new BW_MetaGenerated_Items(capsuleMolten));
}
@@ -1876,15 +1764,23 @@ public class WerkstoffLoader {
GameRegistry.registerTileEntity(BW_MetaGenerated_WerkstoffBlock_TE.class, "bw.werkstoffblockTE");
GameRegistry.registerTileEntity(BW_MetaGeneratedBlocks_Casing_TE.class, "bw.werkstoffblockcasingTE");
GameRegistry.registerTileEntity(
- BW_MetaGeneratedBlocks_CasingAdvanced_TE.class, "bw.werkstoffblockscasingadvancedTE");
+ BW_MetaGeneratedBlocks_CasingAdvanced_TE.class,
+ "bw.werkstoffblockscasingadvancedTE");
WerkstoffLoader.BWOres = new BW_MetaGenerated_Ores(Material.rock, BW_MetaGeneratedOreTE.class, "bw.blockores");
- WerkstoffLoader.BWSmallOres =
- new BW_MetaGenerated_SmallOres(Material.rock, BW_MetaGeneratedSmallOreTE.class, "bw.blockoresSmall");
+ WerkstoffLoader.BWSmallOres = new BW_MetaGenerated_SmallOres(
+ Material.rock,
+ BW_MetaGeneratedSmallOreTE.class,
+ "bw.blockoresSmall");
WerkstoffLoader.BWBlocks = new BW_MetaGenerated_WerkstoffBlocks(
- Material.iron, BW_MetaGenerated_WerkstoffBlock_TE.class, "bw.werkstoffblocks");
+ Material.iron,
+ BW_MetaGenerated_WerkstoffBlock_TE.class,
+ "bw.werkstoffblocks");
WerkstoffLoader.BWBlockCasings = new BW_MetaGeneratedBlocks_Casing(
- Material.iron, BW_MetaGeneratedBlocks_Casing_TE.class, "bw.werkstoffblockscasing", blockCasing);
+ Material.iron,
+ BW_MetaGeneratedBlocks_Casing_TE.class,
+ "bw.werkstoffblockscasing",
+ blockCasing);
WerkstoffLoader.BWBlockCasingsAdvanced = new BW_MetaGeneratedBlocks_Casing(
Material.iron,
BW_MetaGeneratedBlocks_CasingAdvanced_TE.class,
@@ -1894,23 +1790,22 @@ public class WerkstoffLoader {
GameRegistry.registerBlock(WerkstoffLoader.BWOres, BW_MetaGeneratedBlock_Item.class, "bw.blockores.01");
GameRegistry.registerBlock(WerkstoffLoader.BWSmallOres, BW_MetaGeneratedBlock_Item.class, "bw.blockores.02");
GameRegistry.registerBlock(WerkstoffLoader.BWBlocks, BW_MetaGeneratedBlock_Item.class, "bw.werkstoffblocks.01");
- if (!ConfigHandler.disableBoltedBlocksCasing)
- GameRegistry.registerBlock(
- WerkstoffLoader.BWBlockCasings, BW_MetaGeneratedBlock_Item.class, "bw.werkstoffblockscasing.01");
- if (!ConfigHandler.disableReboltedBlocksCasing)
- GameRegistry.registerBlock(
- WerkstoffLoader.BWBlockCasingsAdvanced,
- BW_MetaGeneratedBlock_Item.class,
- "bw.werkstoffblockscasingadvanced.01");
+ if (!ConfigHandler.disableBoltedBlocksCasing) GameRegistry.registerBlock(
+ WerkstoffLoader.BWBlockCasings,
+ BW_MetaGeneratedBlock_Item.class,
+ "bw.werkstoffblockscasing.01");
+ if (!ConfigHandler.disableReboltedBlocksCasing) GameRegistry.registerBlock(
+ WerkstoffLoader.BWBlockCasingsAdvanced,
+ BW_MetaGeneratedBlock_Item.class,
+ "bw.werkstoffblockscasingadvanced.01");
GTMetaItemEnhancer.addAdditionalOreDictToForestry();
GTMetaItemEnhancer.init();
}
private static void runGTItemDataRegistrator() {
- IWerkstoffRunnable[] registrations =
- new IWerkstoffRunnable[] {new BridgeMaterialsLoader(), new AssociationLoader(), new CasingRegistrator()
- };
+ IWerkstoffRunnable[] registrations = new IWerkstoffRunnable[] { new BridgeMaterialsLoader(),
+ new AssociationLoader(), new CasingRegistrator() };
for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
for (IWerkstoffRunnable registration : registrations) {
registration.run(werkstoff);
@@ -1921,21 +1816,27 @@ public class WerkstoffLoader {
}
public static void addVanillaCasingsToGTOreDictUnificator() {
- GT_OreDictUnificator.addAssociation(
- blockCasing, Materials.Aluminium, ItemList.Casing_FrostProof.get(1L), false);
+ GT_OreDictUnificator
+ .addAssociation(blockCasing, Materials.Aluminium, ItemList.Casing_FrostProof.get(1L), false);
GT_OreDictUnificator.addAssociation(blockCasing, Materials.Nickel, ItemList.Casing_HeatProof.get(1L), false);
GT_OreDictUnificator.addAssociation(blockCasing, Materials.Lead, ItemList.Casing_RadiationProof.get(1L), false);
GT_OreDictUnificator.addAssociation(blockCasing, Materials.Steel, ItemList.Casing_SolidSteel.get(1L), false);
GT_OreDictUnificator.addAssociation(
- blockCasing, Materials.TungstenSteel, ItemList.Casing_RobustTungstenSteel.get(1L), false);
+ blockCasing,
+ Materials.TungstenSteel,
+ ItemList.Casing_RobustTungstenSteel.get(1L),
+ false);
GT_OreDictUnificator.addAssociation(
- blockCasing, Materials.Polytetrafluoroethylene, ItemList.Casing_Chemically_Inert.get(1L), false);
+ blockCasing,
+ Materials.Polytetrafluoroethylene,
+ ItemList.Casing_Chemically_Inert.get(1L),
+ false);
}
/**
* very hacky way to make my ores/blocks/smallores detectable by gt assosication in world, well at least the prefix.
- * used for the miners mostly
- * removing this hacky material from the materials map instantly. we only need the item data.
+ * used for the miners mostly removing this hacky material from the materials map instantly. we only need the item
+ * data.
*/
private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {
@@ -1969,8 +1870,7 @@ public class WerkstoffLoader {
public static void removeIC2Recipes() {
try {
Set<Map.Entry<IRecipeInput, RecipeOutput>> remset = new HashSet<>();
- for (Map.Entry<IRecipeInput, RecipeOutput> curr :
- Recipes.macerator.getRecipes().entrySet()) {
+ for (Map.Entry<IRecipeInput, RecipeOutput> curr : Recipes.macerator.getRecipes().entrySet()) {
if (curr.getKey() instanceof RecipeInputOreDict) {
if (((RecipeInputOreDict) curr.getKey()).input.equalsIgnoreCase("oreNULL")) {
remset.add(curr);
@@ -1992,29 +1892,23 @@ public class WerkstoffLoader {
GT_OreDictUnificator.registerOre(ore + werkstoff.getVarName(), werkstoff.get(ore));
GT_OreDictUnificator.registerOre(oreSmall + werkstoff.getVarName(), werkstoff.get(oreSmall));
werkstoff.getADDITIONAL_OREDICT().forEach(e -> OreDictionary.registerOre(ore + e, werkstoff.get(ore)));
- werkstoff
- .getADDITIONAL_OREDICT()
+ werkstoff.getADDITIONAL_OREDICT()
.forEach(e -> OreDictionary.registerOre(oreSmall + e, werkstoff.get(oreSmall)));
}
- if (werkstoff.hasItemType(gem))
- OreDictionary.registerOre(
- "craftingLens"
- + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA())
- .mName
- .replace(" ", ""),
- werkstoff.get(lens));
+ if (werkstoff.hasItemType(gem)) OreDictionary.registerOre(
+ "craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""),
+ werkstoff.get(lens));
if (werkstoff.hasItemType(gem) || werkstoff.hasItemType(ingot)) {
GT_OreDictUnificator.registerOre(block + werkstoff.getVarName(), werkstoff.get(block));
- werkstoff
- .getADDITIONAL_OREDICT()
+ werkstoff.getADDITIONAL_OREDICT()
.forEach(e -> OreDictionary.registerOre(block + e, werkstoff.get(block)));
}
- werkstoff.getADDITIONAL_OREDICT().forEach(s -> ENABLED_ORE_PREFIXES.stream()
- .filter(o -> Objects.nonNull(werkstoff.get(o)))
- .forEach(od -> OreDictionary.registerOre(od + s, werkstoff.get(od))));
+ werkstoff.getADDITIONAL_OREDICT().forEach(
+ s -> ENABLED_ORE_PREFIXES.stream().filter(o -> Objects.nonNull(werkstoff.get(o)))
+ .forEach(od -> OreDictionary.registerOre(od + s, werkstoff.get(od))));
}
GT_OreDictUnificator.registerOre("craftingIndustrialDiamond", WerkstoffLoader.CubicZirconia.get(gemExquisite));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java
index cb2786bc54..5ac2fb4b58 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.processingLoaders;
@@ -25,6 +16,17 @@ package com.github.bartimaeusnek.bartworks.system.material.processingLoaders;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.CLEANROOM;
import static gregtech.api.enums.OrePrefixes.*;
+import java.lang.reflect.Field;
+import java.util.Map;
+import java.util.Objects;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.loaders.BioCultureLoader;
@@ -37,6 +39,7 @@ import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.LuVTier
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.*;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
@@ -44,49 +47,35 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import java.lang.reflect.Field;
-import java.util.Map;
-import java.util.Objects;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.reflect.FieldUtils;
public class AdditionalRecipes {
- private static BWRecipes.BW_Recipe_Map_LiquidFuel sAcidGenFuels =
- ((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance.getMappingsFor((byte) 2));
- private static BWRecipes.BacteriaVatRecipeMap sBacteriaVat =
- ((BWRecipes.BacteriaVatRecipeMap) BWRecipes.instance.getMappingsFor((byte) 1));
+ private static BWRecipes.BW_Recipe_Map_LiquidFuel sAcidGenFuels = ((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance
+ .getMappingsFor((byte) 2));
+ private static BWRecipes.BacteriaVatRecipeMap sBacteriaVat = ((BWRecipes.BacteriaVatRecipeMap) BWRecipes.instance
+ .getMappingsFor((byte) 1));
private static GT_Recipe.GT_Recipe_Map sBiolab = BWRecipes.instance.getMappingsFor((byte) 0);
private static void runBWRecipes() {
if (ConfigHandler.BioLab) {
- FluidStack[] dnaFluid = {
- LoaderReference.gendustry
- ? FluidRegistry.getFluidStack("liquiddna", 1000)
- : Materials.Biomass.getFluid(1000L)
- };
+ FluidStack[] dnaFluid = { LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 1000)
+ : Materials.Biomass.getFluid(1000L) };
for (ItemStack stack : BioItemList.getAllPetriDishes()) {
- BioData DNA =
- BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
if (DNA != null) {
ItemStack Detergent = BioItemList.getOther(1);
ItemStack DNAFlask = BioItemList.getDNASampleFlask(null);
ItemStack EthanolCell = Materials.Ethanol.getCells(1);
sBiolab.addFakeRecipe(
false,
- new ItemStack[] {stack, DNAFlask, Detergent, EthanolCell},
- new ItemStack[] {
- BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(DNA)),
- GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)
- },
+ new ItemStack[] { stack, DNAFlask, Detergent, EthanolCell },
+ new ItemStack[] { BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(DNA)),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L) },
BioItemList.mBioLabParts[0],
- new int[] {DNA.getChance(), 10000},
- new FluidStack[] {FluidRegistry.getFluidStack("ic2distilledwater", 1000)},
+ new int[] { DNA.getChance(), 10000 },
+ new FluidStack[] { FluidRegistry.getFluidStack("ic2distilledwater", 1000) },
null,
500,
BW_Util.getMachineVoltageFromTier(3 + DNA.getTier()),
@@ -104,15 +93,11 @@ public class AdditionalRecipes {
sBiolab.addFakeRecipe(
false,
- new ItemStack[] {
- stack,
- FluidLoader.BioLabFluidCells[0],
- FluidLoader.BioLabFluidCells[3],
- ItemList.Tool_DataOrb.get(1L)
- },
- new ItemStack[] {Outp, ItemList.Cell_Empty.get(2L)},
+ new ItemStack[] { stack, FluidLoader.BioLabFluidCells[0], FluidLoader.BioLabFluidCells[3],
+ ItemList.Tool_DataOrb.get(1L) },
+ new ItemStack[] { Outp, ItemList.Cell_Empty.get(2L) },
BioItemList.mBioLabParts[1],
- new int[] {DNA.getChance(), 10000},
+ new int[] { DNA.getChance(), 10000 },
dnaFluid,
null,
500,
@@ -134,12 +119,11 @@ public class AdditionalRecipes {
sBiolab.addFakeRecipe(
false,
- new ItemStack[] {
- FluidLoader.BioLabFluidCells[1], BioItemList.getPlasmidCell(null), inp, inp2
- },
- new ItemStack[] {stack, ItemList.Cell_Empty.get(1L)},
+ new ItemStack[] { FluidLoader.BioLabFluidCells[1], BioItemList.getPlasmidCell(null), inp,
+ inp2 },
+ new ItemStack[] { stack, ItemList.Cell_Empty.get(1L) },
BioItemList.mBioLabParts[2],
- new int[] {DNA.getChance(), 10000},
+ new int[] { DNA.getChance(), 10000 },
dnaFluid,
null,
500,
@@ -149,22 +133,18 @@ public class AdditionalRecipes {
}
for (ItemStack stack : BioItemList.getAllPetriDishes()) {
- BioData DNA =
- BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
- BioData Plasmid =
- BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("Plasmid"));
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
+ BioData Plasmid = BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("Plasmid"));
if (!Objects.equals(DNA.getName(), Plasmid.getName())) {
sBiolab.addFakeRecipe(
true,
- new ItemStack[] {
- BioItemList.getPetriDish(BioCulture.getBioCulture(DNA.getName())),
- BioItemList.getPlasmidCell(BioPlasmid.convertDataToPlasmid(Plasmid)),
- FluidLoader.BioLabFluidCells[2],
- },
- new ItemStack[] {stack, ItemList.Cell_Empty.get(1L)},
+ new ItemStack[] { BioItemList.getPetriDish(BioCulture.getBioCulture(DNA.getName())),
+ BioItemList.getPlasmidCell(BioPlasmid.convertDataToPlasmid(Plasmid)),
+ FluidLoader.BioLabFluidCells[2], },
+ new ItemStack[] { stack, ItemList.Cell_Empty.get(1L) },
BioItemList.mBioLabParts[3],
- new int[] {Plasmid.getChance(), 10000},
- new FluidStack[] {FluidRegistry.getFluidStack("ic2distilledwater", 1000)},
+ new int[] { Plasmid.getChance(), 10000 },
+ new FluidStack[] { FluidRegistry.getFluidStack("ic2distilledwater", 1000) },
null,
500,
BW_Util.getMachineVoltageFromTier(6),
@@ -178,26 +158,20 @@ public class AdditionalRecipes {
// Clonal Cellular Synthesis- [Liquid DNA] + Medium Petri Dish + Plasma Membrane + Stem Cells + Genome Data
sBiolab.addFakeRecipe(
false,
+ new ItemStack[] { BioItemList.getPetriDish(null), BioItemList.getOther(4),
+ ItemList.Circuit_Chip_Stemcell.get(2L), Outp },
new ItemStack[] {
- BioItemList.getPetriDish(null),
- BioItemList.getOther(4),
- ItemList.Circuit_Chip_Stemcell.get(2L),
- Outp
- },
- new ItemStack[] {
- BioItemList.getPetriDish(null).setStackDisplayName("The Culture made from DNA"),
- },
+ BioItemList.getPetriDish(null).setStackDisplayName("The Culture made from DNA"), },
BioItemList.mBioLabParts[4],
- new int[] {7500, 10000},
- new FluidStack[] {new FluidStack(dnaFluid[0].getFluid(), 8000)},
+ new int[] { 7500, 10000 },
+ new FluidStack[] { new FluidStack(dnaFluid[0].getFluid(), 8000) },
null,
500,
BW_Util.getMachineVoltageFromTier(6),
BW_Util.STANDART);
- FluidStack[] easyFluids = {
- Materials.Water.getFluid(1000L), FluidRegistry.getFluidStack("ic2distilledwater", 1000)
- };
+ FluidStack[] easyFluids = { Materials.Water.getFluid(1000L),
+ FluidRegistry.getFluidStack("ic2distilledwater", 1000) };
for (FluidStack fluidStack : easyFluids) {
for (BioCulture bioCulture : BioCulture.BIO_CULTURE_ARRAY_LIST) {
if (bioCulture.isBreedable() && bioCulture.getTier() == 0) {
@@ -207,37 +181,36 @@ public class AdditionalRecipes {
// int aEUt, int aSpecialValue
new BWRecipes.BacteriaVatRecipe(
true,
- new ItemStack[] {
- GT_Utility.getIntegratedCircuit(1), new ItemStack(Items.sugar, 64)
- },
+ new ItemStack[] { GT_Utility.getIntegratedCircuit(1),
+ new ItemStack(Items.sugar, 64) },
null,
BioItemList.getPetriDish(bioCulture),
null,
- new FluidStack[] {fluidStack},
- new FluidStack[] {new FluidStack(bioCulture.getFluid(), 10)},
+ new FluidStack[] { fluidStack },
+ new FluidStack[] { new FluidStack(bioCulture.getFluid(), 10) },
1000,
BW_Util.getMachineVoltageFromTier(3),
BW_Util.STANDART),
true);
// aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs,
// aDuration, aEUt, aSpecialValue
- sBiolab.addRecipe(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {
- BioItemList.getPetriDish(null),
- fluidStack.equals(Materials.Water.getFluid(1000L))
- ? Materials.Water.getCells(1)
- : GT_Utility.getContainersFromFluid(GT_ModHandler.getDistilledWater(1000))
- .get(0)
- },
- new ItemStack[] {BioItemList.getPetriDish(bioCulture), Materials.Empty.getCells(1)},
- null,
- new int[] {bioCulture.getChance(), 10000},
- new FluidStack[] {new FluidStack(bioCulture.getFluid(), 1000)},
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(3),
- BW_Util.STANDART));
+ sBiolab.addRecipe(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { BioItemList.getPetriDish(null),
+ fluidStack.equals(Materials.Water.getFluid(1000L))
+ ? Materials.Water.getCells(1)
+ : GT_Utility.getContainersFromFluid(
+ GT_ModHandler.getDistilledWater(1000)).get(0) },
+ new ItemStack[] { BioItemList.getPetriDish(bioCulture),
+ Materials.Empty.getCells(1) },
+ null,
+ new int[] { bioCulture.getChance(), 10000 },
+ new FluidStack[] { new FluidStack(bioCulture.getFluid(), 1000) },
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(3),
+ BW_Util.STANDART));
}
}
}
@@ -260,7 +233,10 @@ public class AdditionalRecipes {
public static void run() {
runBWRecipes();
GT_Values.RA.addImplosionRecipe(
- WerkstoffLoader.RawAdemicSteel.get(dust), 4, WerkstoffLoader.AdemicSteel.get(dust), null);
+ WerkstoffLoader.RawAdemicSteel.get(dust),
+ 4,
+ WerkstoffLoader.AdemicSteel.get(dust),
+ null);
((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance.getMappingsFor((byte) 2))
.addLiquidFuel(WerkstoffLoader.FormicAcid.getBridgeMaterial(), 40);
// Thorium/Yttrium Glas
@@ -277,15 +253,10 @@ public class AdditionalRecipes {
// Thorianit recipes
GT_Values.RA.addSifterRecipe(
WerkstoffLoader.Thorianit.get(crushedPurified),
- new ItemStack[] {
- WerkstoffLoader.Thorianit.get(dust),
- WerkstoffLoader.Thorianit.get(dust),
- WerkstoffLoader.Thorianit.get(dust),
- Materials.Thorium.getDust(1),
- Materials.Thorium.getDust(1),
- WerkstoffLoader.Thorium232.get(dust),
- },
- new int[] {7000, 1300, 700, 600, 300, 100},
+ new ItemStack[] { WerkstoffLoader.Thorianit.get(dust), WerkstoffLoader.Thorianit.get(dust),
+ WerkstoffLoader.Thorianit.get(dust), Materials.Thorium.getDust(1), Materials.Thorium.getDust(1),
+ WerkstoffLoader.Thorium232.get(dust), },
+ new int[] { 7000, 1300, 700, 600, 300, 100 },
400,
BW_Util.getMachineVoltageFromTier(5));
// 3ThO2 + 4Al = 3Th + 2Al2O3
@@ -346,13 +317,12 @@ public class AdditionalRecipes {
// Zr + 2O =Y22O3= ZrO2
GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe(
false,
- new ItemStack[] {WerkstoffLoader.Zirconium.get(dust, 10), WerkstoffLoader.YttriumOxide.get(dust)},
- new ItemStack[] {
- WerkstoffLoader.YttriumOxide.get(dust), WerkstoffLoader.CubicZirconia.get(gemFlawed, 40)
- },
+ new ItemStack[] { WerkstoffLoader.Zirconium.get(dust, 10), WerkstoffLoader.YttriumOxide.get(dust) },
+ new ItemStack[] { WerkstoffLoader.YttriumOxide.get(dust),
+ WerkstoffLoader.CubicZirconia.get(gemFlawed, 40) },
null,
null,
- new FluidStack[] {Materials.Oxygen.getGas(20000)},
+ new FluidStack[] { Materials.Oxygen.getGas(20000) },
null,
57600,
BW_Util.getMachineVoltageFromTier(3),
@@ -384,18 +354,11 @@ public class AdditionalRecipes {
600000000);
GT_Values.RA.addDistillationTowerRecipe(
Materials.LiquidAir.getFluid(100000000),
- new FluidStack[] {
- Materials.Nitrogen.getGas(78084000),
- Materials.Oxygen.getGas(20946000),
- Materials.Argon.getGas(934000),
- Materials.CarbonDioxide.getGas(40700),
- WerkstoffLoader.Neon.getFluidOrGas(1818),
- Materials.Helium.getGas(524),
- Materials.Methane.getGas(180),
- WerkstoffLoader.Krypton.getFluidOrGas(114),
- Materials.Hydrogen.getGas(55),
- WerkstoffLoader.Xenon.getFluidOrGas(9)
- },
+ new FluidStack[] { Materials.Nitrogen.getGas(78084000), Materials.Oxygen.getGas(20946000),
+ Materials.Argon.getGas(934000), Materials.CarbonDioxide.getGas(40700),
+ WerkstoffLoader.Neon.getFluidOrGas(1818), Materials.Helium.getGas(524),
+ Materials.Methane.getGas(180), WerkstoffLoader.Krypton.getFluidOrGas(114),
+ Materials.Hydrogen.getGas(55), WerkstoffLoader.Xenon.getFluidOrGas(9) },
null,
7500,
BW_Util.getMachineVoltageFromTier(4));
@@ -428,71 +391,66 @@ public class AdditionalRecipes {
Materials.Potassium.getDustTiny(1),
Materials.Sodium.getDustTiny(4),
Materials.Phosphor.getDustTiny(1),
- new int[] {10000, 10000, 1000, 10000, 1000, 1000},
+ new int[] { 10000, 10000, 1000, 10000, 1000, 1000 },
50,
120);
- GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {
- BW_Meta_Items.getNEWCIRCUITS().getStack(3),
- WerkstoffLoader.MagnetoResonaticDust.get(gem),
- ItemList.NandChip.get(1),
- ItemList.Circuit_Parts_DiodeSMD.get(4),
- ItemList.Circuit_Parts_CapacitorSMD.get(4),
- ItemList.Circuit_Parts_TransistorSMD.get(4)
- },
- new ItemStack[] {BW_Meta_Items.getNEWCIRCUITS().getStack(4)},
- null,
- null,
- new FluidStack[] {Materials.SolderingAlloy.getMolten(36)},
- null,
- 750,
- BW_Util.getMachineVoltageFromTier(1),
- CLEANROOM));
+ GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(3),
+ WerkstoffLoader.MagnetoResonaticDust.get(gem), ItemList.NandChip.get(1),
+ ItemList.Circuit_Parts_DiodeSMD.get(4), ItemList.Circuit_Parts_CapacitorSMD.get(4),
+ ItemList.Circuit_Parts_TransistorSMD.get(4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(4) },
+ null,
+ null,
+ new FluidStack[] { Materials.SolderingAlloy.getMolten(36) },
+ null,
+ 750,
+ BW_Util.getMachineVoltageFromTier(1),
+ CLEANROOM));
for (int i = 1; i <= 6; i++) {
- GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {
- BW_Meta_Items.getNEWCIRCUITS().getStack(3),
- WerkstoffLoader.MagnetoResonaticDust.get(gem),
- BW_Meta_Items.getNEWCIRCUITS().getStack(i + 3),
- ItemList.Circuit_Parts_DiodeSMD.get((i + 1) * 4),
- ItemList.Circuit_Parts_CapacitorSMD.get((i + 1) * 4),
- ItemList.Circuit_Parts_TransistorSMD.get((i + 1) * 4)
- },
- new ItemStack[] {BW_Meta_Items.getNEWCIRCUITS().getStack(i + 4)},
- null,
- null,
- new FluidStack[] {Materials.SolderingAlloy.getMolten((i + 1) * 36)},
- null,
- (i + 1) * 750,
- BW_Util.getMachineVoltageFromTier((i + 1)),
- CLEANROOM));
+ GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(3),
+ WerkstoffLoader.MagnetoResonaticDust.get(gem),
+ BW_Meta_Items.getNEWCIRCUITS().getStack(i + 3),
+ ItemList.Circuit_Parts_DiodeSMD.get((i + 1) * 4),
+ ItemList.Circuit_Parts_CapacitorSMD.get((i + 1) * 4),
+ ItemList.Circuit_Parts_TransistorSMD.get((i + 1) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(i + 4) },
+ null,
+ null,
+ new FluidStack[] { Materials.SolderingAlloy.getMolten((i + 1) * 36) },
+ null,
+ (i + 1) * 750,
+ BW_Util.getMachineVoltageFromTier((i + 1)),
+ CLEANROOM));
}
for (int i = 7; i <= 10; i++) {
- GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(new BWRecipes.DynamicGTRecipe(
- false,
- new ItemStack[] {
- BW_Meta_Items.getNEWCIRCUITS().getStack(3),
- WerkstoffLoader.MagnetoResonaticDust.get(gemExquisite, (1)),
- BW_Meta_Items.getNEWCIRCUITS().getStack(i + 3),
- ItemList.Circuit_Parts_DiodeSMD.get((i + 6) * 4),
- ItemList.Circuit_Parts_CapacitorSMD.get((i + 6) * 4),
- ItemList.Circuit_Parts_TransistorSMD.get((i + 6) * 4)
- },
- new ItemStack[] {BW_Meta_Items.getNEWCIRCUITS().getStack(i + 4)},
- null,
- null,
- new FluidStack[] {Materials.SolderingAlloy.getMolten((i + 1) * 144)},
- null,
- (i + 1) * 1500,
- BW_Util.getMachineVoltageFromTier(i + 1),
- CLEANROOM));
+ GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(3),
+ WerkstoffLoader.MagnetoResonaticDust.get(gemExquisite, (1)),
+ BW_Meta_Items.getNEWCIRCUITS().getStack(i + 3),
+ ItemList.Circuit_Parts_DiodeSMD.get((i + 6) * 4),
+ ItemList.Circuit_Parts_CapacitorSMD.get((i + 6) * 4),
+ ItemList.Circuit_Parts_TransistorSMD.get((i + 6) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS().getStack(i + 4) },
+ null,
+ null,
+ new FluidStack[] { Materials.SolderingAlloy.getMolten((i + 1) * 144) },
+ null,
+ (i + 1) * 1500,
+ BW_Util.getMachineVoltageFromTier(i + 1),
+ CLEANROOM));
}
GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels.addRecipe(
true,
- new ItemStack[] {WerkstoffLoader.Tiberium.get(bolt)},
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(bolt) },
new ItemStack[] {},
null,
null,
@@ -502,7 +460,7 @@ public class AdditionalRecipes {
12500);
GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels.addRecipe(
true,
- new ItemStack[] {WerkstoffLoader.Tiberium.get(stick)},
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stick) },
new ItemStack[] {},
null,
null,
@@ -513,15 +471,15 @@ public class AdditionalRecipes {
try {
Class<GT_Recipe.GT_Recipe_Map> map = GT_Recipe.GT_Recipe_Map.class;
- GT_Recipe.GT_Recipe_Map sHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map)
- FieldUtils.getField(map, "sHugeNaquadahReactorFuels").get(null);
- GT_Recipe.GT_Recipe_Map sExtremeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map)
- FieldUtils.getField(map, "sExtremeNaquadahReactorFuels").get(null);
- GT_Recipe.GT_Recipe_Map sUltraHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map)
- FieldUtils.getField(map, "sUltraHugeNaquadahReactorFuels").get(null);
+ GT_Recipe.GT_Recipe_Map sHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils
+ .getField(map, "sHugeNaquadahReactorFuels").get(null);
+ GT_Recipe.GT_Recipe_Map sExtremeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils
+ .getField(map, "sExtremeNaquadahReactorFuels").get(null);
+ GT_Recipe.GT_Recipe_Map sUltraHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils
+ .getField(map, "sUltraHugeNaquadahReactorFuels").get(null);
sHugeNaquadahReactorFuels.addRecipe(
true,
- new ItemStack[] {WerkstoffLoader.Tiberium.get(stickLong)},
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stickLong) },
new ItemStack[] {},
null,
null,
@@ -531,7 +489,7 @@ public class AdditionalRecipes {
125000);
sExtremeNaquadahReactorFuels.addRecipe(
true,
- new ItemStack[] {WerkstoffLoader.Tiberium.get(stick)},
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stick) },
new ItemStack[] {},
null,
null,
@@ -541,7 +499,7 @@ public class AdditionalRecipes {
31250);
sUltraHugeNaquadahReactorFuels.addRecipe(
true,
- new ItemStack[] {WerkstoffLoader.Tiberium.get(stickLong)},
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stickLong) },
new ItemStack[] {},
null,
null,
@@ -549,8 +507,7 @@ public class AdditionalRecipes {
0,
0,
125000);
- } catch (NullPointerException | IllegalAccessException ignored) {
- }
+ } catch (NullPointerException | IllegalAccessException ignored) {}
LoadItemContainers.run();
@@ -581,14 +538,11 @@ public class AdditionalRecipes {
400);
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- ItemList.NaquadahCell_1.get(32L),
- GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
- GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
- GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
- WerkstoffLoader.Tiberium.get(dust, 64),
- WerkstoffLoader.Tiberium.get(dust, 64)
- },
+ new ItemStack[] { ItemList.NaquadahCell_1.get(32L),
+ GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
+ GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
+ GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 64L),
+ WerkstoffLoader.Tiberium.get(dust, 64), WerkstoffLoader.Tiberium.get(dust, 64) },
null,
BW_NonMeta_MaterialItems.TheCoreCell.get(1L),
100,
@@ -606,8 +560,7 @@ public class AdditionalRecipes {
boolean aElementSet = false;
for (Element e : Element.values()) {
if (e.toString().equals("Uuo")) {
- werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null
- ? werkstoff.getBridgeMaterial()
+ werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial()
: new Materials(
-1,
werkstoff.getTexSet(),
@@ -642,8 +595,8 @@ public class AdditionalRecipes {
false,
new BWRecipes.DynamicGTRecipe(
false,
- new ItemStack[] {werkstoff.get(cell)},
- new ItemStack[] {scannerOutput},
+ new ItemStack[] { werkstoff.get(cell) },
+ new ItemStack[] { scannerOutput },
ItemList.Tool_DataOrb.get(1L),
null,
null,
@@ -655,11 +608,11 @@ public class AdditionalRecipes {
false,
new BWRecipes.DynamicGTRecipe(
false,
- new ItemStack[] {Materials.Empty.getCells(1)},
- new ItemStack[] {werkstoff.get(cell)},
+ new ItemStack[] { Materials.Empty.getCells(1) },
+ new ItemStack[] { werkstoff.get(cell) },
scannerOutput,
null,
- new FluidStack[] {Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())},
+ new FluidStack[] { Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass()) },
null,
(int) (werkstoffBridgeMaterial.getMass() * 512L),
30,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java
index f14acac2bc..84b78c9b2b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.processingLoaders;
@@ -27,6 +18,7 @@ import static gregtech.api.enums.OrePrefixes.dustSmall;
import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -49,7 +41,7 @@ public class AfterLuVTierEnhacement {
WerkstoffLoader.Zirconium.get(dust, 2),
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 8L),
GT_OreDictUnificator.get(dust, Materials.Platinum, 1L),
- new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000},
+ new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 },
250,
2000);
@@ -64,7 +56,7 @@ public class AfterLuVTierEnhacement {
WerkstoffLoader.Zirconium.get(dust, 4),
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 18L),
GT_OreDictUnificator.get(dust, Materials.Platinum, 2L),
- new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000},
+ new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 },
500,
2000);
@@ -79,7 +71,7 @@ public class AfterLuVTierEnhacement {
WerkstoffLoader.Zirconium.get(dust, 8),
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 38L),
GT_OreDictUnificator.get(dust, Materials.Platinum, 4L),
- new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000},
+ new int[] { 10_000, 5_000, 5_000, 2_500, 10_000, 10_000 },
1000,
2000);
@@ -94,7 +86,7 @@ public class AfterLuVTierEnhacement {
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 64L),
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 64L),
GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 48L),
- new int[] {10_000, 5_000, 5_000, 10_000, 10_000, 10_000},
+ new int[] { 10_000, 5_000, 5_000, 10_000, 10_000, 10_000 },
2000,
8000);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java
index 54bd8d3942..b297217ae5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java
@@ -1,34 +1,26 @@
/*
- * 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.system.material.processingLoaders;
-import com.github.bartimaeusnek.bartworks.util.BW_Util;
-import com.github.bartimaeusnek.bartworks.util.StreamUtils;
-import gregtech.api.util.GT_Recipe;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.StreamUtils;
+import gregtech.api.util.GT_Recipe;
+
public class DownTierLoader {
public static void run() {
@@ -37,8 +29,7 @@ public class DownTierLoader {
.forEach(map -> {
Set<GT_Recipe> newRecipes = new HashSet<>();
Set<GT_Recipe> toRem = new HashSet<>();
- map.mRecipeList.stream()
- .filter(recipe -> Objects.nonNull(recipe) && recipe.mEUt > 128)
+ map.mRecipeList.stream().filter(recipe -> Objects.nonNull(recipe) && recipe.mEUt > 128)
.forEach(recipe -> {
toRem.add(recipe);
newRecipes.add(BW_Util.copyAndSetTierToNewRecipe(recipe, (byte) 2));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java
index a613708f29..2b26680738 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java
@@ -1,81 +1,77 @@
/*
- * 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.system.material.processingLoaders;
import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems;
+
import gregtech.api.items.GT_RadioactiveCellIC_Item;
import gregtech.common.items.GT_DepletetCell_Item;
public class LoadItemContainers {
public static void run() {
- BW_NonMeta_MaterialItems.Depleted_Tiberium_1.set(
- new GT_DepletetCell_Item("TiberiumcellDep", "Fuel Rod (Depleted Tiberium)", 1));
- BW_NonMeta_MaterialItems.Depleted_Tiberium_2.set(
- new GT_DepletetCell_Item("Double_TiberiumcellDep", "Dual Fuel Rod (Depleted Tiberium)", 1));
- BW_NonMeta_MaterialItems.Depleted_Tiberium_4.set(
- new GT_DepletetCell_Item("Quad_TiberiumcellDep", "Quad Fuel Rod (Depleted Tiberium)", 1));
- BW_NonMeta_MaterialItems.TiberiumCell_1.set(new GT_RadioactiveCellIC_Item(
- "Tiberiumcell",
- "Fuel Rod (Tiberium)",
- 1,
- 50000,
- 2F,
- 1,
- 0.5F,
- BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1),
- false));
- BW_NonMeta_MaterialItems.TiberiumCell_2.set(new GT_RadioactiveCellIC_Item(
- "Double_Tiberiumcell",
- "Dual Fuel Rod (Tiberium)",
- 2,
- 50000,
- 2F,
- 1,
- 0.5F,
- BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1),
- false));
- BW_NonMeta_MaterialItems.TiberiumCell_4.set(new GT_RadioactiveCellIC_Item(
- "Quad_Tiberiumcell",
- "Quad Fuel Rod (Tiberium)",
- 4,
- 50000,
- 2F,
- 1,
- 0.5F,
- BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1),
- false));
- BW_NonMeta_MaterialItems.Depleted_TheCoreCell.set(
- new GT_DepletetCell_Item("Core_Reactor_CellDep", "Depleted \"The Core\" Cell", 32));
- BW_NonMeta_MaterialItems.TheCoreCell.set(new GT_RadioactiveCellIC_Item(
- "Core_Reactor_Cell",
- "\"The Core\" Cell",
- 32,
- 100000,
- 8F,
- 32,
- 1F,
- BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1),
- false));
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_1
+ .set(new GT_DepletetCell_Item("TiberiumcellDep", "Fuel Rod (Depleted Tiberium)", 1));
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_2
+ .set(new GT_DepletetCell_Item("Double_TiberiumcellDep", "Dual Fuel Rod (Depleted Tiberium)", 1));
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_4
+ .set(new GT_DepletetCell_Item("Quad_TiberiumcellDep", "Quad Fuel Rod (Depleted Tiberium)", 1));
+ BW_NonMeta_MaterialItems.TiberiumCell_1.set(
+ new GT_RadioactiveCellIC_Item(
+ "Tiberiumcell",
+ "Fuel Rod (Tiberium)",
+ 1,
+ 50000,
+ 2F,
+ 1,
+ 0.5F,
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1),
+ false));
+ BW_NonMeta_MaterialItems.TiberiumCell_2.set(
+ new GT_RadioactiveCellIC_Item(
+ "Double_Tiberiumcell",
+ "Dual Fuel Rod (Tiberium)",
+ 2,
+ 50000,
+ 2F,
+ 1,
+ 0.5F,
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1),
+ false));
+ BW_NonMeta_MaterialItems.TiberiumCell_4.set(
+ new GT_RadioactiveCellIC_Item(
+ "Quad_Tiberiumcell",
+ "Quad Fuel Rod (Tiberium)",
+ 4,
+ 50000,
+ 2F,
+ 1,
+ 0.5F,
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1),
+ false));
+ BW_NonMeta_MaterialItems.Depleted_TheCoreCell
+ .set(new GT_DepletetCell_Item("Core_Reactor_CellDep", "Depleted \"The Core\" Cell", 32));
+ BW_NonMeta_MaterialItems.TheCoreCell.set(
+ new GT_RadioactiveCellIC_Item(
+ "Core_Reactor_Cell",
+ "\"The Core\" Cell",
+ 32,
+ 100000,
+ 8F,
+ 32,
+ 1F,
+ BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1),
+ false));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java
index 6e68abc432..d409084406 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders;
@@ -25,5 +16,6 @@ package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
public interface IWerkstoffRunnable {
+
void run(Werkstoff werkstoff);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java
index 7b1d649b50..264ace8f96 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java
@@ -1,27 +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.system.material.werkstoff_loaders.recipe;
+import java.util.Objects;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
@@ -29,9 +22,9 @@ import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWer
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TC_Aspects;
-import java.util.Objects;
public class AspectLoader implements IWerkstoffRunnable {
@@ -41,20 +34,22 @@ public class AspectLoader implements IWerkstoffRunnable {
for (OrePrefixes enabledOrePrefixes : WerkstoffLoader.ENABLED_ORE_PREFIXES) {
if (werkstoff.hasItemType(enabledOrePrefixes)) {
if (enabledOrePrefixes.mMaterialAmount >= 3628800L || enabledOrePrefixes == OrePrefixes.ore) {
- DebugLog.log("OrePrefix: " + enabledOrePrefixes.name() + " mMaterialAmount: "
- + enabledOrePrefixes.mMaterialAmount / 3628800L);
+ DebugLog.log(
+ "OrePrefix: " + enabledOrePrefixes.name()
+ + " mMaterialAmount: "
+ + enabledOrePrefixes.mMaterialAmount / 3628800L);
if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes)))
ThaumcraftHandler.AspectAdder.addAspectViaBW(
werkstoff.get(enabledOrePrefixes),
werkstoff.getTCAspects(
- enabledOrePrefixes == OrePrefixes.ore
- ? 1
+ enabledOrePrefixes == OrePrefixes.ore ? 1
: (int) (enabledOrePrefixes.mMaterialAmount / 3628800L)));
} else if (enabledOrePrefixes.mMaterialAmount >= 0L) {
if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes)))
- //noinspection unchecked
+ // noinspection unchecked
ThaumcraftHandler.AspectAdder.addAspectViaBW(
- werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1));
+ werkstoff.get(enabledOrePrefixes),
+ new Pair<>(TC_Aspects.PERDITIO.mAspect, 1));
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java
index 9d3cbc4b96..f5f105a00e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java
@@ -1,42 +1,40 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import gregtech.api.enums.GT_Values;
-import net.minecraft.item.ItemStack;
public class BlockLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (!werkstoff.hasItemType(block)) return;
if (werkstoff.hasItemType(ingot)) {
GT_Values.RA.addArcFurnaceRecipe(
- werkstoff.get(block), new ItemStack[] {werkstoff.get(ingot, 9)}, null, 16, 90, false);
+ werkstoff.get(block),
+ new ItemStack[] { werkstoff.get(ingot, 9) },
+ null,
+ 16,
+ 90,
+ false);
}
if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) {
GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(block), null, werkstoff.getMolten(1296), 0, 288, 8);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java
index d774ff166d..58acea03ae 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -26,57 +17,53 @@ import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.BW_GT_MaterialReference;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
-import net.minecraft.item.ItemStack;
public class CasingLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
- if (werkstoff == BW_GT_MaterialReference.Wood /*|| werkstoff == BW_GT_MaterialReference.WoodSealed*/) {
+ if (werkstoff == BW_GT_MaterialReference.Wood /* || werkstoff == BW_GT_MaterialReference.WoodSealed */) {
addCasingRecipes(werkstoff, plank);
} else {
- if (!(werkstoff.hasGenerationFeature(blockCasing)
- && werkstoff.doesOreDictedItemExists(plate)
+ if (!(werkstoff.hasGenerationFeature(blockCasing) && werkstoff.doesOreDictedItemExists(plate)
&& werkstoff.doesOreDictedItemExists(screw)
&& werkstoff.doesOreDictedItemExists(gearGtSmall)
&& werkstoff.doesOreDictedItemExists(gearGt)
- && werkstoff.doesOreDictedItemExists(plateDouble))) return;
+ && werkstoff.doesOreDictedItemExists(plateDouble)))
+ return;
addCasingRecipes(werkstoff, plateDouble);
}
}
private static void addCasingRecipes(Werkstoff werkstoff, OrePrefixes reboltedCasingsOuterStuff) {
- GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing), new Object[] {
- "PSP", "PGP", "PSP", 'P', werkstoff.get(plate), 'S', werkstoff.get(screw), 'G', werkstoff.get(gearGtSmall)
- });
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(blockCasing),
+ new Object[] { "PSP", "PGP", "PSP", 'P', werkstoff.get(plate), 'S', werkstoff.get(screw), 'G',
+ werkstoff.get(gearGtSmall) });
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {werkstoff.get(plate, 6), werkstoff.get(screw, 2), werkstoff.get(gearGtSmall)},
+ new ItemStack[] { werkstoff.get(plate, 6), werkstoff.get(screw, 2), werkstoff.get(gearGtSmall) },
GT_Values.NF,
werkstoff.get(blockCasing),
200,
30);
- GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced), new Object[] {
- "PSP",
- "PGP",
- "PSP",
- 'P',
- werkstoff.get(reboltedCasingsOuterStuff),
- 'S',
- werkstoff.get(screw),
- 'G',
- werkstoff.get(gearGt)
- });
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(blockCasingAdvanced),
+ new Object[] { "PSP", "PGP", "PSP", 'P', werkstoff.get(reboltedCasingsOuterStuff), 'S',
+ werkstoff.get(screw), 'G', werkstoff.get(gearGt) });
GT_Values.RA.addAssemblerRecipe(
- new ItemStack[] {
- werkstoff.get(reboltedCasingsOuterStuff, 6), werkstoff.get(screw, 2), werkstoff.get(gearGt)
- },
+ new ItemStack[] { werkstoff.get(reboltedCasingsOuterStuff, 6), werkstoff.get(screw, 2),
+ werkstoff.get(gearGt) },
GT_Values.NF,
werkstoff.get(blockCasingAdvanced),
200,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
index 32e72c96e6..ce3207484b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
@@ -1,35 +1,36 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Objects;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.Pair;
+
import gregtech.api.enums.*;
import gregtech.api.interfaces.ISubTagContainer;
import gregtech.api.util.GT_ModHandler;
@@ -37,15 +38,9 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Objects;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class CellLoader implements IWerkstoffRunnable {
+
@Override
@SuppressWarnings("unchecked")
public void run(Werkstoff werkstoff) {
@@ -57,12 +52,11 @@ public class CellLoader implements IWerkstoffRunnable {
List<ItemStack> stOutputs = new ArrayList<>();
HashMap<ISubTagContainer, Pair<Integer, Integer>> tracker = new HashMap<>();
int cells = 0;
- for (Pair<ISubTagContainer, Integer> container :
- werkstoff.getContents().getValue().toArray(new Pair[0])) {
+ for (Pair<ISubTagContainer, Integer> container : werkstoff.getContents().getValue().toArray(new Pair[0])) {
if (container.getKey() instanceof Materials) {
if ((((Materials) container.getKey()).hasCorrespondingGas()
- || ((Materials) container.getKey()).hasCorrespondingFluid()
- || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID)
+ || ((Materials) container.getKey()).hasCorrespondingFluid()
+ || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID)
&& ((Materials) container.getKey()).getDust(0) == null) {
FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000L * container.getValue());
if (tmpFl == null || tmpFl.getFluid() == null) {
@@ -74,8 +68,8 @@ public class CellLoader implements IWerkstoffRunnable {
stOutputs.add(((Materials) container.getKey()).getCells(container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Materials) container.getKey())
- .getCells(
+ stOutputs.add(
+ ((Materials) container.getKey()).getCells(
tracker.get(container.getKey()).getKey() + container.getValue()));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
@@ -87,8 +81,9 @@ public class CellLoader implements IWerkstoffRunnable {
stOutputs.add(((Materials) container.getKey()).getDust(container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Materials) container.getKey())
- .getDust(tracker.get(container.getKey()).getKey() + container.getValue()));
+ stOutputs.add(
+ ((Materials) container.getKey())
+ .getDust(tracker.get(container.getKey()).getKey() + container.getValue()));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
}
@@ -105,8 +100,8 @@ public class CellLoader implements IWerkstoffRunnable {
stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Werkstoff) container.getKey())
- .get(
+ stOutputs.add(
+ ((Werkstoff) container.getKey()).get(
cell,
tracker.get(container.getKey()).getKey() + container.getValue()));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
@@ -119,8 +114,10 @@ public class CellLoader implements IWerkstoffRunnable {
stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Werkstoff) container.getKey())
- .get(dust, (tracker.get(container.getKey()).getKey() + container.getValue())));
+ stOutputs.add(
+ ((Werkstoff) container.getKey()).get(
+ dust,
+ (tracker.get(container.getKey()).getKey() + container.getValue())));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
}
@@ -132,45 +129,50 @@ public class CellLoader implements IWerkstoffRunnable {
int cellEmpty = cells - 1;
stOutputs.add(Materials.Empty.getCells(-cellEmpty));
- if (werkstoff.getStats().isElektrolysis())
- GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- new ItemStack[] {input, cellEmpty > 0 ? Materials.Empty.getCells(cellEmpty) : null},
- stOutputs.toArray(new ItemStack[0]),
- null,
- null,
- new FluidStack[] {null},
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
- (int) Math.max(
- 1L,
- Math.abs(werkstoff.getStats().getProtons()
- * werkstoff.getContents().getValue().size())),
- Math.min(4, werkstoff.getContents().getValue().size()) * 30,
- 0));
- if (werkstoff.getStats().isCentrifuge())
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- new ItemStack[] {input, cellEmpty > 0 ? Materials.Empty.getCells(cellEmpty) : null},
- stOutputs.toArray(new ItemStack[0]),
- null,
- null,
- new FluidStack[] {null},
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
- (int) Math.max(
- 1L,
- Math.abs(werkstoff.getStats().getMass()
- * werkstoff.getContents().getValue().size())),
- Math.min(4, werkstoff.getContents().getValue().size()) * 5,
- 0));
+ if (werkstoff.getStats().isElektrolysis()) GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ new ItemStack[] { input, cellEmpty > 0 ? Materials.Empty.getCells(cellEmpty) : null },
+ stOutputs.toArray(new ItemStack[0]),
+ null,
+ null,
+ new FluidStack[] { null },
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ * werkstoff.getContents().getValue().size())),
+ Math.min(4, werkstoff.getContents().getValue().size()) * 30,
+ 0));
+ if (werkstoff.getStats().isCentrifuge()) GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ new ItemStack[] { input, cellEmpty > 0 ? Materials.Empty.getCells(cellEmpty) : null },
+ stOutputs.toArray(new ItemStack[0]),
+ null,
+ null,
+ new FluidStack[] { null },
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats().getMass()
+ * werkstoff.getContents().getValue().size())),
+ Math.min(4, werkstoff.getContents().getValue().size()) * 5,
+ 0));
}
// Tank "Recipe"
- GT_Utility.addFluidContainerData(new FluidContainerRegistry.FluidContainerData(
- new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000),
- werkstoff.get(cell),
- Materials.Empty.getCells(1)));
+ GT_Utility.addFluidContainerData(
+ new FluidContainerRegistry.FluidContainerData(
+ new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000),
+ werkstoff.get(cell),
+ Materials.Empty.getCells(1)));
FluidContainerRegistry.registerFluidContainer(
- werkstoff.getFluidOrGas(1).getFluid(), werkstoff.get(cell), Materials.Empty.getCells(1));
+ werkstoff.getFluidOrGas(1).getFluid(),
+ werkstoff.get(cell),
+ Materials.Empty.getCells(1));
GT_Values.RA.addFluidCannerRecipe(
Materials.Empty.getCells(1),
werkstoff.get(cell),
@@ -218,8 +220,7 @@ public class CellLoader implements IWerkstoffRunnable {
boolean ElementSet = false;
for (Element e : Element.values()) {
if (e.toString().equals(werkstoff.getToolTip())) {
- werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null
- ? werkstoff.getBridgeMaterial()
+ werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial()
: new Materials(
-1,
werkstoff.getTexSet(),
@@ -239,14 +240,14 @@ public class CellLoader implements IWerkstoffRunnable {
if (!ElementSet) return;
GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false);
- // try {
- // Field f = Materials.class.getDeclaredField("MATERIALS_MAP");
- // f.setAccessible(true);
- // Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null);
- // MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName);
- // } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {
- // e.printStackTrace();
- // }
+ // try {
+ // Field f = Materials.class.getDeclaredField("MATERIALS_MAP");
+ // f.setAccessible(true);
+ // Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null);
+ // MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName);
+ // } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {
+ // e.printStackTrace();
+ // }
ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L);
Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan");
Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip());
@@ -254,8 +255,8 @@ public class CellLoader implements IWerkstoffRunnable {
false,
new BWRecipes.DynamicGTRecipe(
false,
- new ItemStack[] {werkstoff.get(cell)},
- new ItemStack[] {scannerOutput},
+ new ItemStack[] { werkstoff.get(cell) },
+ new ItemStack[] { scannerOutput },
ItemList.Tool_DataOrb.get(1L),
null,
null,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java
index 9abca71e18..ccf8b21ffd 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java
@@ -1,42 +1,36 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy;
-import net.minecraft.item.ItemStack;
public class CraftingMaterialLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (werkstoff.hasItemType(screw)) {
@@ -56,7 +50,11 @@ public class CraftingMaterialLoader implements IWerkstoffRunnable {
(int) Math.max(werkstoff.getStats().getMass() * 2L, 1L),
4);
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(bolt), new ItemStack[] {werkstoff.get(dustTiny, 1)}, null, 2, 8);
+ werkstoff.get(bolt),
+ new ItemStack[] { werkstoff.get(dustTiny, 1) },
+ null,
+ 2,
+ 8);
// screw
GT_Values.RA.addLatheRecipe(
@@ -66,9 +64,15 @@ public class CraftingMaterialLoader implements IWerkstoffRunnable {
(int) Math.max(werkstoff.getStats().getMass() / 8L, 1L),
4);
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(screw), GT_Proxy.tBits, new Object[] {"fX", "X ", 'X', werkstoff.get(bolt)});
+ werkstoff.get(screw),
+ GT_Proxy.tBits,
+ new Object[] { "fX", "X ", 'X', werkstoff.get(bolt) });
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(screw), new ItemStack[] {werkstoff.get(dustTiny, 1)}, null, 2, 8);
+ werkstoff.get(screw),
+ new ItemStack[] { werkstoff.get(dustTiny, 1) },
+ null,
+ 2,
+ 8);
if (werkstoff.hasItemType(gem)) return;
@@ -80,12 +84,15 @@ public class CraftingMaterialLoader implements IWerkstoffRunnable {
(int) Math.max(werkstoff.getStats().getMass() * 2L, 1),
6 * tVoltageMultiplier);
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(ring), GT_Proxy.tBits, new Object[] {"h ", "fX", 'X', werkstoff.get(stick)});
+ werkstoff.get(ring),
+ GT_Proxy.tBits,
+ new Object[] { "h ", "fX", 'X', werkstoff.get(stick) });
// Gear
- GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGt), GT_Proxy.tBits, new Object[] {
- "SPS", "PwP", "SPS", 'P', werkstoff.get(plate), 'S', werkstoff.get(stick)
- });
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(gearGt),
+ GT_Proxy.tBits,
+ new Object[] { "SPS", "PwP", "SPS", 'P', werkstoff.get(plate), 'S', werkstoff.get(stick) });
GT_Values.RA.addExtruderRecipe(
werkstoff.get(ingot, 4),
ItemList.Shape_Extruder_Gear.get(0L),
@@ -114,26 +121,27 @@ public class CraftingMaterialLoader implements IWerkstoffRunnable {
8 * tVoltageMultiplier);
// smallGear
- if (WerkstoffLoader.smallGearShape != null)
- GT_Values.RA.addExtruderRecipe(
- werkstoff.get(ingot),
- WerkstoffLoader.smallGearShape.get(0L),
- werkstoff.get(gearGtSmall),
- (int) werkstoff.getStats().getMass(),
- 8 * tVoltageMultiplier);
- if (ConfigHandler.hardmode)
- GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[] {
- " S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate)
- });
- else
- GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[] {
- "P ", " h ", 'P', werkstoff.get(plate)
- });
+ if (WerkstoffLoader.smallGearShape != null) GT_Values.RA.addExtruderRecipe(
+ werkstoff.get(ingot),
+ WerkstoffLoader.smallGearShape.get(0L),
+ werkstoff.get(gearGtSmall),
+ (int) werkstoff.getStats().getMass(),
+ 8 * tVoltageMultiplier);
+ if (ConfigHandler.hardmode) GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(gearGtSmall),
+ GT_Proxy.tBits,
+ new Object[] { " S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate) });
+ else GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(gearGtSmall),
+ GT_Proxy.tBits,
+ new Object[] { "P ", " h ", 'P', werkstoff.get(plate) });
// Rotor
- GT_ModHandler.addCraftingRecipe(werkstoff.get(rotor), GT_Proxy.tBits, new Object[] {
- "PhP", "SRf", "PdP", 'P', werkstoff.get(plate), 'R', werkstoff.get(ring), 'S', werkstoff.get(screw)
- });
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(rotor),
+ GT_Proxy.tBits,
+ new Object[] { "PhP", "SRf", "PdP", 'P', werkstoff.get(plate), 'R', werkstoff.get(ring), 'S',
+ werkstoff.get(screw) });
GT_Values.RA.addAssemblerRecipe(
werkstoff.get(plate, 4),
werkstoff.get(ring),
@@ -156,56 +164,50 @@ public class CraftingMaterialLoader implements IWerkstoffRunnable {
240,
24);
- if (WerkstoffLoader.rotorShape != null)
- GT_Values.RA.addExtruderRecipe(
- werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L), werkstoff.get(rotor), 200, 60);
+ if (WerkstoffLoader.rotorShape != null) GT_Values.RA.addExtruderRecipe(
+ werkstoff.get(ingot, 5),
+ WerkstoffLoader.rotorShape.get(0L),
+ werkstoff.get(rotor),
+ 200,
+ 60);
// molten -> metal
if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) {
- /* !! No more hardcoded gear, etc. recipe gen, now must go through GenerationFeatures() !!
-
- GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576), werkstoff.get(gearGt), 128, 8);
- GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Gear_Small.get(0L),
- werkstoff.getMolten(144),
- werkstoff.get(gearGtSmall),
- 16,
- 8);
- if (WerkstoffLoader.ringMold != null)
- GT_Values.RA.addFluidSolidifierRecipe(
- WerkstoffLoader.ringMold.get(0L),
- werkstoff.getMolten(36),
- werkstoff.get(ring),
- 100,
- 4 * tVoltageMultiplier);
- if (WerkstoffLoader.boltMold != null)
- GT_Values.RA.addFluidSolidifierRecipe(
- WerkstoffLoader.boltMold.get(0L),
- werkstoff.getMolten(18),
- werkstoff.get(bolt),
- 50,
- 2 * tVoltageMultiplier);
-
- if (WerkstoffLoader.rotorMold != null)
- GT_Values.RA.addFluidSolidifierRecipe(
- WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60);
- */
+ /*
+ * !! No more hardcoded gear, etc. recipe gen, now must go through GenerationFeatures() !!
+ * GT_Values.RA.addFluidSolidifierRecipe( ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576),
+ * werkstoff.get(gearGt), 128, 8); GT_Values.RA.addFluidSolidifierRecipe(
+ * ItemList.Shape_Mold_Gear_Small.get(0L), werkstoff.getMolten(144), werkstoff.get(gearGtSmall), 16, 8);
+ * if (WerkstoffLoader.ringMold != null) GT_Values.RA.addFluidSolidifierRecipe(
+ * WerkstoffLoader.ringMold.get(0L), werkstoff.getMolten(36), werkstoff.get(ring), 100, 4 *
+ * tVoltageMultiplier); if (WerkstoffLoader.boltMold != null) GT_Values.RA.addFluidSolidifierRecipe(
+ * WerkstoffLoader.boltMold.get(0L), werkstoff.getMolten(18), werkstoff.get(bolt), 50, 2 *
+ * tVoltageMultiplier); if (WerkstoffLoader.rotorMold != null) GT_Values.RA.addFluidSolidifierRecipe(
+ * WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60);
+ */
}
+ GT_Values.RA
+ .addPulveriserRecipe(werkstoff.get(gearGt), new ItemStack[] { werkstoff.get(dust, 4) }, null, 2, 8);
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(gearGt), new ItemStack[] {werkstoff.get(dust, 4)}, null, 2, 8);
- GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(gearGtSmall), new ItemStack[] {werkstoff.get(dust, 1)}, null, 2, 8);
+ werkstoff.get(gearGtSmall),
+ new ItemStack[] { werkstoff.get(dust, 1) },
+ null,
+ 2,
+ 8);
GT_Values.RA.addPulveriserRecipe(
werkstoff.get(rotor),
- new ItemStack[] {werkstoff.get(dust, 4), werkstoff.get(dustSmall)},
+ new ItemStack[] { werkstoff.get(dust, 4), werkstoff.get(dustSmall) },
null,
2,
8);
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(ring), new ItemStack[] {werkstoff.get(dustSmall, 1)}, null, 2, 8);
+ werkstoff.get(ring),
+ new ItemStack[] { werkstoff.get(dustSmall, 1) },
+ null,
+ 2,
+ 8);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java
index 3967a56e6e..7fa823d520 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -26,6 +17,7 @@ import static gregtech.api.enums.OrePrefixes.*;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -34,6 +26,7 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
public class CrushedLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (!werkstoff.hasItemType(ore) || !werkstoff.hasItemType(dust)) return;
@@ -54,25 +47,32 @@ public class CrushedLoader implements IWerkstoffRunnable {
}
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(dustImpure), new Object[] {"h ", "W ", 'W', werkstoff.get(crushed)});
+ werkstoff.get(dustImpure),
+ new Object[] { "h ", "W ", 'W', werkstoff.get(crushed) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(dustPure), new Object[] {"h ", "W ", 'W', werkstoff.get(crushedPurified)});
+ werkstoff.get(dustPure),
+ new Object[] { "h ", "W ", 'W', werkstoff.get(crushedPurified) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(dust), new Object[] {"h ", "W ", 'W', werkstoff.get(crushedCentrifuged)});
+ werkstoff.get(dust),
+ new Object[] { "h ", "W ", 'W', werkstoff.get(crushedCentrifuged) });
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), 10, 16);
GT_ModHandler.addPulverisationRecipe(
- werkstoff.get(crushed), werkstoff.get(dustImpure), werkstoff.getOreByProduct(0, dust), 10, false);
+ werkstoff.get(crushed),
+ werkstoff.get(dustImpure),
+ werkstoff.getOreByProduct(0, dust),
+ 10,
+ false);
GT_ModHandler.addOreWasherRecipe(
werkstoff.get(crushed),
- new int[] {10000, 1111, 10000},
+ new int[] { 10000, 1111, 10000 },
1000,
werkstoff.get(crushedPurified),
werkstoff.getOreByProduct(0, dust),
GT_OreDictUnificator.get(dust, Materials.Stone, 1L));
GT_ModHandler.addThermalCentrifugeRecipe(
werkstoff.get(crushed),
- new int[] {10000, 1111, 10000},
+ new int[] { 10000, 1111, 10000 },
(int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)),
werkstoff.get(crushedCentrifuged),
werkstoff.getOreByProduct(1, dust),
@@ -80,17 +80,25 @@ public class CrushedLoader implements IWerkstoffRunnable {
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), 10, 16);
GT_ModHandler.addPulverisationRecipe(
- werkstoff.get(crushedPurified), werkstoff.get(dustPure), werkstoff.getOreByProduct(1, dust), 10, false);
+ werkstoff.get(crushedPurified),
+ werkstoff.get(dustPure),
+ werkstoff.getOreByProduct(1, dust),
+ 10,
+ false);
GT_ModHandler.addThermalCentrifugeRecipe(
werkstoff.get(crushedPurified),
- new int[] {10000, 1111},
+ new int[] { 10000, 1111 },
(int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)),
werkstoff.get(crushedCentrifuged),
werkstoff.getOreByProduct(1, dust));
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), 10, 16);
GT_ModHandler.addPulverisationRecipe(
- werkstoff.get(crushedCentrifuged), werkstoff.get(dust), werkstoff.getOreByProduct(2, dust), 10, false);
+ werkstoff.get(crushedCentrifuged),
+ werkstoff.get(dust),
+ werkstoff.getOreByProduct(2, dust),
+ 10,
+ false);
GT_Values.RA.addCentrifugeRecipe(
werkstoff.get(dustImpure),
@@ -103,7 +111,7 @@ public class CrushedLoader implements IWerkstoffRunnable {
null,
null,
null,
- new int[] {10000, 1111},
+ new int[] { 10000, 1111 },
(int) Math.max(1L, werkstoff.getStats().getMass() * 8L),
5);
GT_Values.RA.addCentrifugeRecipe(
@@ -117,15 +125,25 @@ public class CrushedLoader implements IWerkstoffRunnable {
null,
null,
null,
- new int[] {10000, 1111},
+ new int[] { 10000, 1111 },
(int) Math.max(1L, werkstoff.getStats().getMass() * 8L),
5);
if (werkstoff.contains(SubTag.CRYSTALLISABLE)) {
GT_Values.RA.addAutoclaveRecipe(
- werkstoff.get(dustPure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24);
+ werkstoff.get(dustPure),
+ Materials.Water.getFluid(200L),
+ werkstoff.get(gem),
+ 9000,
+ 2000,
+ 24);
GT_Values.RA.addAutoclaveRecipe(
- werkstoff.get(dustImpure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24);
+ werkstoff.get(dustImpure),
+ Materials.Water.getFluid(200L),
+ werkstoff.get(gem),
+ 9000,
+ 2000,
+ 24);
GT_Values.RA.addAutoclaveRecipe(
werkstoff.get(dustPure),
gregtech.api.util.GT_ModHandler.getDistilledWater(200L),
@@ -141,42 +159,39 @@ public class CrushedLoader implements IWerkstoffRunnable {
1500,
24);
}
- if (werkstoff.contains(SubTag.WASHING_MERCURY))
- GT_Values.RA.addChemicalBathRecipe(
- werkstoff.get(crushed),
- Materials.Mercury.getFluid(1000L),
- werkstoff.get(crushedPurified),
- werkstoff.getOreByProduct(1, dust),
- GT_OreDictUnificator.get(dust, Materials.Stone, 1L),
- new int[] {10000, 7000, 4000},
- 800,
- 8);
- if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE))
- GT_Values.RA.addChemicalBathRecipe(
- werkstoff.get(crushed),
- Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L),
- werkstoff.get(crushedPurified),
- werkstoff.getOreByProduct(1, dust),
- GT_OreDictUnificator.get(dust, Materials.Stone, 1L),
- new int[] {10000, 7000, 4000},
- 800,
- 8);
- if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD))
- GT_Values.RA.addElectromagneticSeparatorRecipe(
- werkstoff.get(dustPure),
- werkstoff.get(dust),
- GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L),
- GT_OreDictUnificator.get(nugget, Materials.Gold, 1L),
- new int[] {10000, 4000, 2000},
- 400,
- 24);
+ if (werkstoff.contains(SubTag.WASHING_MERCURY)) GT_Values.RA.addChemicalBathRecipe(
+ werkstoff.get(crushed),
+ Materials.Mercury.getFluid(1000L),
+ werkstoff.get(crushedPurified),
+ werkstoff.getOreByProduct(1, dust),
+ GT_OreDictUnificator.get(dust, Materials.Stone, 1L),
+ new int[] { 10000, 7000, 4000 },
+ 800,
+ 8);
+ if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) GT_Values.RA.addChemicalBathRecipe(
+ werkstoff.get(crushed),
+ Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L),
+ werkstoff.get(crushedPurified),
+ werkstoff.getOreByProduct(1, dust),
+ GT_OreDictUnificator.get(dust, Materials.Stone, 1L),
+ new int[] { 10000, 7000, 4000 },
+ 800,
+ 8);
+ if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) GT_Values.RA.addElectromagneticSeparatorRecipe(
+ werkstoff.get(dustPure),
+ werkstoff.get(dust),
+ GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L),
+ GT_OreDictUnificator.get(nugget, Materials.Gold, 1L),
+ new int[] { 10000, 4000, 2000 },
+ 400,
+ 24);
else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON))
GT_Values.RA.addElectromagneticSeparatorRecipe(
werkstoff.get(dustPure),
werkstoff.get(dust),
GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L),
GT_OreDictUnificator.get(nugget, Materials.Iron, 1L),
- new int[] {10000, 4000, 2000},
+ new int[] { 10000, 4000, 2000 },
400,
24);
else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM))
@@ -185,7 +200,7 @@ public class CrushedLoader implements IWerkstoffRunnable {
werkstoff.get(dust),
GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L),
GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L),
- new int[] {10000, 4000, 2000},
+ new int[] { 10000, 4000, 2000 },
400,
24);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
index 3abe76739a..cba5049dbe 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
@@ -1,34 +1,33 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.Pair;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -37,11 +36,6 @@ import gregtech.api.interfaces.ISubTagContainer;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class DustLoader implements IWerkstoffRunnable {
@@ -54,16 +48,15 @@ public class DustLoader implements IWerkstoffRunnable {
HashMap<ISubTagContainer, Pair<Integer, Integer>> tracker = new HashMap<>();
int cells = 0;
- if (werkstoff.getGenerationFeatures().hasMixerRecipes()
- || werkstoff.getStats().isElektrolysis()
+ if (werkstoff.getGenerationFeatures().hasMixerRecipes() || werkstoff.getStats().isElektrolysis()
|| werkstoff.getStats().isCentrifuge()
|| werkstoff.getGenerationFeatures().hasChemicalRecipes()) {
- for (Pair<ISubTagContainer, Integer> container :
- werkstoff.getContents().getValue().toArray(new Pair[0])) {
+ for (Pair<ISubTagContainer, Integer> container : werkstoff.getContents().getValue()
+ .toArray(new Pair[0])) {
if (container.getKey() instanceof Materials) {
if ((((Materials) container.getKey()).getGas(0) != null
- || ((Materials) container.getKey()).getFluid(0) != null
- || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID)
+ || ((Materials) container.getKey()).getFluid(0) != null
+ || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID)
&& ((Materials) container.getKey()).getDust(0) == null) {
FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000L * container.getValue());
if (tmpFl == null || tmpFl.getFluid() == null) {
@@ -74,14 +67,13 @@ public class DustLoader implements IWerkstoffRunnable {
if (!tracker.containsKey(container.getKey())) {
stOutputs.add(((Materials) container.getKey()).getCells(container.getValue()));
tracker.put(
- container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
+ container.getKey(),
+ new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Materials) container.getKey())
- .getCells(tracker.get(container.getKey())
- .getKey()
- + container.getValue()));
- stOutputs.remove(
- tracker.get(container.getKey()).getValue() + 1);
+ stOutputs.add(
+ ((Materials) container.getKey()).getCells(
+ tracker.get(container.getKey()).getKey() + container.getValue()));
+ stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
cells += container.getValue();
}
@@ -90,8 +82,8 @@ public class DustLoader implements IWerkstoffRunnable {
if (((Materials) container.getKey()).getCells(container.getValue()) != null
&& (((Materials) container.getKey()).getMolten(0) != null
|| ((Materials) container.getKey()).getSolid(0) != null)) {
- FluidStack tmpFl =
- ((Materials) container.getKey()).getMolten(1000L * container.getValue());
+ FluidStack tmpFl = ((Materials) container.getKey())
+ .getMolten(1000L * container.getValue());
if (tmpFl == null || tmpFl.getFluid() == null) {
tmpFl = ((Materials) container.getKey()).getSolid(1000L * container.getValue());
}
@@ -104,13 +96,11 @@ public class DustLoader implements IWerkstoffRunnable {
container.getKey(),
new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Materials) container.getKey())
- .getCells(tracker.get(container.getKey())
- .getKey()
- + container.getValue()));
- stOutputs.remove(tracker.get(container.getKey())
- .getValue()
- + 1);
+ stOutputs.add(
+ ((Materials) container.getKey()).getCells(
+ tracker.get(container.getKey()).getKey()
+ + container.getValue()));
+ stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
cells += container.getValue();
}
@@ -120,16 +110,17 @@ public class DustLoader implements IWerkstoffRunnable {
stOutputs.add(((Materials) container.getKey()).getDust(container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Materials) container.getKey())
- .getDust(tracker.get(container.getKey()).getKey() + container.getValue()));
+ stOutputs.add(
+ ((Materials) container.getKey()).getDust(
+ tracker.get(container.getKey()).getKey() + container.getValue()));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
}
} else if (container.getKey() instanceof Werkstoff) {
if (((Werkstoff) container.getKey()).getStats().isGas()
|| ((Werkstoff) container.getKey()).hasItemType(cell)) {
- FluidStack tmpFl =
- ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue());
+ FluidStack tmpFl = ((Werkstoff) container.getKey())
+ .getFluidOrGas(1000 * container.getValue());
if (tmpFl == null || tmpFl.getFluid() == null) {
tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue());
}
@@ -138,16 +129,14 @@ public class DustLoader implements IWerkstoffRunnable {
if (!tracker.containsKey(container.getKey())) {
stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue()));
tracker.put(
- container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
+ container.getKey(),
+ new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Werkstoff) container.getKey())
- .get(
+ stOutputs.add(
+ ((Werkstoff) container.getKey()).get(
cell,
- tracker.get(container.getKey())
- .getKey()
- + container.getValue()));
- stOutputs.remove(
- tracker.get(container.getKey()).getValue() + 1);
+ tracker.get(container.getKey()).getKey() + container.getValue()));
+ stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
}
cells += container.getValue();
}
@@ -157,8 +146,8 @@ public class DustLoader implements IWerkstoffRunnable {
stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue()));
tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1));
} else {
- stOutputs.add(((Werkstoff) container.getKey())
- .get(
+ stOutputs.add(
+ ((Werkstoff) container.getKey()).get(
dust,
(tracker.get(container.getKey()).getKey() + container.getValue())));
stOutputs.remove(tracker.get(container.getKey()).getValue() + 1);
@@ -171,80 +160,87 @@ public class DustLoader implements IWerkstoffRunnable {
if (werkstoff.getStats().isElektrolysis()) {
GT_Recipe tRecipe = new BWRecipes.DynamicGTRecipe(
true,
- new ItemStack[] {input, cells > 0 ? Materials.Empty.getCells(cells) : null},
+ new ItemStack[] { input, cells > 0 ? Materials.Empty.getCells(cells) : null },
stOutputs.toArray(new ItemStack[0]),
null,
null,
- new FluidStack[] {null},
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
+ new FluidStack[] { null },
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
(int) Math.max(
1L,
- Math.abs(werkstoff.getStats().getProtons()
- / werkstoff.getContents().getValue().size())),
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ / werkstoff.getContents().getValue().size())),
Math.min(4, werkstoff.getContents().getValue().size()) * 30,
0);
GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(tRecipe);
GT_Recipe.GT_Recipe_Map.sMultiblockElectrolyzerRecipes.add(tRecipe);
}
if (werkstoff.getStats().isCentrifuge()) {
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- new ItemStack[] {input, cells > 0 ? Materials.Empty.getCells(cells) : null},
- stOutputs.toArray(new ItemStack[0]),
- null,
- null,
- new FluidStack[] {null},
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
- (int) Math.max(
- 1L,
- Math.abs(werkstoff.getStats().getMass()
- / werkstoff.getContents().getValue().size())),
- Math.min(4, werkstoff.getContents().getValue().size()) * 5,
- 0));
+ GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ new ItemStack[] { input, cells > 0 ? Materials.Empty.getCells(cells) : null },
+ stOutputs.toArray(new ItemStack[0]),
+ null,
+ null,
+ new FluidStack[] { null },
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats().getMass()
+ / werkstoff.getContents().getValue().size())),
+ Math.min(4, werkstoff.getContents().getValue().size()) * 5,
+ 0));
GT_Recipe tRecipe = new GT_Recipe(
false,
stOutputs.toArray(new ItemStack[0]),
- new ItemStack[] {input},
+ new ItemStack[] { input },
null,
null,
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
null,
(int) Math.max(
1L,
- Math.abs(werkstoff.getStats().getProtons()
- / werkstoff.getContents().getValue().size())),
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ / werkstoff.getContents().getValue().size())),
Math.min(4, werkstoff.getContents().getValue().size()) * 30,
0);
GT_Recipe.GT_Recipe_Map.sMultiblockCentrifugeRecipes.add(tRecipe);
}
if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) {
if (cells > 0) stOutputs.add(Materials.Empty.getCells(cells));
- GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- stOutputs.toArray(new ItemStack[0]),
- new ItemStack[] {input},
- null,
- null,
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
- null,
- (int) Math.max(
- 1L,
- Math.abs(werkstoff.getStats().getProtons()
- / werkstoff.getContents().getValue().size())),
- Math.min(4, werkstoff.getContents().getValue().size()) * 30,
- 0));
+ GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ stOutputs.toArray(new ItemStack[0]),
+ new ItemStack[] { input },
+ null,
+ null,
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ null,
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ / werkstoff.getContents().getValue().size())),
+ Math.min(4, werkstoff.getContents().getValue().size()) * 30,
+ 0));
GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(
true,
stOutputs.toArray(new ItemStack[0]),
- new ItemStack[] {input},
+ new ItemStack[] { input },
null,
null,
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
null,
(int) Math.max(
1L,
- Math.abs(werkstoff.getStats().getProtons()
- / werkstoff.getContents().getValue().size())),
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ / werkstoff.getContents().getValue().size())),
Math.min(4, werkstoff.getContents().getValue().size()) * 30,
0);
}
@@ -253,32 +249,35 @@ public class DustLoader implements IWerkstoffRunnable {
short circuitID = werkstoff.getMixCircuit();
ItemStack circuit = circuitID == -1 ? null : GT_Utility.getIntegratedCircuit(circuitID);
if (circuit != null) stOutputs.add(circuit);
- GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- stOutputs.toArray(new ItemStack[0]),
- new ItemStack[] {input},
- null,
- null,
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
- null,
- (int) Math.max(
- 1L,
- Math.abs(werkstoff.getStats().getMass()
- / werkstoff.getContents().getValue().size())),
- Math.min(4, werkstoff.getContents().getValue().size()) * 5,
- 0));
+ GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ stOutputs.toArray(new ItemStack[0]),
+ new ItemStack[] { input },
+ null,
+ null,
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
+ null,
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats().getMass()
+ / werkstoff.getContents().getValue().size())),
+ Math.min(4, werkstoff.getContents().getValue().size()) * 5,
+ 0));
GT_Recipe tRecipe = new GT_Recipe(
false,
stOutputs.toArray(new ItemStack[0]),
- new ItemStack[] {input},
+ new ItemStack[] { input },
null,
null,
- new FluidStack[] {flOutputs.size() > 0 ? flOutputs.get(0) : null},
+ new FluidStack[] { flOutputs.size() > 0 ? flOutputs.get(0) : null },
null,
(int) Math.max(
1L,
- Math.abs(werkstoff.getStats().getProtons()
- / werkstoff.getContents().getValue().size())),
+ Math.abs(
+ werkstoff.getStats().getProtons()
+ / werkstoff.getContents().getValue().size())),
Math.min(4, werkstoff.getContents().getValue().size()) * 30,
0);
GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.add(tRecipe);
@@ -286,92 +285,108 @@ public class DustLoader implements IWerkstoffRunnable {
}
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(dust), new Object[] {"TTT", "TTT", "TTT", 'T', werkstoff.get(dustTiny)});
+ werkstoff.get(dust),
+ new Object[] { "TTT", "TTT", "TTT", 'T', werkstoff.get(dustTiny) });
GT_ModHandler.addCraftingRecipe(
werkstoff.get(dust),
- new Object[] {"TT ", "TT ", 'T', WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff)});
+ new Object[] { "TT ", "TT ", 'T',
+ WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff) });
GT_ModHandler.addCraftingRecipe(
WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff, 4),
- new Object[] {" T ", 'T', werkstoff.get(dust)});
+ new Object[] { " T ", 'T', werkstoff.get(dust) });
GT_ModHandler.addCraftingRecipe(
WerkstoffLoader.getCorrespondingItemStack(dustTiny, werkstoff, 9),
- new Object[] {"T ", 'T', werkstoff.get(dust)});
+ new Object[] { "T ", 'T', werkstoff.get(dust) });
GT_Values.RA.addBoxingRecipe(
- werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4);
+ werkstoff.get(dustTiny, 9),
+ ItemList.Schematic_Dust.get(0L),
+ werkstoff.get(dust),
+ 100,
+ 4);
GT_Values.RA.addBoxingRecipe(
- werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4);
+ werkstoff.get(dustSmall, 4),
+ ItemList.Schematic_Dust.get(0L),
+ werkstoff.get(dust),
+ 100,
+ 4);
GT_Values.RA.addBoxingRecipe(
- werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L), werkstoff.get(dust), 100, 4);
+ werkstoff.get(dustTiny, 9),
+ ItemList.Schematic_3by3.get(0L),
+ werkstoff.get(dust),
+ 100,
+ 4);
GT_Values.RA.addBoxingRecipe(
- werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L), werkstoff.get(dust), 100, 4);
+ werkstoff.get(dustSmall, 4),
+ ItemList.Schematic_2by2.get(0L),
+ werkstoff.get(dust),
+ 100,
+ 4);
if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) {
GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot));
GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustTiny), werkstoff.get(nugget));
- } else if (werkstoff.hasItemType(ingot)
- && werkstoff.getStats().isBlastFurnace()
+ } else if (werkstoff.hasItemType(ingot) && werkstoff.getStats().isBlastFurnace()
&& werkstoff.getStats().getMeltingPoint() != 0) {
- if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) {
- GT_Values.RA.addBlastRecipe(
- werkstoff.get(dust),
- GT_Utility.getIntegratedCircuit(11),
- Materials.Nitrogen.getGas(1000),
- null,
- werkstoff.getStats().getMeltingPoint() < 1750
- ? werkstoff.get(ingot)
- : werkstoff.get(ingotHot),
- null,
- (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
- * werkstoff.getStats().getMeltingPoint(),
- werkstoff.getStats().getMeltingVoltage(),
- werkstoff.getStats().getMeltingPoint());
- } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) {
- GT_Values.RA.addBlastRecipe(
- werkstoff.get(dust),
- GT_Utility.getIntegratedCircuit(11),
- Materials.Argon.getGas(1000),
- null,
- werkstoff.getStats().getMeltingPoint() < 1750
- ? werkstoff.get(ingot)
- : werkstoff.get(ingotHot),
- null,
- (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
- * werkstoff.getStats().getMeltingPoint(),
- werkstoff.getStats().getMeltingVoltage(),
- werkstoff.getStats().getMeltingPoint());
- } else {
- GT_Values.RA.addBlastRecipe(
- werkstoff.get(dust),
- GT_Utility.getIntegratedCircuit(1),
- null,
- null,
- werkstoff.getStats().getMeltingPoint() < 1750
- ? werkstoff.get(ingot)
- : werkstoff.get(ingotHot),
- null,
- (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
- * werkstoff.getStats().getMeltingPoint(),
- werkstoff.getStats().getMeltingVoltage(),
- werkstoff.getStats().getMeltingPoint());
- if (werkstoff.getStats().getMeltingPoint() <= 1000) {
- GT_Values.RA.addPrimitiveBlastRecipe(
- werkstoff.get(dust),
- null,
- 9,
- werkstoff.get(ingot),
- null,
- (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
- * werkstoff.getStats().getMeltingPoint());
- // GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust),
- // werkstoff.getStats().getMeltingPoint());
+ if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) {
+ GT_Values.RA.addBlastRecipe(
+ werkstoff.get(dust),
+ GT_Utility.getIntegratedCircuit(11),
+ Materials.Nitrogen.getGas(1000),
+ null,
+ werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot)
+ : werkstoff.get(ingotHot),
+ null,
+ (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
+ * werkstoff.getStats().getMeltingPoint(),
+ werkstoff.getStats().getMeltingVoltage(),
+ werkstoff.getStats().getMeltingPoint());
+ } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) {
+ GT_Values.RA.addBlastRecipe(
+ werkstoff.get(dust),
+ GT_Utility.getIntegratedCircuit(11),
+ Materials.Argon.getGas(1000),
+ null,
+ werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot)
+ : werkstoff.get(ingotHot),
+ null,
+ (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
+ * werkstoff.getStats().getMeltingPoint(),
+ werkstoff.getStats().getMeltingVoltage(),
+ werkstoff.getStats().getMeltingPoint());
+ } else {
+ GT_Values.RA.addBlastRecipe(
+ werkstoff.get(dust),
+ GT_Utility.getIntegratedCircuit(1),
+ null,
+ null,
+ werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot)
+ : werkstoff.get(ingotHot),
+ null,
+ (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
+ * werkstoff.getStats().getMeltingPoint(),
+ werkstoff.getStats().getMeltingVoltage(),
+ werkstoff.getStats().getMeltingPoint());
+ if (werkstoff.getStats().getMeltingPoint() <= 1000) {
+ GT_Values.RA.addPrimitiveBlastRecipe(
+ werkstoff.get(dust),
+ null,
+ 9,
+ werkstoff.get(ingot),
+ null,
+ (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L)
+ * werkstoff.getStats().getMeltingPoint());
+ // GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust),
+ // werkstoff.getStats().getMeltingPoint());
+ }
+ }
}
- }
- }
if (werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().getMeltingPoint() > 1750) {
- GT_Values.RA.addVacuumFreezerRecipe(werkstoff.get(ingotHot), werkstoff.get(ingot), (int)
- Math.max(werkstoff.getStats().getMass() * 3L, 1L));
+ GT_Values.RA.addVacuumFreezerRecipe(
+ werkstoff.get(ingotHot),
+ werkstoff.get(ingot),
+ (int) Math.max(werkstoff.getStats().getMass() * 3L, 1L));
}
if (werkstoff.hasItemType(ingot)) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java
index d8ee81065b..d8a8269888 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java
@@ -1,33 +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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -35,8 +30,6 @@ import gregtech.api.enums.Textures;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
public class GemLoader implements IWerkstoffRunnable {
@@ -50,15 +43,9 @@ public class GemLoader implements IWerkstoffRunnable {
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(block), werkstoff.get(gem, 9), 100, 24);
GT_Values.RA.addSifterRecipe(
werkstoff.get(crushedPurified),
- new ItemStack[] {
- werkstoff.get(gemExquisite),
- werkstoff.get(gemFlawless),
- werkstoff.get(gem),
- werkstoff.get(gemFlawed),
- werkstoff.get(gemChipped),
- werkstoff.get(dust)
- },
- new int[] {200, 1000, 2500, 2000, 4000, 5000},
+ new ItemStack[] { werkstoff.get(gemExquisite), werkstoff.get(gemFlawless), werkstoff.get(gem),
+ werkstoff.get(gemFlawed), werkstoff.get(gemChipped), werkstoff.get(dust) },
+ new int[] { 200, 1000, 2500, 2000, 4000, 5000 },
800,
16);
}
@@ -70,13 +57,21 @@ public class GemLoader implements IWerkstoffRunnable {
GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemChipped), werkstoff.get(dustSmall));
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(gemFlawless, 2), 0, new Object[] {"h ", "W ", 'W', werkstoff.get(gemExquisite)});
+ werkstoff.get(gemFlawless, 2),
+ 0,
+ new Object[] { "h ", "W ", 'W', werkstoff.get(gemExquisite) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(gem, 2), 0, new Object[] {"h ", "W ", 'W', werkstoff.get(gemFlawless)});
+ werkstoff.get(gem, 2),
+ 0,
+ new Object[] { "h ", "W ", 'W', werkstoff.get(gemFlawless) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(gemFlawed, 2), 0, new Object[] {"h ", "W ", 'W', werkstoff.get(gem)});
+ werkstoff.get(gemFlawed, 2),
+ 0,
+ new Object[] { "h ", "W ", 'W', werkstoff.get(gem) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(gemChipped, 2), 0, new Object[] {"h ", "W ", 'W', werkstoff.get(gemFlawed)});
+ werkstoff.get(gemChipped, 2),
+ 0,
+ new Object[] { "h ", "W ", 'W', werkstoff.get(gemFlawed) });
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemExquisite), werkstoff.get(gemFlawless, 2), 64, 16);
GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawless), werkstoff.get(gem, 2), 64, 16);
@@ -114,12 +109,12 @@ public class GemLoader implements IWerkstoffRunnable {
}
if (werkstoff.hasItemType(plate)) {
- GT_Values.RA.addLatheRecipe(
- werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120);
+ GT_Values.RA
+ .addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120);
}
- GT_Values.RA.addLatheRecipe(
- werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30);
+ GT_Values.RA
+ .addLatheRecipe(werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30);
GregTech_API.registerCover(
werkstoff.get(lens),
TextureFactory.of(
@@ -128,16 +123,20 @@ public class GemLoader implements IWerkstoffRunnable {
new gregtech.common.covers.GT_Cover_Lens(BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex));
GT_ModHandler.addPulverisationRecipe(werkstoff.get(lens), werkstoff.get(dustSmall, 3));
- for (ItemStack is : OreDictionary.getOres("craftingLens"
- + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) {
+ for (ItemStack is : OreDictionary.getOres(
+ "craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) {
is.stackSize = 0;
- GT_Values.RA.addLaserEngraverRecipe(
- werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30);
+ GT_Values.RA
+ .addLaserEngraverRecipe(werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30);
GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawed, 3), is, werkstoff.get(gem, 1), 600, 120);
+ GT_Values.RA
+ .addLaserEngraverRecipe(werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480);
GT_Values.RA.addLaserEngraverRecipe(
- werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480);
- GT_Values.RA.addLaserEngraverRecipe(
- werkstoff.get(gemFlawless, 3), is, werkstoff.get(gemExquisite, 1), 2400, 2000);
+ werkstoff.get(gemFlawless, 3),
+ is,
+ werkstoff.get(gemExquisite, 1),
+ 2400,
+ 2000);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java
index 874d82859d..47716b0404 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -27,11 +18,13 @@ import static gregtech.api.enums.OrePrefixes.ingot;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_ModHandler;
public class MetalLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (werkstoff.hasItemType(ingot)) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java
index a54f15fcd3..7d9b3daa98 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -25,20 +16,24 @@ package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.rec
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.capsuleMolten;
import static gregtech.api.enums.OrePrefixes.*;
+import java.util.Objects;
+
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
-import java.util.Objects;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class MoltenCellLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (!werkstoff.hasItemType(WerkstoffLoader.cellMolten)) return;
@@ -217,7 +212,9 @@ public class MoltenCellLoader implements IWerkstoffRunnable {
werkstoff.get(WerkstoffLoader.cellMolten),
Materials.Empty.getCells(1));
FluidContainerRegistry.registerFluidContainer(
- werkstoff.getMolten(144), werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1));
+ werkstoff.getMolten(144),
+ werkstoff.get(WerkstoffLoader.cellMolten),
+ Materials.Empty.getCells(1));
GT_Utility.addFluidContainerData(data);
GT_Values.RA.addFluidCannerRecipe(
Materials.Empty.getCells(1),
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java
index 135ee00218..72cce06013 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java
@@ -1,60 +1,59 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.item.ItemStack;
public class MultipleMetalLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (werkstoff.hasItemType(plateDense)) {
- GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- new ItemStack[] {werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2)},
- new ItemStack[] {werkstoff.get(plateDouble)},
- null,
- null,
- null,
- null,
- (int) Math.max(werkstoff.getStats().getMass() * 2, 1L),
- 60,
- 0));
+ GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ new ItemStack[] { werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2) },
+ new ItemStack[] { werkstoff.get(plateDouble) },
+ null,
+ null,
+ null,
+ null,
+ (int) Math.max(werkstoff.getStats().getMass() * 2, 1L),
+ 60,
+ 0));
GregTech_API.registerCover(
werkstoff.get(plateDouble),
TextureFactory.of(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false),
null);
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(plateDouble), new ItemStack[] {werkstoff.get(dust, 2)}, null, 2, 8);
+ werkstoff.get(plateDouble),
+ new ItemStack[] { werkstoff.get(dust, 2) },
+ null,
+ 2,
+ 8);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java
index a17efb4e6e..ab436d896b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -27,19 +18,19 @@ import static gregtech.api.enums.OrePrefixes.*;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.SubTag;
import gregtech.api.util.GT_ModHandler;
public class OreLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
- if (werkstoff.hasItemType(ore)
- && werkstoff.hasItemType(ingot)
- && !werkstoff.getStats().isBlastFurnace())
- GT_ModHandler.addSmeltingRecipe(
- WerkstoffLoader.getCorrespondingItemStack(ore, werkstoff), werkstoff.get(ingot));
+ if (werkstoff.hasItemType(ore) && werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace())
+ GT_ModHandler
+ .addSmeltingRecipe(WerkstoffLoader.getCorrespondingItemStack(ore, werkstoff), werkstoff.get(ingot));
if (werkstoff.hasItemType(ore)) {
GT_Values.RA.addForgeHammerRecipe(
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java
index a2418deed6..19bc6ecfb7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java
@@ -1,34 +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.system.material.werkstoff_loaders.recipe;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
@@ -39,9 +33,9 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy;
-import net.minecraft.item.ItemStack;
public class SimpleMetalLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
if (werkstoff.hasItemType(plate)) {
@@ -53,10 +47,13 @@ public class SimpleMetalLoader implements IWerkstoffRunnable {
(int) Math.max(werkstoff.getStats().getMass() * 5L, 1L),
16);
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[] {"s", "X", 'X', werkstoff.get(stickLong)
- });
+ werkstoff.get(stick, 2),
+ GT_Proxy.tBits,
+ new Object[] { "s", "X", 'X', werkstoff.get(stickLong) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(stick), GT_Proxy.tBits, new Object[] {"f ", " X", 'X', werkstoff.get(gem)});
+ werkstoff.get(stick),
+ GT_Proxy.tBits,
+ new Object[] { "f ", " X", 'X', werkstoff.get(gem) });
GT_Values.RA.addForgeHammerRecipe(
werkstoff.get(stick, 2),
werkstoff.get(stickLong),
@@ -66,38 +63,47 @@ public class SimpleMetalLoader implements IWerkstoffRunnable {
TextureSet texSet = werkstoff.getTexSet();
ITexture texture = SideReference.Side.Client
? TextureFactory.of(
- texSet.mTextures[
- PrefixTextureLinker.blockTexMap.getOrDefault(texSet, block.mTextureIndex)],
+ texSet.mTextures[PrefixTextureLinker.blockTexMap
+ .getOrDefault(texSet, block.mTextureIndex)],
werkstoff.getRGBA(),
false)
: TextureFactory.of(texSet.mTextures[block.mTextureIndex], werkstoff.getRGBA(), false);
GregTech_API.registerCover(werkstoff.get(plate), texture, null);
- GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(plate), new ItemStack[] {werkstoff.get(dust)}, null, 2, 8);
+ GT_Values.RA
+ .addPulveriserRecipe(werkstoff.get(plate), new ItemStack[] { werkstoff.get(dust) }, null, 2, 8);
return;
}
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[] {"s", "X", 'X', werkstoff.get(stickLong)});
+ werkstoff.get(stick, 2),
+ GT_Proxy.tBits,
+ new Object[] { "s", "X", 'X', werkstoff.get(stickLong) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(stick), GT_Proxy.tBits, new Object[] {"f ", " X", 'X', werkstoff.get(ingot)});
+ werkstoff.get(stick),
+ GT_Proxy.tBits,
+ new Object[] { "f ", " X", 'X', werkstoff.get(ingot) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(plate), GT_Proxy.tBits, new Object[] {"h", "X", "X", 'X', werkstoff.get(ingot)});
+ werkstoff.get(plate),
+ GT_Proxy.tBits,
+ new Object[] { "h", "X", "X", 'X', werkstoff.get(ingot) });
GT_ModHandler.addCraftingRecipe(
- werkstoff.get(foil, 2), GT_Proxy.tBits, new Object[] {"hX", 'X', werkstoff.get(plate)});
+ werkstoff.get(foil, 2),
+ GT_Proxy.tBits,
+ new Object[] { "hX", 'X', werkstoff.get(plate) });
- GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(
- true,
- new ItemStack[] {werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1)},
- new ItemStack[] {werkstoff.get(plate)},
- null,
- null,
- null,
- null,
- (int) Math.max(werkstoff.getStats().getMass(), 1L),
- 24,
- 0));
+ GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(
+ new BWRecipes.DynamicGTRecipe(
+ true,
+ new ItemStack[] { werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1) },
+ new ItemStack[] { werkstoff.get(plate) },
+ null,
+ null,
+ null,
+ null,
+ (int) Math.max(werkstoff.getStats().getMass(), 1L),
+ 24,
+ 0));
GT_Values.RA.addForgeHammerRecipe(
werkstoff.get(ingot, 3),
werkstoff.get(plate, 2),
@@ -148,12 +154,16 @@ public class SimpleMetalLoader implements IWerkstoffRunnable {
(int) Math.max(werkstoff.getStats().getMass() * 2L, 1L),
45);
- GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[] {werkstoff.get(dust)}, null, 2, 8);
- GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[] {werkstoff.get(dust)}, null, 2, 8);
- GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(stickLong), new ItemStack[] {werkstoff.get(dust)}, null, 2, 8);
+ GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[] { werkstoff.get(dust) }, null, 2, 8);
+ GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[] { werkstoff.get(dust) }, null, 2, 8);
+ GT_Values.RA
+ .addPulveriserRecipe(werkstoff.get(stickLong), new ItemStack[] { werkstoff.get(dust) }, null, 2, 8);
GT_Values.RA.addPulveriserRecipe(
- werkstoff.get(stick), new ItemStack[] {werkstoff.get(dustSmall, 2)}, null, 2, 8);
+ werkstoff.get(stick),
+ new ItemStack[] { werkstoff.get(dustSmall, 2) },
+ null,
+ 2,
+ 8);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java
index 9744bdf89c..6456c9789b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.recipe;
@@ -25,8 +16,12 @@ package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.rec
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.gtnhGT;
import static gregtech.api.enums.OrePrefixes.*;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
@@ -35,8 +30,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.common.GT_Proxy;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
public class ToolLoader implements IWerkstoffRunnable {
@@ -50,28 +43,20 @@ public class ToolLoader implements IWerkstoffRunnable {
if (werkstoff.getBridgeMaterial().mDurability == 0) return;
if (werkstoff.hasItemType(gem)) {
- if (!werkstoff.getGenerationFeatures().isExtension())
- GT_ModHandler.addCraftingRecipe(
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.HARDHAMMER,
- 1,
- werkstoff.getBridgeMaterial(),
- werkstoff.getBridgeMaterial().mHandleMaterial,
- null),
- GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "XX ",
- "XXS",
- "XX ",
- 'X',
- gem.get(werkstoff.getBridgeMaterial()),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ if (!werkstoff.getGenerationFeatures().isExtension()) GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.HARDHAMMER,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ werkstoff.getBridgeMaterial().mHandleMaterial,
+ null),
+ GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[] { "XX ", "XXS", "XX ", 'X', gem.get(werkstoff.getBridgeMaterial()), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L),
GT_Proxy.tBits,
- new Object[] {"GGf", 'G', gem.get(werkstoff.getBridgeMaterial())});
+ new Object[] { "GGf", 'G', gem.get(werkstoff.getBridgeMaterial()) });
}
if (!werkstoff.hasItemType(plate)) return;
@@ -86,31 +71,15 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial().mHandleMaterial,
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- " fS",
- " Sh",
- "W ",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'W',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { " fS", " Sh", "W ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(toolHeadWrench, werkstoff.getBridgeMaterial(), 1L),
GT_Proxy.tBits,
- new Object[] {
- "hXW",
- "XRX",
- "WXd",
- 'X',
- plate.get(werkstoff.getBridgeMaterial()),
- 'S',
- plate.get(werkstoff.getBridgeMaterial().mHandleMaterial),
- 'R',
- ring.get(werkstoff.getBridgeMaterial().mHandleMaterial),
- 'W',
- screw.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { "hXW", "XRX", "WXd", 'X', plate.get(werkstoff.getBridgeMaterial()), 'S',
+ plate.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'R',
+ ring.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'W',
+ screw.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addShapelessCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.HARDHAMMER,
@@ -119,10 +88,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial().mHandleMaterial,
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- toolHeadHammer.get(werkstoff.getBridgeMaterial()),
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { toolHeadHammer.get(werkstoff.getBridgeMaterial()),
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.FILE,
@@ -130,18 +97,10 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
werkstoff.getBridgeMaterial().mHandleMaterial,
null),
- GT_ModHandler.RecipeBits.MIRRORED
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "P",
- "P",
- "S",
- 'P',
- plate.get(werkstoff.getBridgeMaterial()),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { "P", "P", "S", 'P', plate.get(werkstoff.getBridgeMaterial()), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addShapelessCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.SAW,
@@ -149,73 +108,46 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
werkstoff.getBridgeMaterial().mHandleMaterial,
null),
- new Object[] {
- toolHeadSaw.get(werkstoff.getBridgeMaterial()),
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { toolHeadSaw.get(werkstoff.getBridgeMaterial()),
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV,
1,
werkstoff.getBridgeMaterial(),
Materials.Rubber,
- new long[] {100000L, 32L, 1L, -1L}),
+ new long[] { 100000L, 32L, 1L, -1L }),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "LBf",
- "Sd ",
- "P ",
- 'B',
- bolt.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(Materials.AnyRubber),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial),
- 'L',
- ItemList.Battery_RE_LV_Lithium.get(1L)
- });
+ new Object[] { "LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(Materials.AnyRubber), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L',
+ ItemList.Battery_RE_LV_Lithium.get(1L) });
if (gtnhGT) {
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SOLDERING_IRON_MV, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[] {
- 400000L, 128L, 2L, -1L
- }),
+ SOLDERING_IRON_MV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Rubber,
+ new long[] { 400000L, 128L, 2L, -1L }),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "LBf",
- "Sd ",
- "P ",
- 'B',
- bolt.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(Materials.AnyRubber),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial),
- 'L',
- ItemList.Battery_RE_MV_Lithium.get(1L)
- });
+ new Object[] { "LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(Materials.AnyRubber), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L',
+ ItemList.Battery_RE_MV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
SOLDERING_IRON_HV,
1,
werkstoff.getBridgeMaterial(),
Materials.StyreneButadieneRubber,
- new long[] {1600000L, 512L, 3L, -1L}),
+ new long[] { 1600000L, 512L, 3L, -1L }),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "LBf",
- "Sd ",
- "P ",
- 'B',
- bolt.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(Materials.StyreneButadieneRubber),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial),
- 'L',
- ItemList.Battery_RE_HV_Lithium.get(1L)
- });
+ new Object[] { "LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(Materials.StyreneButadieneRubber), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L',
+ ItemList.Battery_RE_HV_Lithium.get(1L) });
}
if (!werkstoff.hasItemType(gem)) {
@@ -227,15 +159,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial().mHandleMaterial,
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "XX ",
- "XXS",
- "XX ",
- 'X',
- ingot.get(werkstoff.getBridgeMaterial()),
- 'S',
- stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)
- });
+ new Object[] { "XX ", "XXS", "XX ", 'X', ingot.get(werkstoff.getBridgeMaterial()), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
}
}
@@ -247,15 +172,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "xRR",
- " SR",
- "S f",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'R',
- plate.get(Materials.AnyRubber)
- });
+ new Object[] { "xRR", " SR", "S f", 'S', stick.get(werkstoff.getBridgeMaterial()), 'R',
+ plate.get(Materials.AnyRubber) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH,
@@ -264,7 +182,7 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {"IhI", "III", " I ", 'I', ingot.get(werkstoff.getBridgeMaterial())});
+ new Object[] { "IhI", "III", " I ", 'I', ingot.get(werkstoff.getBridgeMaterial()) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.CROWBAR,
@@ -273,7 +191,7 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {"hDS", "DSD", "SDf", 'S', stick.get(werkstoff.getBridgeMaterial()), 'D', Dyes.dyeBlue});
+ new Object[] { "hDS", "DSD", "SDf", 'S', stick.get(werkstoff.getBridgeMaterial()), 'D', Dyes.dyeBlue });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
@@ -283,17 +201,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PfP",
- "hPd",
- "STS",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(werkstoff.getBridgeMaterial()),
- 'T',
- screw.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "PfP", "hPd", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial()) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.SCOOP,
@@ -302,15 +211,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SWS",
- "SSS",
- "xSh",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'W',
- new ItemStack(Blocks.wool, 1, 32767)
- });
+ new Object[] { "SWS", "SSS", "xSh", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W',
+ new ItemStack(Blocks.wool, 1, 32767) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.BRANCHCUTTER,
@@ -319,17 +221,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PfP",
- "PdP",
- "STS",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(werkstoff.getBridgeMaterial()),
- 'T',
- screw.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "PfP", "PdP", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial()) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.KNIFE,
@@ -338,14 +231,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "fPh",
- " S ",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "fPh", " S ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(werkstoff.getBridgeMaterial()) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.BUTCHERYKNIFE,
@@ -354,15 +241,8 @@ public class ToolLoader implements IWerkstoffRunnable {
werkstoff.getBridgeMaterial(),
null),
GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PPf",
- "PP ",
- "Sh ",
- 'S',
- stick.get(werkstoff.getBridgeMaterial()),
- 'P',
- plate.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "PPf", "PP ", "Sh ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P',
+ plate.get(werkstoff.getBridgeMaterial()) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
@@ -370,243 +250,117 @@ public class ToolLoader implements IWerkstoffRunnable {
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {100000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 100000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Lithium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_LV,
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {75000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 75000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Cadmium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_LV,
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {50000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 50000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Sodium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Sodium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_MV,
1,
werkstoff.getBridgeMaterial(),
Materials.Aluminium,
- new long[] {400000L, 128L, 2L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 400000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Aluminium),
- 'B',
- ItemList.Battery_RE_MV_Lithium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Aluminium), 'B',
+ ItemList.Battery_RE_MV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_MV,
1,
werkstoff.getBridgeMaterial(),
Materials.Aluminium,
- new long[] {300000L, 128L, 2L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 300000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Aluminium),
- 'B',
- ItemList.Battery_RE_MV_Cadmium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Aluminium), 'B',
+ ItemList.Battery_RE_MV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_MV,
1,
werkstoff.getBridgeMaterial(),
Materials.Aluminium,
- new long[] {200000L, 128L, 2L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 200000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Aluminium),
- 'B',
- ItemList.Battery_RE_MV_Sodium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Aluminium), 'B',
+ ItemList.Battery_RE_MV_Sodium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_HV,
1,
werkstoff.getBridgeMaterial(),
Materials.StainlessSteel,
- new long[] {1600000L, 512L, 3L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 1600000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Lithium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_HV,
1,
werkstoff.getBridgeMaterial(),
Materials.StainlessSteel,
- new long[] {1200000L, 512L, 3L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 1200000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Cadmium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.WRENCH_HV,
1,
werkstoff.getBridgeMaterial(),
Materials.StainlessSteel,
- new long[] {800000L, 512L, 3L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 800000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "SXd",
- "GMG",
- "PBP",
- 'X',
- toolHeadWrench.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Sodium.get(1L)
- });
+ new Object[] { "SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Sodium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
@@ -614,107 +368,51 @@ public class ToolLoader implements IWerkstoffRunnable {
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {100000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 100000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Lithium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.SCREWDRIVER_LV,
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {75000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 75000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Cadmium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
GT_MetaGenerated_Tool_01.SCREWDRIVER_LV,
1,
werkstoff.getBridgeMaterial(),
Materials.Steel,
- new long[] {50000L, 32L, 1L, -1L}),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ new long[] { 50000L, 32L, 1L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_LV.get(1L),
- 'S',
- screw.get(Materials.Steel),
- 'P',
- plate.get(Materials.Steel),
- 'G',
- gearGtSmall.get(Materials.Steel),
- 'B',
- ItemList.Battery_RE_LV_Sodium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P',
+ plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B',
+ ItemList.Battery_RE_LV_Sodium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(toolHeadHammer, werkstoff.getBridgeMaterial(), 1L),
GT_Proxy.tBits,
- new Object[] {
- "II ",
- "IIh",
- "II ",
- 'P',
- plate.get(werkstoff.getBridgeMaterial()),
- 'I',
- ingot.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "II ", "IIh", "II ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I',
+ ingot.get(werkstoff.getBridgeMaterial()) });
if (werkstoff.hasItemType(plateDouble) && werkstoff.hasItemType(cellMolten)) {
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(turbineBlade, werkstoff.getBridgeMaterial(), 1L),
GT_Proxy.tBits,
- new Object[] {
- "fPd",
- "SPS",
- " P ",
- 'P',
- plateDouble.get(werkstoff.getBridgeMaterial()),
- 'S',
- screw.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "fPd", "SPS", " P ", 'P', plateDouble.get(werkstoff.getBridgeMaterial()), 'S',
+ screw.get(werkstoff.getBridgeMaterial()) });
GT_Values.RA.addExtruderRecipe(
werkstoff.get(ingot, 6),
ItemList.Shape_Extruder_Turbine_Blade.get(0),
@@ -783,167 +481,89 @@ public class ToolLoader implements IWerkstoffRunnable {
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L),
GT_Proxy.tBits,
- new Object[] {
- "PP ",
- "fh ",
- 'P',
- plate.get(werkstoff.getBridgeMaterial()),
- 'I',
- ingot.get(werkstoff.getBridgeMaterial())
- });
+ new Object[] { "PP ", "fh ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I',
+ ingot.get(werkstoff.getBridgeMaterial()) });
}
if (gtnhGT) {
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Aluminium, new long[] {
- 400000L, 128L, 2L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_MV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Aluminium,
+ new long[] { 400000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Titanium),
- 'B',
- ItemList.Battery_RE_MV_Lithium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Titanium), 'B',
+ ItemList.Battery_RE_MV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Aluminium, new long[] {
- 300000L, 128L, 2L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_MV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Aluminium,
+ new long[] { 300000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Titanium),
- 'B',
- ItemList.Battery_RE_MV_Cadmium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Titanium), 'B',
+ ItemList.Battery_RE_MV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Aluminium, new long[] {
- 200000L, 128L, 2L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_MV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Aluminium,
+ new long[] { 200000L, 128L, 2L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_MV.get(1L),
- 'S',
- screw.get(Materials.Aluminium),
- 'P',
- plate.get(Materials.Aluminium),
- 'G',
- gearGtSmall.get(Materials.Titanium),
- 'B',
- ItemList.Battery_RE_MV_Sodium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Aluminium), 'P',
+ plate.get(Materials.Aluminium), 'G', gearGtSmall.get(Materials.Titanium), 'B',
+ ItemList.Battery_RE_MV_Sodium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[] {
- 1600000L, 512L, 3L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_HV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.StainlessSteel,
+ new long[] { 1600000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Lithium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Lithium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[] {
- 1200000L, 512L, 3L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_HV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.StainlessSteel,
+ new long[] { 1200000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Cadmium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Cadmium.get(1L) });
GT_ModHandler.addCraftingRecipe(
GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[] {
- 800000L, 512L, 3L, -1L
- }),
- GT_ModHandler.RecipeBits.DISMANTLEABLE
- | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ SCREWDRIVER_HV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.StainlessSteel,
+ new long[] { 800000L, 512L, 3L, -1L }),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
| GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] {
- "PdX",
- "MGS",
- "GBP",
- 'X',
- stickLong.get(werkstoff.getBridgeMaterial()),
- 'M',
- ItemList.Electric_Motor_HV.get(1L),
- 'S',
- screw.get(Materials.StainlessSteel),
- 'P',
- plate.get(Materials.StainlessSteel),
- 'G',
- gearGtSmall.get(Materials.StainlessSteel),
- 'B',
- ItemList.Battery_RE_HV_Sodium.get(1L)
- });
+ new Object[] { "PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M',
+ ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P',
+ plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B',
+ ItemList.Battery_RE_HV_Sodium.get(1L) });
}
// GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(16,1,
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java
index 3852602d72..c6eacb8ad2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java
@@ -1,36 +1,30 @@
/*
- * 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.system.material.werkstoff_loaders.registration;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.item.ItemStack;
public class AssociationLoader implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
for (OrePrefixes prefixes : OrePrefixes.values()) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java
index 292e796e70..98ac3fb90e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java
@@ -1,42 +1,36 @@
/*
- * 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.system.material.werkstoff_loaders.registration;
import static gregtech.api.enums.OrePrefixes.*;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+
import gregtech.api.enchants.Enchantment_Radioactivity;
import gregtech.api.enums.*;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
public class BridgeMaterialsLoader implements IWerkstoffRunnable {
@@ -47,10 +41,8 @@ public class BridgeMaterialsLoader implements IWerkstoffRunnable {
// aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int
// aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection, boolean aCustomOre, String
// aCustomID
- Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null
- ? werkstoff.getBridgeMaterial()
- : Materials.get(werkstoff.getVarName()) != Materials._NULL
- ? Materials.get(werkstoff.getVarName())
+ Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial()
+ : Materials.get(werkstoff.getVarName()) != Materials._NULL ? Materials.get(werkstoff.getVarName())
: new Materials(
-1,
werkstoff.getTexSet(),
@@ -113,26 +105,26 @@ public class BridgeMaterialsLoader implements IWerkstoffRunnable {
e.mLinkedMaterials = new ArrayList<>();
e.mLinkedMaterials.add(werkstoffBridgeMaterial);
if (werkstoff.hasItemType(dust)) {
- GT_OreDictUnificator.addAssociation(
- dust, werkstoffBridgeMaterial, werkstoff.get(dust), false);
- GT_OreDictUnificator.set(
- dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true);
+ GT_OreDictUnificator
+ .addAssociation(dust, werkstoffBridgeMaterial, werkstoff.get(dust), false);
+ GT_OreDictUnificator
+ .set(dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true);
}
ElementSet = true;
break;
}
}
if (!ElementSet) continue;
- // try {
- // Field f = Materials.class.getDeclaredField("MATERIALS_MAP");
- // f.setAccessible(true);
- // Map<String, Materials> MATERIALS_MAP = (Map<String,
+ // try {
+ // Field f = Materials.class.getDeclaredField("MATERIALS_MAP");
+ // f.setAccessible(true);
+ // Map<String, Materials> MATERIALS_MAP = (Map<String,
// Materials>) f.get(null);
- // MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName);
- // } catch (NoSuchFieldException | IllegalAccessException |
+ // MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName);
+ // } catch (NoSuchFieldException | IllegalAccessException |
// ClassCastException e) {
- // e.printStackTrace();
- // }
+ // e.printStackTrace();
+ // }
if (werkstoff.hasItemType(dust)) {
ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L);
Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan");
@@ -141,8 +133,8 @@ public class BridgeMaterialsLoader implements IWerkstoffRunnable {
false,
new BWRecipes.DynamicGTRecipe(
false,
- new ItemStack[] {werkstoff.get(prefixes)},
- new ItemStack[] {scannerOutput},
+ new ItemStack[] { werkstoff.get(prefixes) },
+ new ItemStack[] { scannerOutput },
ItemList.Tool_DataOrb.get(1L),
null,
null,
@@ -167,8 +159,7 @@ public class BridgeMaterialsLoader implements IWerkstoffRunnable {
}
if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) {
- werkstoffBridgeMaterial.mStandardMoltenFluid =
- werkstoff.getMolten(1).getFluid();
+ werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1).getFluid();
}
werkstoffBridgeMaterial.mName = werkstoff.getVarName();
werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName();
@@ -180,12 +171,9 @@ public class BridgeMaterialsLoader implements IWerkstoffRunnable {
werkstoffBridgeMaterial.mDefaultLocalName);
if (LoaderReference.Thaumcraft) werkstoffBridgeMaterial.mAspects = werkstoff.getGTWrappedTCAspects();
werkstoffBridgeMaterial.mMaterialInto = werkstoffBridgeMaterial;
- werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING)
- ? Materials.Blaze
- : werkstoff.contains(SubTag.MAGICAL)
- ? Materials.Thaumium
- : werkstoffBridgeMaterial.mDurability > 5120
- ? Materials.TungstenSteel
+ werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING) ? Materials.Blaze
+ : werkstoff.contains(SubTag.MAGICAL) ? Materials.Thaumium
+ : werkstoffBridgeMaterial.mDurability > 5120 ? Materials.TungstenSteel
: werkstoffBridgeMaterial.mDurability > 1280 ? Materials.Steel : Materials.Wood;
if (werkstoff.getStats().isRadioactive()) {
werkstoffBridgeMaterial.setEnchantmentForArmors(
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java
index 8caecb277c..08f77e6760 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java
@@ -1,23 +1,14 @@
/*
- * 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.system.material.werkstoff_loaders.registration;
@@ -25,13 +16,15 @@ package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.reg
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasing;
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.item.ItemStack;
public class CasingRegistrator implements IWerkstoffRunnable {
+
@Override
public void run(Werkstoff werkstoff) {
GT_OreDictUnificator.addAssociation(
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java
index 288213d821..1e83c8157f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java
@@ -1,33 +1,26 @@
/*
- * 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.system.object;
-import com.github.bartimaeusnek.bartworks.util.Pair;
import java.io.*;
+
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+
public class AbstractedStack implements Serializable {
final Pair<Integer, Short> idDamage;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java
index 9229b08847..b005ff26e6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java
@@ -1,33 +1,26 @@
/*
- * 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.system.oredict;
-import com.github.bartimaeusnek.bartworks.util.Pair;
-import gregtech.api.util.GT_OreDictUnificator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+
import net.minecraft.item.ItemStack;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+import gregtech.api.util.GT_OreDictUnificator;
+
public class OreDictAdder {
private static final ConcurrentHashMap<String, ItemStack> toAddMap = new ConcurrentHashMap<>();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java
index 4e8efeeabd..6bb0da9300 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java
@@ -1,41 +1,35 @@
/*
- * 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.system.oredict;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.util.Pair;
-import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
-import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_OreDictUnificator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
+
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+
public class OreDictHandler {
private static final HashMap<String, Pair<Integer, Short>> cache = new HashMap<>();
@@ -56,16 +50,17 @@ public class OreDictHandler {
for (String s : used) {
if (!OreDictionary.getOres(s).isEmpty()) {
ItemStack tmpstack = OreDictionary.getOres(s).get(0).copy();
- Pair<Integer, Short> p =
- new Pair<>(Item.getIdFromItem(tmpstack.getItem()), (short) tmpstack.getItemDamage());
+ Pair<Integer, Short> p = new Pair<>(
+ Item.getIdFromItem(tmpstack.getItem()),
+ (short) tmpstack.getItemDamage());
OreDictHandler.cache.put(s, p);
for (ItemStack tmp : OreDictionary.getOres(s)) {
- Pair<Integer, Short> p2 =
- new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage());
+ Pair<Integer, Short> p2 = new Pair<>(
+ Item.getIdFromItem(tmp.getItem()),
+ (short) tmp.getItemDamage());
GameRegistry.UniqueIdentifier UI = GameRegistry.findUniqueIdentifierFor(tmp.getItem());
if (UI == null) UI = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(tmp.getItem()));
- if (!UI.modId.equals(MainMod.MOD_ID)
- && !UI.modId.equals(BartWorksCrossmod.MOD_ID)
+ if (!UI.modId.equals(MainMod.MOD_ID) && !UI.modId.equals(BartWorksCrossmod.MOD_ID)
&& !UI.modId.equals("BWCore")) {
OreDictHandler.cacheNonBW.add(p2);
}
@@ -78,12 +73,9 @@ public class OreDictHandler {
if (OreDictHandler.cache.get(prefixes + elementName.replaceAll(" ", "")) != null) {
Pair<Integer, Short> p = OreDictHandler.cache.get(prefixes + elementName.replaceAll(" ", ""));
return new ItemStack(Item.getItemById(p.getKey()), amount, p.getValue());
- } else if (!OreDictionary.getOres(prefixes + elementName.replaceAll(" ", ""))
- .isEmpty()) {
- ItemStack tmp = GT_OreDictUnificator.get(OreDictionary.getOres(prefixes + elementName.replaceAll(" ", ""))
- .get(0)
- .copy())
- .copy();
+ } else if (!OreDictionary.getOres(prefixes + elementName.replaceAll(" ", "")).isEmpty()) {
+ ItemStack tmp = GT_OreDictUnificator
+ .get(OreDictionary.getOres(prefixes + elementName.replaceAll(" ", "")).get(0).copy()).copy();
OreDictHandler.cache.put(
prefixes + elementName.replaceAll(" ", ""),
new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage()));
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java
index b57e5c8914..71a41f466b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java
@@ -1,41 +1,23 @@
/*
- * 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.system.oregen;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.system.material.*;
-import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
-import com.github.bartimaeusnek.bartworks.util.Pair;
-import com.google.common.collect.ArrayListMultimap;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.interfaces.ISubTagContainer;
-import gregtech.api.world.GT_Worldgen;
-import gregtech.common.blocks.GT_TileEntity_Ores;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -44,10 +26,23 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.system.material.*;
+import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+import com.google.common.collect.ArrayListMultimap;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.world.GT_Worldgen;
+import gregtech.common.blocks.GT_TileEntity_Ores;
+
/**
* Original GT File Stripped and adjusted to work with this mod
*/
public abstract class BW_OreLayer extends GT_Worldgen {
+
public static final List<BW_OreLayer> sList = new ArrayList<>();
public static final ArrayListMultimap<Short, BW_OreLayer> NEIMAP = ArrayListMultimap.create();
private static final boolean logOregenRoss128 = false;
@@ -61,18 +56,8 @@ public abstract class BW_OreLayer extends GT_Worldgen {
public abstract String getDimName();
- public BW_OreLayer(
- String aName,
- boolean aDefault,
- int aMinY,
- int aMaxY,
- int aWeight,
- int aDensity,
- int aSize,
- ISubTagContainer top,
- ISubTagContainer bottom,
- ISubTagContainer between,
- ISubTagContainer sprinkled) {
+ public BW_OreLayer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize,
+ ISubTagContainer top, ISubTagContainer bottom, ISubTagContainer between, ISubTagContainer sprinkled) {
super(aName, BW_OreLayer.sList, aDefault);
this.mMinY = (short) aMinY;
this.mMaxY = (short) aMaxY;
@@ -87,17 +72,13 @@ public abstract class BW_OreLayer extends GT_Worldgen {
if (between instanceof Werkstoff) this.bwOres = (byte) (this.bwOres | 0b0010);
if (sprinkled instanceof Werkstoff) this.bwOres = (byte) (this.bwOres | 0b0001);
- short aPrimary = top instanceof Materials
- ? (short) ((Materials) top).mMetaItemSubID
+ short aPrimary = top instanceof Materials ? (short) ((Materials) top).mMetaItemSubID
: top instanceof Werkstoff ? ((Werkstoff) top).getmID() : 0;
- short aSecondary = bottom instanceof Materials
- ? (short) ((Materials) bottom).mMetaItemSubID
+ short aSecondary = bottom instanceof Materials ? (short) ((Materials) bottom).mMetaItemSubID
: bottom instanceof Werkstoff ? ((Werkstoff) bottom).getmID() : 0;
- short aBetween = between instanceof Materials
- ? (short) ((Materials) between).mMetaItemSubID
+ short aBetween = between instanceof Materials ? (short) ((Materials) between).mMetaItemSubID
: between instanceof Werkstoff ? ((Werkstoff) between).getmID() : 0;
- short aSporadic = sprinkled instanceof Materials
- ? (short) ((Materials) sprinkled).mMetaItemSubID
+ short aSporadic = sprinkled instanceof Materials ? (short) ((Materials) sprinkled).mMetaItemSubID
: sprinkled instanceof Werkstoff ? ((Werkstoff) sprinkled).getmID() : 0;
this.mPrimaryMeta = aPrimary;
this.mSecondaryMeta = aSecondary;
@@ -112,20 +93,16 @@ public abstract class BW_OreLayer extends GT_Worldgen {
public List<ItemStack> getStacks() {
ArrayList<ItemStack> ret = new ArrayList<>();
ret.add(
- (this.bwOres & 0b1000) != 0
- ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mPrimaryMeta)
+ (this.bwOres & 0b1000) != 0 ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mPrimaryMeta)
: new ItemStack(GregTech_API.sBlockOres1, 1, this.mPrimaryMeta));
ret.add(
- (this.bwOres & 0b0100) != 0
- ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mSecondaryMeta)
+ (this.bwOres & 0b0100) != 0 ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mSecondaryMeta)
: new ItemStack(GregTech_API.sBlockOres1, 1, this.mSecondaryMeta));
ret.add(
- (this.bwOres & 0b0010) != 0
- ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mBetweenMeta)
+ (this.bwOres & 0b0010) != 0 ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mBetweenMeta)
: new ItemStack(GregTech_API.sBlockOres1, 1, this.mBetweenMeta));
ret.add(
- (this.bwOres & 0b0001) != 0
- ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mSporadicMeta)
+ (this.bwOres & 0b0001) != 0 ? new ItemStack(WerkstoffLoader.BWOres, 1, this.mSporadicMeta)
: new ItemStack(GregTech_API.sBlockOres1, 1, this.mSporadicMeta));
return ret;
}
@@ -140,15 +117,8 @@ public abstract class BW_OreLayer extends GT_Worldgen {
}
@Override
- public boolean executeWorldgen(
- World aWorld,
- Random aRandom,
- String aBiome,
- int aDimensionType,
- int aChunkX,
- int aChunkZ,
- IChunkProvider aChunkGenerator,
- IChunkProvider aChunkProvider) {
+ public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX,
+ int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
{
int tMinY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY - 5);
int cX = aChunkX - aRandom.nextInt(this.mSize);
@@ -171,8 +141,8 @@ public abstract class BW_OreLayer extends GT_Worldgen {
}
if (this.mBetweenMeta > 0 && shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ)) {
- wasPlaced = this.setOreBlock(
- aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false);
+ wasPlaced = this
+ .setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false);
}
if (this.mPrimaryMeta > 0) {
@@ -184,8 +154,8 @@ public abstract class BW_OreLayer extends GT_Worldgen {
}
if (this.mSporadicMeta > 0 && (shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ))) {
- wasPlaced = this.setOreBlock(
- aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false);
+ wasPlaced = this
+ .setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false);
}
}
}
@@ -200,11 +170,11 @@ public abstract class BW_OreLayer extends GT_Worldgen {
private boolean shouldPlace(Random aRandom, int cX, int eX, int tX, int cZ, int eZ, int tZ) {
if (aRandom.nextInt(
- Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity))
- == 0) return true;
+ Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0)
+ return true;
if (aRandom.nextInt(
- Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity))
- == 0) return true;
+ Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)
+ return true;
return false;
}
@@ -285,18 +255,9 @@ public abstract class BW_OreLayer extends GT_Worldgen {
@Override
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(37)
- .put(bwOres)
- .putInt(mMinY)
- .putInt(mWeight)
- .putInt(mDensity)
- .putInt(mSize)
- .putInt(mMaxY)
- .putInt(mPrimaryMeta)
- .putInt(mSecondaryMeta)
- .putInt(mBetweenMeta)
- .putInt(mSporadicMeta)
- .array(),
+ ByteBuffer.allocate(37).put(bwOres).putInt(mMinY).putInt(mWeight).putInt(mDensity).putInt(mSize)
+ .putInt(mMaxY).putInt(mPrimaryMeta).putInt(mSecondaryMeta).putInt(mBetweenMeta)
+ .putInt(mSporadicMeta).array(),
0,
37,
31);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java
index 47f2a85ae7..ac4f909e5c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java
@@ -1,37 +1,30 @@
/*
- * 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.system.oregen;
-import cpw.mods.fml.common.IWorldGenerator;
-import gregtech.api.objects.XSTR;
-import gregtech.api.util.GT_Log;
import java.util.HashSet;
import java.util.Random;
+
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkProvider;
+import cpw.mods.fml.common.IWorldGenerator;
+import gregtech.api.objects.XSTR;
+import gregtech.api.util.GT_Log;
+
/**
* Original GT File Stripped and adjusted to work with this mod
*/
@@ -42,19 +35,19 @@ public class BW_WordGenerator implements IWorldGenerator {
// GameRegistry.registerWorldGenerator(this, 1073741823);
}
- public synchronized void generate(
- Random aRandom,
- int aX,
- int aZ,
- World aWorld,
- IChunkProvider aChunkGenerator,
+ public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator,
IChunkProvider aChunkProvider) {
new BW_WordGenerator.WorldGenContainer(
- aX * 16, aZ * 16, aWorld.provider.dimensionId, aWorld, aChunkGenerator, aChunkProvider)
- .run();
+ aX * 16,
+ aZ * 16,
+ aWorld.provider.dimensionId,
+ aWorld,
+ aChunkGenerator,
+ aChunkProvider).run();
}
public static class WorldGenContainer implements Runnable {
+
public static HashSet<ChunkCoordIntPair> mGenerated = new HashSet<>(2000);
public final int mDimensionType;
public final World mWorld;
@@ -63,12 +56,7 @@ public class BW_WordGenerator implements IWorldGenerator {
public int mX;
public int mZ;
- public WorldGenContainer(
- int aX,
- int aZ,
- int aDimensionType,
- World aWorld,
- IChunkProvider aChunkGenerator,
+ public WorldGenContainer(int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator,
IChunkProvider aChunkProvider) {
this.mX = aX;
this.mZ = aZ;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
index d7135a8d5d..c8b6459add 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
@@ -1,23 +1,14 @@
/*
- * 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.system.oregen;
@@ -26,14 +17,15 @@ import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader
import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList;
import static gregtech.api.enums.Materials.*;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import gregtech.api.interfaces.ISubTagContainer;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidRegistry;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import gregtech.api.interfaces.ISubTagContainer;
+
public class BW_WorldGenRoss128b extends BW_OreLayer {
public Block getDefaultBlockToReplace() {
@@ -42,7 +34,7 @@ public class BW_WorldGenRoss128b extends BW_OreLayer {
@Override
public int[] getDefaultDamageToReplace() {
- return new int[] {0};
+ return new int[] { 0 };
}
@Override
@@ -50,27 +42,38 @@ public class BW_WorldGenRoss128b extends BW_OreLayer {
return StatCollector.translateToLocal("planet.Ross128b");
}
- public BW_WorldGenRoss128b(
- String aName,
- boolean aDefault,
- int aMinY,
- int aMaxY,
- int aWeight,
- int aDensity,
- int aSize,
- ISubTagContainer top,
- ISubTagContainer bottom,
- ISubTagContainer between,
+ public BW_WorldGenRoss128b(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity,
+ int aSize, ISubTagContainer top, ISubTagContainer bottom, ISubTagContainer between,
ISubTagContainer sprinkled) {
super(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, top, bottom, between, sprinkled);
}
public static void initOres() {
new BW_WorldGenRoss128b(
- "ore.mix.ross128.Thorianit", true, 30, 60, 17, 1, 16, Thorianit, Uraninite, Lepidolite, Spodumene);
+ "ore.mix.ross128.Thorianit",
+ true,
+ 30,
+ 60,
+ 17,
+ 1,
+ 16,
+ Thorianit,
+ Uraninite,
+ Lepidolite,
+ Spodumene);
new BW_WorldGenRoss128b("ore.mix.ross128.carbon", true, 5, 25, 5, 4, 12, Graphite, Diamond, Coal, Graphite);
new BW_WorldGenRoss128b(
- "ore.mix.ross128.bismuth", true, 5, 80, 30, 1, 16, Bismuthinit, Stibnite, Bismuth, Bismutite);
+ "ore.mix.ross128.bismuth",
+ true,
+ 5,
+ 80,
+ 30,
+ 1,
+ 16,
+ Bismuthinit,
+ Stibnite,
+ Bismuth,
+ Bismutite);
new BW_WorldGenRoss128b(
"ore.mix.ross128.TurmalinAlkali",
true,
@@ -84,11 +87,41 @@ public class BW_WorldGenRoss128b extends BW_OreLayer {
ChromoAluminoPovondrait,
VanadioOxyDravit);
new BW_WorldGenRoss128b(
- "ore.mix.ross128.Roquesit", true, 30, 50, 3, 1, 12, Arsenopyrite, Ferberite, Loellingit, Roquesit);
+ "ore.mix.ross128.Roquesit",
+ true,
+ 30,
+ 50,
+ 3,
+ 1,
+ 12,
+ Arsenopyrite,
+ Ferberite,
+ Loellingit,
+ Roquesit);
new BW_WorldGenRoss128b(
- "ore.mix.ross128.Tungstate", true, 5, 40, 10, 4, 14, Ferberite, Huebnerit, Loellingit, Scheelite);
+ "ore.mix.ross128.Tungstate",
+ true,
+ 5,
+ 40,
+ 10,
+ 4,
+ 14,
+ Ferberite,
+ Huebnerit,
+ Loellingit,
+ Scheelite);
new BW_WorldGenRoss128b(
- "ore.mix.ross128.CopperSulfits", true, 40, 70, 80, 3, 24, Djurleit, Bornite, Wittichenit, Tetrahedrite);
+ "ore.mix.ross128.CopperSulfits",
+ true,
+ 40,
+ 70,
+ 80,
+ 3,
+ 24,
+ Djurleit,
+ Bornite,
+ Wittichenit,
+ Tetrahedrite);
new BW_WorldGenRoss128b(
"ore.mix.ross128.Forsterit",
true,
@@ -114,14 +147,31 @@ public class BW_WorldGenRoss128b extends BW_OreLayer {
DescloiziteCUVO4,
DescloiziteZNVO4);
new BW_WorldGenRoss128b(
- "ore.mix.ross128.RedZircon", true, 10, 80, 40, 3, 24, Fayalit, FuchsitAL, RedZircon, FuchsitCR);
+ "ore.mix.ross128.RedZircon",
+ true,
+ 10,
+ 80,
+ 40,
+ 3,
+ 24,
+ Fayalit,
+ FuchsitAL,
+ RedZircon,
+ FuchsitCR);
}
public static void initundergroundFluids() {
String ross128b = StatCollector.translateToLocal("planet.Ross128b");
uo_dimensionList.SetConfigValues(ross128b, ross128b, "veryheavyoil", "liquid_extra_heavy_oil", 0, 625, 40, 5);
uo_dimensionList.SetConfigValues(
- ross128b, ross128b, "lava", FluidRegistry.getFluidName(FluidRegistry.LAVA), 0, 820, 5, 5);
+ ross128b,
+ ross128b,
+ "lava",
+ FluidRegistry.getFluidName(FluidRegistry.LAVA),
+ 0,
+ 820,
+ 5,
+ 5);
uo_dimensionList.SetConfigValues(ross128b, ross128b, "gas_natural_gas", "gas_natural_gas", 0, 625, 65, 5);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java
index 074e1fc6b5..0566541d44 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java
@@ -1,23 +1,14 @@
/*
- * 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.system.oregen;
@@ -26,25 +17,17 @@ import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader
import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList;
import static gregtech.api.enums.Materials.*;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import gregtech.api.interfaces.ISubTagContainer;
import net.minecraft.block.Block;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import gregtech.api.interfaces.ISubTagContainer;
+
public class BW_WorldGenRoss128ba extends BW_OreLayer {
- public BW_WorldGenRoss128ba(
- String aName,
- boolean aDefault,
- int aMinY,
- int aMaxY,
- int aWeight,
- int aDensity,
- int aSize,
- ISubTagContainer top,
- ISubTagContainer bottom,
- ISubTagContainer between,
+ public BW_WorldGenRoss128ba(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity,
+ int aSize, ISubTagContainer top, ISubTagContainer bottom, ISubTagContainer between,
ISubTagContainer sprinkled) {
super(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, top, bottom, between, sprinkled);
}
@@ -82,7 +65,17 @@ public class BW_WorldGenRoss128ba extends BW_OreLayer {
NaquadahEnriched,
NaquadahEnriched);
new BW_WorldGenRoss128ba(
- "ore.mix.ross128ba.Tungstate", true, 5, 40, 60, 4, 14, Ferberite, Huebnerit, Loellingit, Scheelite);
+ "ore.mix.ross128ba.Tungstate",
+ true,
+ 5,
+ 40,
+ 60,
+ 4,
+ 14,
+ Ferberite,
+ Huebnerit,
+ Loellingit,
+ Scheelite);
new BW_WorldGenRoss128ba(
"ore.mix.ross128ba.bart",
true,
@@ -108,7 +101,17 @@ public class BW_WorldGenRoss128ba extends BW_OreLayer {
ChromoAluminoPovondrait,
VanadioOxyDravit);
new BW_WorldGenRoss128ba(
- "ore.mix.ross128ba.Amethyst", true, 5, 80, 35, 2, 8, Amethyst, Olivine, Prasiolite, Hedenbergit);
+ "ore.mix.ross128ba.Amethyst",
+ true,
+ 5,
+ 80,
+ 35,
+ 2,
+ 8,
+ Amethyst,
+ Olivine,
+ Prasiolite,
+ Hedenbergit);
new BW_WorldGenRoss128ba(
"ore.mix.ross128ba.CopperSulfits",
true,
@@ -122,9 +125,29 @@ public class BW_WorldGenRoss128ba extends BW_OreLayer {
Wittichenit,
Tetrahedrite);
new BW_WorldGenRoss128ba(
- "ore.mix.ross128ba.RedZircon", true, 10, 80, 40, 3, 24, Fayalit, FuchsitAL, RedZircon, FuchsitCR);
+ "ore.mix.ross128ba.RedZircon",
+ true,
+ 10,
+ 80,
+ 40,
+ 3,
+ 24,
+ Fayalit,
+ FuchsitAL,
+ RedZircon,
+ FuchsitCR);
new BW_WorldGenRoss128ba(
- "ore.mix.ross128ba.Fluorspar", true, 10, 80, 35, 4, 8, Galena, Sphalerite, Fluorspar, Barite);
+ "ore.mix.ross128ba.Fluorspar",
+ true,
+ 10,
+ 80,
+ 35,
+ 4,
+ 8,
+ Galena,
+ Sphalerite,
+ Fluorspar,
+ Barite);
}
public static void init_undergroundFluids() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java
index 3d55084ade..6f21bfd317 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java
@@ -1,32 +1,25 @@
/*
- * 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.system.worldgen;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import gregtech.api.GregTech_API;
import java.util.Random;
+
import net.minecraft.block.Block;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import gregtech.api.GregTech_API;
+
public class GT_WorldgenUtil {
private GT_WorldgenUtil() {}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java
index 7c0fd41935..2e042fe7e2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java
@@ -1,23 +1,14 @@
/*
- * 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.system.worldgen;
@@ -25,17 +16,9 @@ package com.github.bartimaeusnek.bartworks.system.worldgen;
import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.maxTierRoss;
import static net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST;
-import com.github.bartimaeusnek.bartworks.util.Pair;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.metatileentity.MetaPipeEntity;
-import gregtech.api.objects.XSTR;
-import gregtech.api.threads.GT_Runnable_MachineBlockUpdate;
-import gregtech.api.util.GT_Utility;
import java.security.SecureRandom;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
@@ -45,7 +28,18 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.ChestGenHooks;
-@SuppressWarnings({"ALL"})
+import com.github.bartimaeusnek.bartworks.util.Pair;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.BaseMetaPipeEntity;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.MetaPipeEntity;
+import gregtech.api.objects.XSTR;
+import gregtech.api.threads.GT_Runnable_MachineBlockUpdate;
+import gregtech.api.util.GT_Utility;
+
+@SuppressWarnings({ "ALL" })
public abstract class MapGenRuins extends WorldGenerator {
protected Pair<Block, Integer>[][] ToBuildWith = new Pair[4][0];
@@ -85,8 +79,8 @@ public abstract class MapGenRuins extends WorldGenerator {
int[] statBlocks = new int[4];
- protected void setRandomBlockWAirChance(
- World worldObj, int x, int y, int z, Random rand, int airchance, Pair<Block, Integer>... blocks) {
+ protected void setRandomBlockWAirChance(World worldObj, int x, int y, int z, Random rand, int airchance,
+ Pair<Block, Integer>... blocks) {
if (rand.nextInt(100) > airchance) this.setRandomBlock(worldObj, x, y, z, rand, blocks);
else this.setBlock(worldObj, x, y, z, Blocks.air, 0);
}
@@ -147,8 +141,7 @@ public abstract class MapGenRuins extends WorldGenerator {
protected void setGTMachine(World worldObj, int x, int y, int z, int meta, String ownerName, byte facing) {
try {
GT_Runnable_MachineBlockUpdate.setDisabled();
- } catch (Throwable ignored) {
- }
+ } catch (Throwable ignored) {}
setGTMachineBlock(worldObj, x, y, z, meta);
BaseMetaTileEntity BTE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z);
BTE.setOwnerName(ownerName);
@@ -157,20 +150,11 @@ public abstract class MapGenRuins extends WorldGenerator {
checkTile(BTE, worldObj, x, y, z, meta, ownerName, facing, 0);
try {
GT_Runnable_MachineBlockUpdate.setEnabled();
- } catch (Throwable ignored) {
- }
+ } catch (Throwable ignored) {}
}
- private void checkTile(
- BaseMetaTileEntity BTE,
- World worldObj,
- int x,
- int y,
- int z,
- int meta,
- String ownerName,
- byte facing,
- int depth) {
+ private void checkTile(BaseMetaTileEntity BTE, World worldObj, int x, int y, int z, int meta, String ownerName,
+ byte facing, int depth) {
if (depth < 25) {
if (BTE.getMetaTileID() != meta || worldObj.getTileEntity(x, y, z) != BTE || BTE.isInvalid()) {
redoTile(BTE, worldObj, x, y, z, meta, ownerName, facing);
@@ -182,8 +166,8 @@ public abstract class MapGenRuins extends WorldGenerator {
}
}
- private void redoTile(
- BaseMetaTileEntity BTE, World worldObj, int x, int y, int z, int meta, String ownerName, byte facing) {
+ private void redoTile(BaseMetaTileEntity BTE, World worldObj, int x, int y, int z, int meta, String ownerName,
+ byte facing) {
reSetGTTileEntity(BTE, worldObj, x, y, z, meta);
BTE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z);
BTE.setOwnerName(ownerName);
@@ -193,8 +177,7 @@ public abstract class MapGenRuins extends WorldGenerator {
protected void setGTCable(World worldObj, int x, int y, int z, int meta) {
try {
GT_Runnable_MachineBlockUpdate.setDisabled();
- } catch (Throwable ignored) {
- }
+ } catch (Throwable ignored) {}
BaseMetaPipeEntity BTE = (BaseMetaPipeEntity) setGTMachineBlock(worldObj, x, y, z, meta);
MetaPipeEntity MPE = (MetaPipeEntity) BTE.getMetaTileEntity();
BTE.mConnections |= (byte) (1 << (byte) 4);
@@ -206,8 +189,7 @@ public abstract class MapGenRuins extends WorldGenerator {
MPE.mConnections = BTE.mConnections;
try {
GT_Runnable_MachineBlockUpdate.setEnabled();
- } catch (Throwable ignored) {
- }
+ } catch (Throwable ignored) {}
}
public static class RuinsBase extends MapGenRuins {
@@ -230,11 +212,11 @@ public abstract class MapGenRuins extends WorldGenerator {
}
}
- this.setFloorBlocks(new int[] {0, 0, 0}, Blocks.brick_block, Blocks.double_stone_slab, Blocks.stonebrick);
- this.setWallBlocks(new int[] {0, 1, 2, 1, 1}, Blocks.stonebrick);
- this.setRoofBlocks(new int[] {9}, Blocks.log);
- this.setMiscBlocks(new int[] {1}, Blocks.log);
- this.statBlocks = new int[] {rand.nextInt(this.ToBuildWith[0].length)};
+ this.setFloorBlocks(new int[] { 0, 0, 0 }, Blocks.brick_block, Blocks.double_stone_slab, Blocks.stonebrick);
+ this.setWallBlocks(new int[] { 0, 1, 2, 1, 1 }, Blocks.stonebrick);
+ this.setRoofBlocks(new int[] { 9 }, Blocks.log);
+ this.setMiscBlocks(new int[] { 1 }, Blocks.log);
+ this.statBlocks = new int[] { rand.nextInt(this.ToBuildWith[0].length) };
int colored = rand.nextInt(15);
int tier = secureRandom.nextInt(maxTierRoss);
boolean useColor = rand.nextBoolean();
@@ -253,39 +235,54 @@ public abstract class MapGenRuins extends WorldGenerator {
} else if (dy > 0 && dy < 4) {
if (Math.abs(dx) == 5 && Math.abs(dz) == 5) {
this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 5, this.ToBuildWith[3][0]);
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 5,
+ this.ToBuildWith[3][0]);
} else if ((dx == 0) && dz == -5 && (dy == 1 || dy == 2)) {
if (dy == 1) this.setBlock(worldObj, x + dx, y + 1, z + -5, Blocks.iron_door, 1);
if (dy == 2) this.setBlock(worldObj, x + dx, y + 2, z + dz, Blocks.iron_door, 8);
} else if (Math.abs(dx) == 5 && Math.abs(dz) < 5 || Math.abs(dz) == 5 && Math.abs(dx) < 5) {
this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 25, this.ToBuildWith[1]);
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
if (dy == 2) {
- if (rand.nextInt(100) < 12)
- if (useColor)
- this.setRandomBlockWAirChance(
- worldObj,
- x + dx,
- y + 2,
- z + dz,
- rand,
- 25,
- new Pair<>(Blocks.stained_glass_pane, colored));
- else
- this.setRandomBlockWAirChance(
- worldObj,
- x + dx,
- y + dy,
- z + dz,
- rand,
- 25,
- new Pair<>(Blocks.glass_pane, 0));
+ if (rand.nextInt(100) < 12) if (useColor) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 2,
+ z + dz,
+ rand,
+ 25,
+ new Pair<>(Blocks.stained_glass_pane, colored));
+ else this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ new Pair<>(Blocks.glass_pane, 0));
}
}
if (dy == 3 && Math.abs(dx) == 6) {
this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 3, z + dz, rand, 25, this.ToBuildWith[2]);
+ worldObj,
+ x + dx,
+ y + 3,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
}
if (dy == 1) {
@@ -338,43 +335,87 @@ public abstract class MapGenRuins extends WorldGenerator {
}
}
} else if (dy == 4) {
- if (Math.abs(dx) == 5)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 4, z + dz, rand, 25, this.ToBuildWith[2]);
- else if (Math.abs(dz) == 5 && Math.abs(dx) < 5)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 25, this.ToBuildWith[1]);
+ if (Math.abs(dx) == 5) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 4,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ else if (Math.abs(dz) == 5 && Math.abs(dx) < 5) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
} else if (dy == 5) {
- if (Math.abs(dx) == 4)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 5, z + dz, rand, 25, this.ToBuildWith[2]);
- else if (Math.abs(dz) == 5 && Math.abs(dx) < 4)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 25, this.ToBuildWith[1]);
+ if (Math.abs(dx) == 4) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 5,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ else if (Math.abs(dz) == 5 && Math.abs(dx) < 4) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
} else if (dy == 6) {
- if (Math.abs(dx) == 3)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 6, z + dz, rand, 25, this.ToBuildWith[2]);
- else if (Math.abs(dz) == 5 && Math.abs(dx) < 3)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 25, this.ToBuildWith[1]);
+ if (Math.abs(dx) == 3) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 6,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ else if (Math.abs(dz) == 5 && Math.abs(dx) < 3) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
} else if (dy == 7) {
- if (Math.abs(dx) == 2)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 7, z + dz, rand, 25, this.ToBuildWith[2]);
- else if (Math.abs(dz) == 5 && Math.abs(dx) < 2)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + dy, z + dz, rand, 25, this.ToBuildWith[1]);
+ if (Math.abs(dx) == 2) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 7,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ else if (Math.abs(dz) == 5 && Math.abs(dx) < 2) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
} else if (dy == 8) {
- if (Math.abs(dx) == 1 || Math.abs(dx) == 0)
- this.setRandomBlockWAirChance(
- worldObj, x + dx, y + 8, z + dz, rand, 25, this.ToBuildWith[2]);
+ if (Math.abs(dx) == 1 || Math.abs(dx) == 0) this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 8,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
}
}
}
}
- tosetloop:
- while (set < toSet) {
+ tosetloop: while (set < toSet) {
int dy = 1;
int dz = 3;
for (int dx = 2; dx > -5; dx--) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
index 6c597ced06..ecf31705be 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
@@ -25,6 +16,20 @@ package com.github.bartimaeusnek.bartworks.util;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.calculateSv;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.specialToByte;
+import java.util.*;
+import java.util.function.Supplier;
+
+import javax.annotation.Nonnegative;
+
+import net.minecraft.inventory.InventoryCrafting;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.jetbrains.annotations.Nullable;
+
import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
@@ -33,6 +38,7 @@ import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -46,16 +52,6 @@ import gregtech.api.util.GT_Utility;
import gregtech.nei.NEIRecipeInfo;
import ic2.core.Ic2Items;
import ic2.core.item.ItemFluidCell;
-import java.util.*;
-import java.util.function.Supplier;
-import javax.annotation.Nonnegative;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
-import org.jetbrains.annotations.Nullable;
public class BWRecipes {
@@ -82,7 +78,8 @@ public class BWRecipes {
"",
true,
false // special handler
- ) {
+ ) {
+
@Nullable
@Override
public IDrawable getOverlayForSlot(boolean isFluid, boolean isOutput, int index, boolean isSpecial) {
@@ -108,71 +105,65 @@ public class BWRecipes {
}
return super.getOverlayForSlot(isFluid, isOutput, index, false);
}
- }.setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
- .setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
- .setLogoPos(125, 3)
- .setLogoSize(47, 21);
+ }.setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE).setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setLogoPos(125, 3).setLogoSize(47, 21);
private final GT_Recipe.GT_Recipe_Map sBacteriaVat = new BacteriaVatRecipeMap(
- new HashSet<>(50),
- "bw.recipe.BacteriaVat",
- StatCollector.translateToLocal("tile.biovat.name"),
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 6,
- 2,
- 0,
- 1,
- 1,
- " Sievert: ",
- 1,
- " Sv",
- true,
- false // special handler
- )
- .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
+ new HashSet<>(50),
+ "bw.recipe.BacteriaVat",
+ StatCollector.translateToLocal("tile.biovat.name"),
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 6,
+ 2,
+ 0,
+ 1,
+ 1,
+ " Sievert: ",
+ 1,
+ " Sv",
+ true,
+ false // special handler
+ ).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
.setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
int[] tSpecialA = GT_TileEntity_BioVat.specialValueUnpack(recipeInfo.recipe.mSpecialValue);
return Arrays.asList(
StatCollector.translateToLocal("nei.biovat.0.name") + " " + tSpecialA[0],
- (tSpecialA[2] == 1
- ? StatCollector.translateToLocal("nei.biovat.1.name")
- : StatCollector.translateToLocal("nei.biovat.2.name"))
+ (tSpecialA[2] == 1 ? StatCollector.translateToLocal("nei.biovat.1.name")
+ : StatCollector.translateToLocal("nei.biovat.2.name"))
+ applyPrefixAndSuffix.apply(tSpecialA[3]));
});
private final GT_Recipe.GT_Recipe_Map sAcidGenFuels = new BW_Recipe_Map_LiquidFuel(
- new HashSet<>(10),
- "bw.fuels.acidgens",
- StatCollector.translateToLocal("tile.acidgenerator.name"),
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 1,
- 1,
- 1,
- 1,
- 1,
- "EU generated: ",
- 1000,
- "",
- false,
- true)
- .useModularUI(true);
+ new HashSet<>(10),
+ "bw.fuels.acidgens",
+ StatCollector.translateToLocal("tile.acidgenerator.name"),
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ "EU generated: ",
+ 1000,
+ "",
+ false,
+ true).useModularUI(true);
private final GT_Recipe.GT_Recipe_Map sCircuitAssemblyLineMap = new SpecialObjectSensitiveMap(
- new HashSet<>(60),
- "bw.recipe.cal",
- "Circuit Assembly Line",
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 6,
- 1,
- 1,
- 1,
- 1,
- "",
- 1,
- "",
- true,
- true)
- .setProgressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER);
+ new HashSet<>(60),
+ "bw.recipe.cal",
+ "Circuit Assembly Line",
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 6,
+ 1,
+ 1,
+ 1,
+ 1,
+ "",
+ 1,
+ "",
+ true,
+ true).setProgressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER);
private final GT_Recipe.GT_Recipe_Map sRadHatch = new GT_Recipe.GT_Recipe_Map(
new HashSet<>(150),
"bw.recipe.radhatch",
@@ -189,13 +180,13 @@ public class BWRecipes {
"",
false,
true) {
+
@Override
- public void addProgressBarUI(
- ModularWindow.Builder builder, Supplier<Float> progressSupplier, Pos2d windowOffset) {
- builder.widget(new DrawableWidget()
- .setDrawable(BW_UITextures.PICTURE_RADIATION)
- .setPos(new Pos2d(74, 20).add(windowOffset))
- .setSize(29, 27));
+ public void addProgressBarUI(ModularWindow.Builder builder, Supplier<Float> progressSupplier,
+ Pos2d windowOffset) {
+ builder.widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_RADIATION)
+ .setPos(new Pos2d(74, 20).add(windowOffset)).setSize(29, 27));
}
@Override
@@ -203,11 +194,8 @@ public class BWRecipes {
@Override
protected void drawNEIDurationInfo(NEIRecipeInfo recipeInfo) {}
- }.setSlotOverlay(false, false, BW_UITextures.OVERLAY_SLOT_ROD)
- .setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
- .setLogoPos(118, 55)
- .setLogoSize(47, 21)
- .setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
+ }.setSlotOverlay(false, false, BW_UITextures.OVERLAY_SLOT_ROD).setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setLogoPos(118, 55).setLogoSize(47, 21).setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
int radioLevel = recipeInfo.recipe.mEUt;
int amount = recipeInfo.recipe.mDuration;
long time = recipeInfo.recipe.mSpecialValue;
@@ -247,12 +235,13 @@ public class BWRecipes {
}
public boolean addRadHatch(ItemStack item, int radioLevel, int amount, short[] rgba) {
- return sRadHatch.addRecipe(new DynamicGTRecipe(
+ return sRadHatch.addRecipe(
+ new DynamicGTRecipe(
false,
- new ItemStack[] {item},
+ new ItemStack[] { item },
null,
null,
- new int[] {rgba[0], rgba[1], rgba[2]},
+ new int[] { rgba[0], rgba[1], rgba[2] },
null,
null,
amount,
@@ -262,12 +251,13 @@ public class BWRecipes {
}
public boolean addRadHatch(ItemStack item, int radioLevel, int amount, int time, short[] rgba) {
- return sRadHatch.addRecipe(new DynamicGTRecipe(
+ return sRadHatch.addRecipe(
+ new DynamicGTRecipe(
false,
- new ItemStack[] {item},
+ new ItemStack[] { item },
null,
null,
- new int[] {rgba[0], rgba[1], rgba[2]},
+ new int[] { rgba[0], rgba[1], rgba[2] },
null,
null,
amount,
@@ -276,20 +266,13 @@ public class BWRecipes {
!= null;
}
- public boolean addBioLabRecipe(
- ItemStack[] aInputs,
- ItemStack aOutput,
- ItemStack aSpecialItems,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipe(ItemStack[] aInputs, ItemStack aOutput, ItemStack aSpecialItems, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
aSpecialItems,
aChances,
aFluidInputs,
@@ -300,44 +283,34 @@ public class BWRecipes {
!= null;
}
- public boolean addBioLabRecipeIncubation(
- ItemStack aInput,
- BioCulture aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipeIncubation(ItemStack aInput, BioCulture aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
- new ItemStack[] {BioItemList.getPetriDish(null), aInput},
- new ItemStack[] {BioItemList.getPetriDish(aOutput)},
+ new ItemStack[] { BioItemList.getPetriDish(null), aInput },
+ new ItemStack[] { BioItemList.getPetriDish(aOutput) },
null,
aChances,
aFluidInputs,
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { GT_Values.NF },
aDuration,
aEUt,
aSpecialValue))
!= null;
}
- public boolean addBioLabRecipeIncubation(
- ItemStack aInput,
- BioCulture aOutput,
- int[] aChances,
- FluidStack aFluidInputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipeIncubation(ItemStack aInput, BioCulture aOutput, int[] aChances,
+ FluidStack aFluidInputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
- new ItemStack[] {BioItemList.getPetriDish(null), aInput},
- new ItemStack[] {BioItemList.getPetriDish(aOutput)},
+ new ItemStack[] { BioItemList.getPetriDish(null), aInput },
+ new ItemStack[] { BioItemList.getPetriDish(aOutput) },
null,
aChances,
- new FluidStack[] {aFluidInputs},
- new FluidStack[] {GT_Values.NF},
+ new FluidStack[] { aFluidInputs },
+ new FluidStack[] { GT_Values.NF },
aDuration,
aEUt,
aSpecialValue))
@@ -345,19 +318,13 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBioLabRecipeDNAExtraction(
- ItemStack[] aInputs,
- ItemStack aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipeDNAExtraction(ItemStack[] aInputs, ItemStack aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
BioItemList.mBioLabParts[0],
aChances,
aFluidInputs,
@@ -369,19 +336,13 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBioLabRecipePCRThermoclycling(
- ItemStack[] aInputs,
- ItemStack aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipePCRThermoclycling(ItemStack[] aInputs, ItemStack aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
BioItemList.mBioLabParts[1],
aChances,
aFluidInputs,
@@ -393,19 +354,13 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBioLabRecipePlasmidSynthesis(
- ItemStack[] aInputs,
- ItemStack aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipePlasmidSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
BioItemList.mBioLabParts[2],
aChances,
aFluidInputs,
@@ -417,19 +372,13 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBioLabRecipeTransformation(
- ItemStack[] aInputs,
- ItemStack aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipeTransformation(ItemStack[] aInputs, ItemStack aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
BioItemList.mBioLabParts[3],
aChances,
aFluidInputs,
@@ -441,19 +390,13 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBioLabRecipeClonalCellularSynthesis(
- ItemStack[] aInputs,
- ItemStack aOutput,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue) {
- return sBiolab.addRecipe(new DynamicGTRecipe(
+ public boolean addBioLabRecipeClonalCellularSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return sBiolab.addRecipe(
+ new DynamicGTRecipe(
true,
aInputs,
- new ItemStack[] {aOutput},
+ new ItemStack[] { aOutput },
BioItemList.mBioLabParts[4],
aChances,
aFluidInputs,
@@ -465,21 +408,15 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- ItemStack[] aOutputs,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- Materials material,
- @Nonnegative byte glasTier) {
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, @Nonnegative byte glasTier) {
int aSievert = 0;
if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43)
aSievert += calculateSv(material);
aSievert = aSievert << 6;
aSievert = aSievert | glasTier;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
aOutputs,
@@ -493,17 +430,9 @@ public class BWRecipes {
!= null;
}
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- BioCulture aCulture,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- @Nonnegative int aDuration,
- @Nonnegative int aEUt,
- @Nonnegative int aSv,
- @Nonnegative int glasTier,
- int aSpecialValue,
- boolean exactSv) {
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, BioCulture aCulture, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, @Nonnegative int aDuration, @Nonnegative int aEUt, @Nonnegative int aSv,
+ @Nonnegative int glasTier, int aSpecialValue, boolean exactSv) {
byte gTier = (byte) glasTier;
int aSievert = 0;
if (aSv >= 83 || aSv == 61 || aSv == 43) aSievert += aSv;
@@ -513,7 +442,8 @@ public class BWRecipes {
aSievert = aSievert | specialToByte(aSpecialValue);
aSievert = aSievert << 4;
aSievert = aSievert | gTier;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
null,
@@ -528,17 +458,9 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- BioCulture aCulture,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- Materials material,
- @Nonnegative int glasTier,
- int aSpecialValue,
- boolean exactSv) {
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, BioCulture aCulture, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, @Nonnegative int glasTier,
+ int aSpecialValue, boolean exactSv) {
byte gTier = (byte) glasTier;
int aSievert = 0;
if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43)
@@ -549,7 +471,8 @@ public class BWRecipes {
aSievert = aSievert | specialToByte(aSpecialValue);
aSievert = aSievert << 4;
aSievert = aSievert | gTier;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
null,
@@ -564,22 +487,16 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- ItemStack[] aOutputs,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- Materials material,
- boolean exactSv) {
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, boolean exactSv) {
int aSievert = 0;
if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43)
aSievert += calculateSv(material);
aSievert = aSievert << 1;
aSievert = aSievert | (exactSv ? 1 : 0);
aSievert = aSievert << 6;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
aOutputs,
@@ -594,15 +511,8 @@ public class BWRecipes {
}
@Deprecated
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- BioCulture culture,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- Materials material,
- int aSpecialValue,
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, BioCulture culture, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, int aSpecialValue,
boolean exactSv) {
int aSievert = 0;
if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43)
@@ -612,7 +522,8 @@ public class BWRecipes {
aSievert = aSievert << 2;
aSievert = aSievert | specialToByte(aSpecialValue);
aSievert = aSievert << 4;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
null,
@@ -629,17 +540,12 @@ public class BWRecipes {
/**
* Adds a Vat recipe without Rad requirements but with Glas requirements
*/
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- BioCulture culture,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- byte glasTier) {
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, BioCulture culture, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, byte glasTier) {
int aSievert = 0;
aSievert = aSievert | glasTier;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
null,
@@ -656,14 +562,10 @@ public class BWRecipes {
/**
* Adds a Vat recipe without Rad or Glas requirements
*/
- public boolean addBacterialVatRecipe(
- ItemStack[] aInputs,
- FluidStack[] aFluidInputs,
- BioCulture culture,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt) {
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ public boolean addBacterialVatRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, BioCulture culture,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt) {
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
false,
aInputs,
null,
@@ -677,17 +579,9 @@ public class BWRecipes {
!= null;
}
- public boolean addTrimmedBacterialVatRecipe(
- ItemStack[] aInputs,
- BioCulture aCulture,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- Materials material,
- @Nonnegative int glasTier,
- int aSpecialValue,
- boolean exactSv) {
+ public boolean addTrimmedBacterialVatRecipe(ItemStack[] aInputs, BioCulture aCulture, FluidStack[] aFluidInputs,
+ FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, @Nonnegative int glasTier,
+ int aSpecialValue, boolean exactSv) {
byte gTier = (byte) glasTier;
int aSievert = 0;
if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43)
@@ -698,7 +592,8 @@ public class BWRecipes {
aSievert = aSievert | specialToByte(aSpecialValue);
aSievert = aSievert << 4;
aSievert = aSievert | gTier;
- return sBacteriaVat.addRecipe(new BacteriaVatRecipe(
+ return sBacteriaVat.addRecipe(
+ new BacteriaVatRecipe(
true,
aInputs,
null,
@@ -714,18 +609,9 @@ public class BWRecipes {
public static class DynamicGTRecipe extends GT_Recipe {
- public DynamicGTRecipe(
- boolean aOptimize,
- ItemStack[] aInputs,
- ItemStack[] aOutputs,
- Object aSpecialItems,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
- int aSpecialValue,
- GT_Recipe originalRecipe) {
+ public DynamicGTRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems,
+ int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt,
+ int aSpecialValue, GT_Recipe originalRecipe) {
super(
aOptimize,
aInputs,
@@ -744,16 +630,8 @@ public class BWRecipes {
}
}
- public DynamicGTRecipe(
- boolean aOptimize,
- ItemStack[] aInputs,
- ItemStack[] aOutputs,
- Object aSpecialItems,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
+ public DynamicGTRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems,
+ int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt,
int aSpecialValue) {
this(
aOptimize,
@@ -772,21 +650,10 @@ public class BWRecipes {
public static class BW_Recipe_Map_LiquidFuel extends GT_Recipe.GT_Recipe_Map_Fuel {
- public BW_Recipe_Map_LiquidFuel(
- Collection<GT_Recipe> aRecipeList,
- String aUnlocalizedName,
- String aLocalName,
- String aNEIName,
- String aNEIGUIPath,
- int aUsualInputCount,
- int aUsualOutputCount,
- int aMinimalInputItems,
- int aMinimalInputFluids,
- int aAmperage,
- String aNEISpecialValuePre,
- int aNEISpecialValueMultiplier,
- String aNEISpecialValuePost,
- boolean aShowVoltageAmperageInNEI,
+ public BW_Recipe_Map_LiquidFuel(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName,
+ String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount,
+ int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre,
+ int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI,
boolean aNEIAllowed) {
super(
aRecipeList,
@@ -812,7 +679,9 @@ public class BWRecipes {
public GT_Recipe addMoltenFuel(Materials M, int burn) {
return super.addFuel(
- GT_OreDictUnificator.get(OrePrefixes.cellMolten, M, 1), Materials.Empty.getCells(1), burn);
+ GT_OreDictUnificator.get(OrePrefixes.cellMolten, M, 1),
+ Materials.Empty.getCells(1),
+ burn);
}
public GT_Recipe addLiquidFuel(FluidStack fluidStack, int burn) {
@@ -822,16 +691,8 @@ public class BWRecipes {
public static class BacteriaVatRecipe extends GT_Recipe {
- public BacteriaVatRecipe(
- boolean aOptimize,
- ItemStack[] aInputs,
- ItemStack[] aOutputs,
- ItemStack aSpecialItems,
- int[] aChances,
- FluidStack[] aFluidInputs,
- FluidStack[] aFluidOutputs,
- int aDuration,
- int aEUt,
+ public BacteriaVatRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, ItemStack aSpecialItems,
+ int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt,
int aSpecialValue) {
super(
aOptimize,
@@ -849,21 +710,10 @@ public class BWRecipes {
public static class BacteriaVatRecipeMap extends BWRecipes.SpecialObjectSensitiveMap {
- public BacteriaVatRecipeMap(
- Collection<GT_Recipe> aRecipeList,
- String aUnlocalizedName,
- String aLocalName,
- String aNEIName,
- String aNEIGUIPath,
- int aUsualInputCount,
- int aUsualOutputCount,
- int aMinimalInputItems,
- int aMinimalInputFluids,
- int aAmperage,
- String aNEISpecialValuePre,
- int aNEISpecialValueMultiplier,
- String aNEISpecialValuePost,
- boolean aShowVoltageAmperageInNEI,
+ public BacteriaVatRecipeMap(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName,
+ String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount,
+ int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre,
+ int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI,
boolean aNEIAllowed) {
super(
aRecipeList,
@@ -883,23 +733,21 @@ public class BWRecipes {
aNEIAllowed);
}
- protected GT_Recipe addRecipe(
- GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
+ protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe,
+ boolean aHidden) {
aRecipe.mHidden = aHidden;
aRecipe.mFakeRecipe = aFakeRecipe;
- GT_Recipe isthere =
- this.findRecipe(null, false, false, 9223372036854775807L, aRecipe.mFluidInputs, aRecipe.mInputs);
+ GT_Recipe isthere = this
+ .findRecipe(null, false, false, 9223372036854775807L, aRecipe.mFluidInputs, aRecipe.mInputs);
if (aRecipe.mFluidInputs.length < this.mMinimalInputFluids
&& aRecipe.mInputs.length < this.mMinimalInputItems) {
return null;
} else {
- return aCheckForCollisions
- && isthere != null
- && BW_Util.areStacksEqualOrNull(
- (ItemStack) isthere.mSpecialItems, (ItemStack) aRecipe.mSpecialItems)
- ? null
- : this.add(aRecipe);
+ return aCheckForCollisions && isthere != null
+ && BW_Util.areStacksEqualOrNull(
+ (ItemStack) isthere.mSpecialItems,
+ (ItemStack) aRecipe.mSpecialItems) ? null : this.add(aRecipe);
}
}
@@ -910,9 +758,9 @@ public class BWRecipes {
public GT_Recipe addRecipe(GT_Recipe aRecipe) {
- if (aRecipe.mInputs.length > 0
- && GT_Utility.areStacksEqual(
- aRecipe.mInputs[aRecipe.mInputs.length - 1], GT_Utility.getIntegratedCircuit(32767)))
+ if (aRecipe.mInputs.length > 0 && GT_Utility.areStacksEqual(
+ aRecipe.mInputs[aRecipe.mInputs.length - 1],
+ GT_Utility.getIntegratedCircuit(32767)))
return aRecipe;
else {
ItemStack[] nu1 = Arrays.copyOf(aRecipe.mInputs, aRecipe.mInputs.length + 1);
@@ -937,21 +785,10 @@ public class BWRecipes {
public static class SpecialObjectSensitiveMap extends GT_Recipe.GT_Recipe_Map {
- public SpecialObjectSensitiveMap(
- Collection<GT_Recipe> aRecipeList,
- String aUnlocalizedName,
- String aLocalName,
- String aNEIName,
- String aNEIGUIPath,
- int aUsualInputCount,
- int aUsualOutputCount,
- int aMinimalInputItems,
- int aMinimalInputFluids,
- int aAmperage,
- String aNEISpecialValuePre,
- int aNEISpecialValueMultiplier,
- String aNEISpecialValuePost,
- boolean aShowVoltageAmperageInNEI,
+ public SpecialObjectSensitiveMap(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName,
+ String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount,
+ int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre,
+ int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI,
boolean aNEIAllowed) {
super(
aRecipeList,
@@ -974,24 +811,22 @@ public class BWRecipes {
/**
* finds a Recipe matching the aFluid, aSpecial and ItemStack Inputs.
*
- * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup.
- * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up.
+ * @param aTileEntity an Object representing the current coordinates of the executing
+ * Block/Entity/Whatever. This may be null, especially during Startup.
+ * @param aRecipe in case this is != null it will try to use this Recipe first when looking things
+ * up.
* @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs
- * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with the provided input
+ * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with
+ * the provided input
* @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage
* @param aFluids the Fluid Inputs
- * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do. Like this one.
+ * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with
+ * this, but some custom ones do. Like this one.
* @param aInputs the Item Inputs
* @return the Recipe it has found or null for no matching Recipe
*/
- public GT_Recipe findRecipe(
- IHasWorldObjectAndCoords aTileEntity,
- GT_Recipe aRecipe,
- boolean aNotUnificated,
- boolean aDontCheckStackSizes,
- long aVoltage,
- FluidStack[] aFluids,
- ItemStack aSpecialSlot,
+ public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated,
+ boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot,
ItemStack... aInputs) {
// No Recipes? Well, nothing to be found then.
if (mRecipeList.isEmpty()) return null;
@@ -1019,49 +854,34 @@ public class BWRecipes {
if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(true, (Object) aInputs);
// Check the Recipe which has been used last time in order to not have to search for it again, if possible.
- if (aRecipe != null)
- if (!aRecipe.mFakeRecipe
- && aRecipe.mCanBeBuffered
- && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
- && BW_Util.areStacksEqualOrNull((ItemStack) aRecipe.mSpecialItems, aSpecialSlot))
- return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null;
+ if (aRecipe != null) if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered
+ && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
+ && BW_Util.areStacksEqualOrNull((ItemStack) aRecipe.mSpecialItems, aSpecialSlot))
+ return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null;
// Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
- if (mUsualInputCount > 0 && aInputs != null)
- for (ItemStack tStack : aInputs)
- if (tStack != null) {
- Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes)
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
- && BW_Util.areStacksEqualOrNull(
- (ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
- return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
- tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(GT_Values.W, tStack)));
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes)
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
- && BW_Util.areStacksEqualOrNull(
- (ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
- return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
- }
+ if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) if (tStack != null) {
+ Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
+ && BW_Util.areStacksEqualOrNull((ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(GT_Values.W, tStack)));
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
+ && BW_Util.areStacksEqualOrNull((ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
// If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that
// Map too.
- if (mMinimalInputItems == 0 && aFluids != null)
- for (FluidStack aFluid : aFluids)
- if (aFluid != null) {
- Collection<GT_Recipe> tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes)
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
- && BW_Util.areStacksEqualOrNull(
- (ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
- return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
- }
+ if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids) if (aFluid != null) {
+ Collection<GT_Recipe> tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
+ && BW_Util.areStacksEqualOrNull((ItemStack) tRecipe.mSpecialItems, aSpecialSlot))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
// And nothing has been found.
return null;
@@ -1074,7 +894,7 @@ public class BWRecipes {
Map<Character, ItemStack> charToStackMap = new HashMap<>(9, 1);
String[] shape;
- @SuppressWarnings({"SuspiciousSystemArraycopy"})
+ @SuppressWarnings({ "SuspiciousSystemArraycopy" })
public BWNBTDependantCraftingRecipe(ItemStack result, Object... recipe) {
this.result = result;
this.shape = new String[3];
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java
index 94a6f5c558..580f6f7793 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java
@@ -1,33 +1,26 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
+import java.util.Arrays;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
-import java.util.Arrays;
@SuppressWarnings("unused")
public class BW_ColorUtil {
+
private BW_ColorUtil() {}
public static byte getDarknessFromColor(short[] rgba, int index) {
@@ -65,54 +58,51 @@ public class BW_ColorUtil {
case 3:
if (rgba[3] - 50 > rgba[0]) return Dyes.dyeMagenta;
else if (rgba[0] > 200 && rgba[2] > 140) return Dyes.dyePink;
- else if (rgba[0] > rgba[1] + rgba[1] / 10
- && rgba[0] > rgba[2] + rgba[2] / 10
+ else if (rgba[0] > rgba[1] + rgba[1] / 10 && rgba[0] > rgba[2] + rgba[2] / 10
&& rgba[1] >> 4 == rgba[2] >> 4
&& rgba[1] + 50 > rgba[0]) {
- return Dyes.dyeBrown;
- } else return Dyes.dyeRed;
+ return Dyes.dyeBrown;
+ } else
+ return Dyes.dyeRed;
case 4:
return Dyes._NULL;
}
}
- if (isYellowScale(tmp))
- switch (getDarknessFromColor(rgba, 0)) {
- case 0:
- case 1:
- return Dyes.dyeBrown;
- case 2:
- case 3: {
- if (rgba[0] >> 5 > rgba[1] >> 5) return Dyes.dyeOrange;
- else return Dyes.dyeYellow;
- }
- case 4:
- return Dyes._NULL;
+ if (isYellowScale(tmp)) switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ case 1:
+ return Dyes.dyeBrown;
+ case 2:
+ case 3: {
+ if (rgba[0] >> 5 > rgba[1] >> 5) return Dyes.dyeOrange;
+ else return Dyes.dyeYellow;
}
+ case 4:
+ return Dyes._NULL;
+ }
return Dyes.dyePink;
} else if (isGrenScale(tmp)) {
if (isCyanScale(tmp)) {
- if (rgba[2] + 40 < rgba[1])
- switch (getDarknessFromColor(rgba, 0)) {
- case 0:
- case 1:
- return Dyes.dyeGreen;
- case 2:
- case 3:
- return Dyes.dyeLime;
- }
- return Dyes.dyeCyan;
- }
- if (isYellowScale(tmp))
- switch (getDarknessFromColor(rgba, 0)) {
+ if (rgba[2] + 40 < rgba[1]) switch (getDarknessFromColor(rgba, 0)) {
case 0:
case 1:
- return Dyes.dyeBrown;
+ return Dyes.dyeGreen;
case 2:
- case 3: {
- if (rgba[0] >> 5 > rgba[1] >> 5) return Dyes.dyeOrange;
- else return Dyes.dyeYellow;
- }
+ case 3:
+ return Dyes.dyeLime;
+ }
+ return Dyes.dyeCyan;
+ }
+ if (isYellowScale(tmp)) switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ case 1:
+ return Dyes.dyeBrown;
+ case 2:
+ case 3: {
+ if (rgba[0] >> 5 > rgba[1] >> 5) return Dyes.dyeOrange;
+ else return Dyes.dyeYellow;
}
+ }
switch (getDarknessFromColor(rgba, 0)) {
case 0:
case 1:
@@ -213,7 +203,7 @@ public class BW_ColorUtil {
}
public static short[] splitColorToRBGArray(int rgb) {
- return new short[] {(short) ((rgb >> 16) & 0xFF), (short) ((rgb >> 8) & 0xFF), (short) (rgb & 0xFF)};
+ return new short[] { (short) ((rgb >> 16) & 0xFF), (short) ((rgb >> 8) & 0xFF), (short) (rgb & 0xFF) };
}
public static int getColorFromRGBArray(short[] color) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java
index 42b8ae5e13..c08c5d4077 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
@@ -26,25 +17,28 @@ import static net.minecraft.util.EnumChatFormatting.*;
import java.util.function.Function;
import java.util.function.Supplier;
+
import net.minecraft.util.StatCollector;
public class BW_Tooltip_Reference {
+
public static final String BW_NO_RESET = ChatColorHelper.DARKGREEN + "BartWorks";
public static final String TT_NO_RESET = BLUE + "Tec" + DARK_BLUE + "Tech";
public static final String BW = BW_NO_RESET + GRAY;
public static final String TT = TT_NO_RESET + GRAY;
- public static final Supplier<String> ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS =
- () -> StatCollector.translateToLocal("tooltip.bw.1.name") + " " + BW;
- public static final Supplier<String> ADDED_BY_BARTWORKS =
- () -> StatCollector.translateToLocal("tooltip.bw.0.name") + " " + BW;
- public static final Function<String, String> ADDED_VIA_BARTWORKS =
- owner -> String.format(StatCollector.translateToLocal("tooltip.bw.via.name"), owner);
+ public static final Supplier<String> ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS = () -> StatCollector.translateToLocal(
+ "tooltip.bw.1.name") + " " + BW;
+ public static final Supplier<String> ADDED_BY_BARTWORKS = () -> StatCollector.translateToLocal("tooltip.bw.0.name")
+ + " "
+ + BW;
+ public static final Function<String, String> ADDED_VIA_BARTWORKS = owner -> String
+ .format(StatCollector.translateToLocal("tooltip.bw.via.name"), owner);
public static final String MULTIBLOCK_ADDED_BY_BARTWORKS = BW;
- public static final Function<String, String> MULTIBLOCK_ADDED_VIA_BARTWORKS =
- owner -> String.format(StatCollector.translateToLocal("tooltip.bw.mb_via.name"), owner);
- public static final String MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS =
- MULTIBLOCK_ADDED_VIA_BARTWORKS.apply(GREEN + "bartimaeusnek");
+ public static final Function<String, String> MULTIBLOCK_ADDED_VIA_BARTWORKS = owner -> String
+ .format(StatCollector.translateToLocal("tooltip.bw.mb_via.name"), owner);
+ public static final String MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS = MULTIBLOCK_ADDED_VIA_BARTWORKS
+ .apply(GREEN + "bartimaeusnek");
public static final String ADV_STR_CHECK = "Uses an advanced " + TT + " structure check, due to " + BW;
public static final String TT_BLUEPRINT = "To see the structure, use a " + TT + " Blueprint on the Controller!";
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
index de6037095f..eb0489edec 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
@@ -1,54 +1,30 @@
/*
- * 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.util;
import static gregtech.api.enums.GT_Values.*;
-import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
-import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.gtnewhorizon.structurelib.StructureLibAPI;
-import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
-import com.gtnewhorizon.structurelib.structure.IStructureElement;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OreDictNames;
-import gregtech.api.enums.ToolDictNames;
-import gregtech.api.interfaces.IItemContainer;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.*;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.stream.Collectors;
+
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.Enchantment;
@@ -64,9 +40,29 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
+
import org.apache.commons.lang3.reflect.FieldUtils;
-@SuppressWarnings({"unused", "RedundantSuppression"})
+import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OreDictNames;
+import gregtech.api.enums.ToolDictNames;
+import gregtech.api.interfaces.IItemContainer;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.ItemData;
+import gregtech.api.util.*;
+
+@SuppressWarnings({ "unused", "RedundantSuppression" })
public class BW_Util {
public static final int STANDART = 0;
@@ -279,24 +275,22 @@ public class BW_Util {
return special;
}
- public static boolean addBlockToMachine(
- int x, int y, int z, int offsetsize, IGregTechTileEntity aBaseMetaTileEntity, Block block) {
+ public static boolean addBlockToMachine(int x, int y, int z, int offsetsize,
+ IGregTechTileEntity aBaseMetaTileEntity, Block block) {
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * offsetsize;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * offsetsize;
- return block == Blocks.air
- ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
+ return block == Blocks.air ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
: aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(block);
}
- public static boolean addBlockToMachine(
- int x, int y, int z, int offsetsize, IGregTechTileEntity aBaseMetaTileEntity, Block block, int damage) {
+ public static boolean addBlockToMachine(int x, int y, int z, int offsetsize,
+ IGregTechTileEntity aBaseMetaTileEntity, Block block, int damage) {
byte dmg = (byte) damage;
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * offsetsize;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * offsetsize;
- return block == Blocks.air
- ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
+ return block == Blocks.air ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
: aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(block)
&& aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) == dmg;
}
@@ -305,14 +299,10 @@ public class BW_Util {
for (BioVatLogicAdder.MaterialSvPair pair : BioVatLogicAdder.RadioHatch.getMaSv()) {
if (pair.getMaterials().equals(materials)) return pair.getSievert();
}
- return (int)
- (materials.getProtons() == 43L
- ? (materials.equals(Materials.NaquadahEnriched)
- ? 140
- : materials.equals(Materials.Naquadria)
- ? 150
- : materials.equals(Materials.Naquadah) ? 130 : 43)
- : materials.getProtons());
+ return (int) (materials.getProtons() == 43L
+ ? (materials.equals(Materials.NaquadahEnriched) ? 140
+ : materials.equals(Materials.Naquadria) ? 150 : materials.equals(Materials.Naquadah) ? 130 : 43)
+ : materials.getProtons());
}
public static ItemStack setStackSize(ItemStack stack, int size) {
@@ -321,15 +311,14 @@ public class BW_Util {
}
public static boolean checkStackAndPrefix(ItemStack itemStack) {
- return itemStack != null
- && GT_OreDictUnificator.getAssociation(itemStack) != null
+ return itemStack != null && GT_OreDictUnificator.getAssociation(itemStack) != null
&& GT_OreDictUnificator.getAssociation(itemStack).mPrefix != null
&& GT_OreDictUnificator.getAssociation(itemStack).mMaterial != null
&& GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial != null;
}
- public static Map<ItemStack, ItemStack[]> getInputsFromOutput(
- Collection<GT_Recipe> gt_recipes, ItemStack... inputs) {
+ public static Map<ItemStack, ItemStack[]> getInputsFromOutput(Collection<GT_Recipe> gt_recipes,
+ ItemStack... inputs) {
return gt_recipes.stream()
.filter(ar -> Arrays.stream(inputs).anyMatch(st -> GT_Utility.areStacksEqual(st, ar.mOutputs[0])))
.collect(Collectors.toMap(k -> k.mOutputs[0], k -> k.mInputs));
@@ -377,7 +366,7 @@ public class BW_Util {
return hash;
}
- @SuppressWarnings({"unchecked"})
+ @SuppressWarnings({ "unchecked" })
public static <T> T[] copyAndRemoveNulls(T[] input, Class<T> clazz) {
List<T> ret = Arrays.stream(input).filter(Objects::nonNull).collect(Collectors.toList());
@@ -472,38 +461,27 @@ public class BW_Util {
}
/**
- * Taken from the GTNH fork, made originally by Tec
- * Calcualtes overclocked ness using long integers
+ * Taken from the GTNH fork, made originally by Tec Calcualtes overclocked ness using long integers
*
* @param aEUt - recipe EUt
* @param aDuration - recipe Duration
* @param mAmperage - should be 1 ?
*/
- public static void calculateOverclockedNessMulti(
- @Nonnegative int aEUt,
- @Nonnegative int aDuration,
- @Nonnegative int mAmperage,
- @Nonnegative long maxInputVoltage,
+ public static void calculateOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration,
+ @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage,
@Nonnull GT_MetaTileEntity_MultiBlockBase base) {
calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, false);
}
- public static void calculatePerfectOverclockedNessMulti(
- @Nonnegative int aEUt,
- @Nonnegative int aDuration,
- @Nonnegative int mAmperage,
- @Nonnegative long maxInputVoltage,
+ public static void calculatePerfectOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration,
+ @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage,
@Nonnull GT_MetaTileEntity_MultiBlockBase base) {
calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, true);
}
- private static void calculateOverclockednessMultiInternal(
- @Nonnegative int aEUt,
- @Nonnegative int aDuration,
- @Nonnegative int mAmperage,
- @Nonnegative long maxInputVoltage,
- @Nonnull GT_MetaTileEntity_MultiBlockBase base,
- @Nonnull boolean perfectOC) {
+ private static void calculateOverclockednessMultiInternal(@Nonnegative int aEUt, @Nonnegative int aDuration,
+ @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage,
+ @Nonnull GT_MetaTileEntity_MultiBlockBase base, @Nonnull boolean perfectOC) {
byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage));
if (mTier == 0) {
// Long time calculation
@@ -528,9 +506,8 @@ public class BW_Util {
tempEUt <<= 2; // this actually controls overclocking
// xEUt *= 4;//this is effect of everclocking
base.mMaxProgresstime >>= perfectOC ? 2 : 1; // this is effect of overclocking
- xEUt = base.mMaxProgresstime <= 0
- ? xEUt >> 1
- : xEUt << 2; // U know, if the time is less than 1 tick make the machine use less power
+ xEUt = base.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 2; // U know, if the time is less than 1 tick
+ // make the machine use less power
}
while (xEUt > maxInputVoltage && xEUt >= aEUt) {
@@ -598,18 +575,8 @@ public class BW_Util {
}
}
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- boolean insideCheck,
- Block inside,
- int dmginside,
- int aBaseCasingIndex) {
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, boolean insideCheck, Block inside, int dmginside, int aBaseCasingIndex) {
return BW_Util.check_layer(
aBaseMetaTileEntity,
radius,
@@ -625,29 +592,14 @@ public class BW_Util {
aBaseCasingIndex);
}
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- int aBaseCasingIndex) {
- return BW_Util.check_layer(
- aBaseMetaTileEntity, radius, yLevel, height, block, dmg, offset, false, aBaseCasingIndex);
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, int aBaseCasingIndex) {
+ return BW_Util
+ .check_layer(aBaseMetaTileEntity, radius, yLevel, height, block, dmg, offset, false, aBaseCasingIndex);
}
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- boolean controllerLayer,
- int aBaseCasingIndex) {
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, boolean controllerLayer, int aBaseCasingIndex) {
return BW_Util.check_layer(
aBaseMetaTileEntity,
radius,
@@ -661,17 +613,8 @@ public class BW_Util {
aBaseCasingIndex);
}
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- boolean controllerLayer,
- boolean freeCorners,
- int aBaseCasingIndex) {
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, boolean controllerLayer, boolean freeCorners, int aBaseCasingIndex) {
return BW_Util.check_layer(
aBaseMetaTileEntity,
radius,
@@ -689,18 +632,8 @@ public class BW_Util {
aBaseCasingIndex);
}
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- boolean controllerLayer,
- boolean insideCheck,
- Block inside,
- int dmginside,
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, boolean controllerLayer, boolean insideCheck, Block inside, int dmginside,
int aBaseCasingIndex) {
return BW_Util.check_layer(
aBaseMetaTileEntity,
@@ -734,21 +667,9 @@ public class BW_Util {
* @param aBaseCasingIndex the Index for the hatches texture
* @return if the layer check was completed
*/
- public static boolean check_layer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- Block block,
- int dmg,
- int offset,
- boolean controllerLayer,
- boolean freeCorners,
- boolean insideCheck,
- Block inside,
- int dmginside,
- boolean allowHatches,
- int aBaseCasingIndex) {
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel, int height,
+ Block block, int dmg, int offset, boolean controllerLayer, boolean freeCorners, boolean insideCheck,
+ Block inside, int dmginside, boolean allowHatches, int aBaseCasingIndex) {
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * offset;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * offset;
for (int x = -radius; x <= radius; x++) {
@@ -758,88 +679,91 @@ public class BW_Util {
if (controllerLayer && (xDir + x == 0 && zDir + z == 0)) continue;
boolean b = Math.abs(x) < radius && Math.abs(z) != radius;
if (insideCheck && b) {
- if (!(inside.equals(Blocks.air)
- ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
- : aBaseMetaTileEntity
- .getBlockOffset(xDir + x, y, zDir + z)
- .equals(inside))
+ if (!(inside.equals(Blocks.air) ? aBaseMetaTileEntity.getAirOffset(xDir + x, y, zDir + z)
+ : aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(inside))
&& (aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) != dmginside
|| dmginside > (-1))) {
if (!(allowHatches
&& (((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
- .addDynamoToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
- || ((GT_MetaTileEntity_MultiBlockBase)
- aBaseMetaTileEntity.getMetaTileEntity())
- .addEnergyInputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
- || ((GT_MetaTileEntity_MultiBlockBase)
- aBaseMetaTileEntity.getMetaTileEntity())
- .addMaintenanceToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
- || ((GT_MetaTileEntity_MultiBlockBase)
- aBaseMetaTileEntity.getMetaTileEntity())
- .addMufflerToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
- || ((GT_MetaTileEntity_MultiBlockBase)
- aBaseMetaTileEntity.getMetaTileEntity())
- .addInputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
- || ((GT_MetaTileEntity_MultiBlockBase)
- aBaseMetaTileEntity.getMetaTileEntity())
- .addOutputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)))) {
+ .addDynamoToMachineList(
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
+ aBaseCasingIndex)
+ || ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity
+ .getMetaTileEntity())
+ .addEnergyInputToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ xDir + x,
+ y,
+ zDir + z),
+ aBaseCasingIndex)
+ || ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity
+ .getMetaTileEntity())
+ .addMaintenanceToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ xDir + x,
+ y,
+ zDir + z),
+ aBaseCasingIndex)
+ || ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity
+ .getMetaTileEntity())
+ .addMufflerToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ xDir + x,
+ y,
+ zDir + z),
+ aBaseCasingIndex)
+ || ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity
+ .getMetaTileEntity())
+ .addInputToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ xDir + x,
+ y,
+ zDir + z),
+ aBaseCasingIndex)
+ || ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity
+ .getMetaTileEntity())
+ .addOutputToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ xDir + x,
+ y,
+ zDir + z),
+ aBaseCasingIndex)))) {
return false;
}
}
}
- if (!b
- && !aBaseMetaTileEntity
- .getBlockOffset(xDir + x, y, zDir + z)
- .equals(block)
+ if (!b && !aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(block)
&& (aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) != dmg || dmg > (-1))) {
if (!(allowHatches
&& (((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
- .addDynamoToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
- aBaseCasingIndex)
+ .addDynamoToMachineList(
+ aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
+ aBaseCasingIndex)
|| ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
.addEnergyInputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
aBaseCasingIndex)
|| ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
.addMaintenanceToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
aBaseCasingIndex)
|| ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
.addMufflerToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
aBaseCasingIndex)
|| ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
.addInputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
aBaseCasingIndex)
|| ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity())
.addOutputToMachineList(
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(
- xDir + x, y, zDir + z),
+ aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, y, zDir + z),
aBaseCasingIndex)))) {
return false;
}
@@ -850,15 +774,8 @@ public class BW_Util {
return true;
}
- public static List<Byte> getMetasFromLayer(
- IGregTechTileEntity aBaseMetaTileEntity,
- int radius,
- int yLevel,
- int height,
- int offset,
- boolean controllerLayer,
- boolean freeCorners,
- boolean insideCheck) {
+ public static List<Byte> getMetasFromLayer(IGregTechTileEntity aBaseMetaTileEntity, int radius, int yLevel,
+ int height, int offset, boolean controllerLayer, boolean freeCorners, boolean insideCheck) {
ArrayList<Byte> ret = new ArrayList<>();
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * offset;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * offset;
@@ -951,8 +868,7 @@ public class BW_Util {
if (block.equals(Blocks.glass)) return 3;
- for (BioVatLogicAdder.BlockMetaPair B :
- BioVatLogicAdder.BioVatGlass.getGlassMap().keySet())
+ for (BioVatLogicAdder.BlockMetaPair B : BioVatLogicAdder.BioVatGlass.getGlassMap().keySet())
if (B.getBlock().equals(block) && B.getaByte().equals(meta))
return BioVatLogicAdder.BioVatGlass.getGlassMap().get(B);
@@ -961,17 +877,18 @@ public class BW_Util {
return 0;
}
- public static <T> IStructureElement<T> ofGlassTiered(
- byte mintier, byte maxtier, byte notset, BiConsumer<T, Byte> setter, Function<T, Byte> getter, int aDots) {
+ public static <T> IStructureElement<T> ofGlassTiered(byte mintier, byte maxtier, byte notset,
+ BiConsumer<T, Byte> setter, Function<T, Byte> getter, int aDots) {
return new IStructureElement<T>() {
- private final IStructureElement<T> placementDelegate =
- BorosilicateGlass.ofBoroGlass(notset, mintier, maxtier, setter, getter);
+
+ private final IStructureElement<T> placementDelegate = BorosilicateGlass
+ .ofBoroGlass(notset, mintier, maxtier, setter, getter);
@Override
public boolean check(T te, World world, int x, int y, int z) {
if (world.isAirBlock(x, y, z)) return false;
- byte glasstier =
- BW_Util.calculateGlassTier(world.getBlock(x, y, z), (byte) world.getBlockMetadata(x, y, z));
+ byte glasstier = BW_Util
+ .calculateGlassTier(world.getBlock(x, y, z), (byte) world.getBlockMetadata(x, y, z));
if (glasstier == 0) return false; // is not a glass ?
if (glasstier == notset) return false;
if (glasstier < mintier) return false;
@@ -992,8 +909,8 @@ public class BW_Util {
}
@Override
- public PlaceResult survivalPlaceBlock(
- T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
return placementDelegate.survivalPlaceBlock(t, world, x, y, z, trigger, env);
}
};
@@ -1001,14 +918,15 @@ public class BW_Util {
public static <T> IStructureElement<T> ofGlassTieredMixed(byte mintier, byte maxtier, int aDots) {
return new IStructureElement<T>() {
- private final IStructureElement<T> placementDelegate =
- BorosilicateGlass.ofBoroGlass((byte) 0, mintier, maxtier, (v1, v2) -> {}, (v1) -> (byte) 0);
+
+ private final IStructureElement<T> placementDelegate = BorosilicateGlass
+ .ofBoroGlass((byte) 0, mintier, maxtier, (v1, v2) -> {}, (v1) -> (byte) 0);
@Override
public boolean check(T te, World world, int x, int y, int z) {
if (world.isAirBlock(x, y, z)) return false;
- byte glasstier =
- BW_Util.calculateGlassTier(world.getBlock(x, y, z), (byte) world.getBlockMetadata(x, y, z));
+ byte glasstier = BW_Util
+ .calculateGlassTier(world.getBlock(x, y, z), (byte) world.getBlockMetadata(x, y, z));
if (glasstier == 0) return false; // is not a glass ?
return glasstier >= mintier && glasstier <= maxtier;
}
@@ -1025,8 +943,8 @@ public class BW_Util {
}
@Override
- public PlaceResult survivalPlaceBlock(
- T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
return placementDelegate.survivalPlaceBlock(t, world, x, y, z, trigger, env);
}
};
@@ -1067,25 +985,13 @@ public class BW_Util {
aRecipe);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
- public static ShapedOreRecipe createGTCraftingRecipe(
- ItemStack aResult,
- Enchantment[] aEnchantmentsAdded,
- int[] aEnchantmentLevelsAdded,
- boolean aMirrored,
- boolean aBuffered,
- boolean aKeepNBT,
- boolean aDismantleable,
- boolean aRemovable,
- boolean aReversible,
- boolean aRemoveAllOthersWithSameOutput,
- boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT,
- boolean aRemoveAllOtherShapedsWithSameOutput,
- boolean aRemoveAllOtherNativeRecipes,
- boolean aCheckForCollisions,
- boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis,
- boolean aOnlyAddIfResultIsNotNull,
- Object[] aRecipe) {
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public static ShapedOreRecipe createGTCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded,
+ int[] aEnchantmentLevelsAdded, boolean aMirrored, boolean aBuffered, boolean aKeepNBT,
+ boolean aDismantleable, boolean aRemovable, boolean aReversible, boolean aRemoveAllOthersWithSameOutput,
+ boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, boolean aRemoveAllOtherShapedsWithSameOutput,
+ boolean aRemoveAllOtherNativeRecipes, boolean aCheckForCollisions,
+ boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis, boolean aOnlyAddIfResultIsNotNull, Object[] aRecipe) {
aResult = GT_OreDictUnificator.get(true, aResult);
if (aOnlyAddIfResultIsNotNull && aResult == null) return null;
if (aResult != null && Items.feather.getDamage(aResult) == W) Items.feather.setDamage(aResult, 0);
@@ -1096,11 +1002,11 @@ public class BW_Util {
for (byte i = 0; i < aRecipe.length; i++) {
if (aRecipe[i] instanceof IItemContainer) aRecipe[i] = ((IItemContainer) aRecipe[i]).get(1);
else if (aRecipe[i] instanceof Enum) aRecipe[i] = ((Enum) aRecipe[i]).name();
- else if (!(aRecipe[i] == null
- || aRecipe[i] instanceof ItemStack
+ else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack
|| aRecipe[i] instanceof ItemData
|| aRecipe[i] instanceof String
- || aRecipe[i] instanceof Character)) aRecipe[i] = aRecipe[i].toString();
+ || aRecipe[i] instanceof Character))
+ aRecipe[i] = aRecipe[i].toString();
}
try {
@@ -1194,8 +1100,9 @@ public class BW_Util {
for (; idx < aRecipe.length; idx += 2) {
if (aRecipe[idx] == null || aRecipe[idx + 1] == null) {
if (D1) {
- GT_Log.err.println("WARNING: Missing Item for shaped Recipe: "
- + (aResult == null ? "null" : aResult.getDisplayName()));
+ GT_Log.err.println(
+ "WARNING: Missing Item for shaped Recipe: "
+ + (aResult == null ? "null" : aResult.getDisplayName()));
for (Object tContent : aRecipe) GT_Log.err.println(tContent);
}
return null;
@@ -1273,25 +1180,21 @@ public class BW_Util {
if (aResult == null || aResult.stackSize <= 0) return null;
- if (aRemoveAllOthersWithSameOutput
- || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT
+ if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT
|| aRemoveAllOtherShapedsWithSameOutput
|| aRemoveAllOtherNativeRecipes)
tThereWasARecipe = GT_ModHandler.removeRecipeByOutput(
- aResult,
- !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT,
- aRemoveAllOtherShapedsWithSameOutput,
- aRemoveAllOtherNativeRecipes)
- || tThereWasARecipe;
+ aResult,
+ !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT,
+ aRemoveAllOtherShapedsWithSameOutput,
+ aRemoveAllOtherNativeRecipes) || tThereWasARecipe;
if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tThereWasARecipe) {
- ArrayList<IRecipe> tList =
- (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList();
+ ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList();
int tList_sS = tList.size();
for (int i = 0; i < tList_sS && !tThereWasARecipe; i++) {
IRecipe tRecipe = tList.get(i);
- if (GT_ModHandler.sSpecialRecipeClasses.contains(
- tRecipe.getClass().getName())) continue;
+ if (GT_ModHandler.sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue;
if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, true)) {
tList.remove(i--);
tList_sS = tList.size();
@@ -1306,14 +1209,13 @@ public class BW_Util {
GT_Utility.updateItemStack(aResult);
return new GT_Shaped_Recipe(
- GT_Utility.copy(aResult),
- aDismantleable,
- aRemovable,
- aKeepNBT,
- aEnchantmentsAdded,
- aEnchantmentLevelsAdded,
- aRecipe)
- .setMirrored(aMirrored);
+ GT_Utility.copy(aResult),
+ aDismantleable,
+ aRemovable,
+ aKeepNBT,
+ aEnchantmentsAdded,
+ aEnchantmentLevelsAdded,
+ aRecipe).setMirrored(aMirrored);
}
public static void shortSleep(long nanos) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java
index 16a4d38e30..5ea53e62dd 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java
@@ -1,43 +1,39 @@
/*
- * 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.util;
-import gregtech.api.interfaces.IColorModulationContainer;
-import gregtech.api.util.GT_LanguageManager;
import java.awt.*;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Objects;
+
import net.minecraft.item.EnumRarity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
+import gregtech.api.interfaces.IColorModulationContainer;
+import gregtech.api.util.GT_LanguageManager;
+
public class BioCulture extends BioData implements IColorModulationContainer {
public static final ArrayList<BioCulture> BIO_CULTURE_ARRAY_LIST = new ArrayList<>();
- public static final BioCulture NULLCULTURE = BioCulture.createAndRegisterBioCulture(
- Color.BLUE, "", BioPlasmid.NULLPLASMID, BioDNA.NULLDNA, false); // fallback NULL culture, also Blue =)
+ public static final BioCulture NULLCULTURE = BioCulture
+ .createAndRegisterBioCulture(Color.BLUE, "", BioPlasmid.NULLPLASMID, BioDNA.NULLDNA, false); // fallback
+ // NULL
+ // culture,
+ // also Blue =)
public String getLocalisedName() {
return GT_LanguageManager.getTranslation(this.getName());
@@ -53,8 +49,8 @@ public class BioCulture extends BioData implements IColorModulationContainer {
boolean bBreedable;
Fluid mFluid;
- protected BioCulture(
- Color color, String name, int ID, BioPlasmid plasmid, BioDNA dDNA, EnumRarity rarity, boolean bBreedable) {
+ protected BioCulture(Color color, String name, int ID, BioPlasmid plasmid, BioDNA dDNA, EnumRarity rarity,
+ boolean bBreedable) {
super(name, ID, rarity);
this.color = color;
this.plasmid = plasmid;
@@ -69,17 +65,23 @@ public class BioCulture extends BioData implements IColorModulationContainer {
this.dDNA = dDNA;
}
- 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) {
BioCulture ret = new BioCulture(color, name, BIO_CULTURE_ARRAY_LIST.size(), plasmid, dna, rarity, breedable);
BIO_CULTURE_ARRAY_LIST.add(ret);
return ret;
}
- public static BioCulture createAndRegisterBioCulture(
- Color color, String name, BioPlasmid plasmid, BioDNA dna, boolean breedable) {
- BioCulture ret =
- new BioCulture(color, name, BIO_CULTURE_ARRAY_LIST.size(), plasmid, dna, dna.getRarity(), breedable);
+ public static BioCulture createAndRegisterBioCulture(Color color, String name, BioPlasmid plasmid, BioDNA dna,
+ boolean breedable) {
+ BioCulture ret = new BioCulture(
+ color,
+ name,
+ BIO_CULTURE_ARRAY_LIST.size(),
+ plasmid,
+ dna,
+ dna.getRarity(),
+ breedable);
BIO_CULTURE_ARRAY_LIST.add(ret);
return ret;
}
@@ -91,7 +93,7 @@ public class BioCulture extends BioData implements IColorModulationContainer {
// ret.setInteger("ID", bioCulture.ID);
ret.setIntArray(
"Color",
- new int[] {bioCulture.color.getRed(), bioCulture.color.getGreen(), bioCulture.color.getBlue()});
+ new int[] { bioCulture.color.getRed(), bioCulture.color.getGreen(), bioCulture.color.getBlue() });
ret.setTag("Plasmid", BioData.getNBTTagFromBioData(BioData.convertBioPlasmidToBioData(bioCulture.plasmid)));
ret.setTag("DNA", BioData.getNBTTagFromBioData(BioData.convertBioDNAToBioData(bioCulture.dDNA)));
ret.setBoolean("Breedable", bioCulture.bBreedable);
@@ -104,17 +106,16 @@ public class BioCulture extends BioData implements IColorModulationContainer {
if (tag == null || tag.getIntArray("Color").length == 0) return null;
BioCulture ret = getBioCulture(tag.getString("Name"));
- if (ret == null)
- ret = createAndRegisterBioCulture(
- new Color(tag.getIntArray("Color")[0], tag.getIntArray("Color")[1], tag.getIntArray("Color")[2]),
- tag.getString("Name"),
- BioPlasmid.convertDataToPlasmid(getBioDataFromNBTTag(tag.getCompoundTag("Plasmid"))),
- BioDNA.convertDataToDNA(getBioDataFromNBTTag(tag.getCompoundTag("DNA"))),
- BW_Util.getRarityFromByte(tag.getByte("Rarety")),
- tag.getBoolean("Breedable"));
+ if (ret == null) ret = createAndRegisterBioCulture(
+ new Color(tag.getIntArray("Color")[0], tag.getIntArray("Color")[1], tag.getIntArray("Color")[2]),
+ tag.getString("Name"),
+ BioPlasmid.convertDataToPlasmid(getBioDataFromNBTTag(tag.getCompoundTag("Plasmid"))),
+ BioDNA.convertDataToDNA(getBioDataFromNBTTag(tag.getCompoundTag("DNA"))),
+ BW_Util.getRarityFromByte(tag.getByte("Rarety")),
+ tag.getBoolean("Breedable"));
if (ret.bBreedable) ret.setFluid(FluidRegistry.getFluid(tag.getString("Fluid")));
if (ret.getFluidNotSet()) // should never happen, but better safe than sorry
- ret.setbBreedable(false);
+ ret.setbBreedable(false);
return ret;
}
@@ -152,8 +153,8 @@ public class BioCulture extends BioData implements IColorModulationContainer {
}
public int getColorRGB() {
- return BW_ColorUtil.getColorFromRGBArray(
- new int[] {this.color.getRed(), this.color.getGreen(), this.color.getBlue()});
+ return BW_ColorUtil
+ .getColorFromRGBArray(new int[] { this.color.getRed(), this.color.getGreen(), this.color.getBlue() });
}
public Color getColor() {
@@ -164,12 +165,12 @@ public class BioCulture extends BioData implements IColorModulationContainer {
this.color = color;
}
- // public static BioCulture createAndRegisterBioCulture(Color color, String name, long ID, BioPlasmid plasmid,
+ // public static BioCulture createAndRegisterBioCulture(Color color, String name, long ID, BioPlasmid plasmid,
// BioDNA dDNA,EnumRarity rarity){
- // BioCulture ret =new BioCulture(color,name,ID,plasmid,dDNA,rarity);
- // BIO_CULTURE_ARRAY_LIST.add(ret);
- // return ret;
- // }
+ // BioCulture ret =new BioCulture(color,name,ID,plasmid,dDNA,rarity);
+ // BIO_CULTURE_ARRAY_LIST.add(ret);
+ // return ret;
+ // }
public BioPlasmid getPlasmid() {
return this.plasmid;
@@ -212,8 +213,7 @@ public class BioCulture extends BioData implements IColorModulationContainer {
if (o == null || this.getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
BioCulture culture = (BioCulture) o;
- return this.isBreedable() == culture.isBreedable()
- && Objects.equals(this.getColor(), culture.getColor())
+ return this.isBreedable() == culture.isBreedable() && Objects.equals(this.getColor(), culture.getColor())
&& Objects.equals(this.getPlasmid(), culture.getPlasmid())
&& Objects.equals(this.getdDNA(), culture.getdDNA())
&& Objects.equals(this.mFluid, culture.mFluid);
@@ -223,13 +223,9 @@ public class BioCulture extends BioData implements IColorModulationContainer {
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
ByteBuffer.allocate(17)
- .putInt(MurmurHash3.murmurhash3_x86_32(
- this.getName(), 0, this.getName().length(), 31))
- .putInt(this.getColorRGB())
- .putInt(this.getPlasmid().ID)
- .putInt(this.getdDNA().ID)
- .put((byte) (isBreedable() ? 1 : 0))
- .array(),
+ .putInt(MurmurHash3.murmurhash3_x86_32(this.getName(), 0, this.getName().length(), 31))
+ .putInt(this.getColorRGB()).putInt(this.getPlasmid().ID).putInt(this.getdDNA().ID)
+ .put((byte) (isBreedable() ? 1 : 0)).array(),
0,
17,
31);
@@ -237,11 +233,7 @@ public class BioCulture extends BioData implements IColorModulationContainer {
@Override
public short[] getRGBA() {
- return new short[] {
- (short) getColor().getRed(),
- (short) getColor().getGreen(),
- (short) getColor().getBlue(),
- (short) getColor().getAlpha()
- };
+ return new short[] { (short) getColor().getRed(), (short) getColor().getGreen(), (short) getColor().getBlue(),
+ (short) getColor().getAlpha() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java
index 91606cf6ff..c1c6431daf 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java
index 98b1f0ecea..854bc4afba 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
@@ -25,10 +16,12 @@ package com.github.bartimaeusnek.bartworks.util;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Objects;
+
import net.minecraft.item.EnumRarity;
import net.minecraft.nbt.NBTTagCompound;
public class BioData {
+
public static final ArrayList<BioData> BIO_DATA_ARRAY_LIST = new ArrayList<>();
protected String name;
@@ -107,8 +100,7 @@ public class BioData {
if (o == null || this.getClass() != o.getClass()) return false;
BioData bioData = (BioData) o;
return this.getID() == bioData.getID()
- || (this.getChance() == bioData.getChance()
- && this.getTier() == bioData.getTier()
+ || (this.getChance() == bioData.getChance() && this.getTier() == bioData.getTier()
&& Objects.equals(this.getName(), bioData.getName())
&& this.getRarity() == bioData.getRarity());
}
@@ -117,12 +109,9 @@ public class BioData {
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
ByteBuffer.allocate(13)
- .putInt(MurmurHash3.murmurhash3_x86_32(
- this.getName(), 0, this.getName().length(), 31))
- .put(BW_Util.getByteFromRarity(this.getRarity()))
- .putInt(this.getChance())
- .putInt(this.getTier())
- .array(),
+ .putInt(MurmurHash3.murmurhash3_x86_32(this.getName(), 0, this.getName().length(), 31))
+ .put(BW_Util.getByteFromRarity(this.getRarity())).putInt(this.getChance())
+ .putInt(this.getTier()).array(),
0,
13,
31);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java
index 8cdf435da6..47f94bb389 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java
index c1885b1272..93220205b7 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java
@@ -3,9 +3,11 @@ package com.github.bartimaeusnek.bartworks.util;
import java.lang.reflect.Field;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+
import org.apache.commons.lang3.reflect.FieldUtils;
public class CachedReflectionUtils {
+
private static final ClassValue<Map<String, Field>> fields = new ConcurrentMapClassValue();
private static final ClassValue<Map<String, Field>> declaredFields = new ConcurrentMapClassValue();
@@ -18,6 +20,7 @@ public class CachedReflectionUtils {
}
private static class ConcurrentMapClassValue extends ClassValue<Map<String, Field>> {
+
@Override
protected Map<String, Field> computeValue(Class<?> type) {
return new ConcurrentHashMap<>();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java
index 5c6993d2eb..f1d6eeedb3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java
index 988c9b1610..48aaf70b6b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java
@@ -1,34 +1,27 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import java.util.HashSet;
+
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
public class ConnectedBlocksChecker {
public final HashSet<Coords> hashset = new HashSet<>(2048);
@@ -157,17 +150,23 @@ public class ConnectedBlocksChecker {
}
} else {
if (n == w.getBlockMetadata(C.x, C.y + 1, C.z)
- && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y - 1, C.z)
- && !new Coords(C.x, C.y - 1, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y - 1, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x + 1, C.y, C.z)
- && !new Coords(C.x + 1, C.y, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x + 1, C.y, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x - 1, C.y, C.z)
- && !new Coords(C.x - 1, C.y, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x - 1, C.y, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y, C.z + 1)
- && !new Coords(C.x, C.y, C.z + 1, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y, C.z + 1, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y, C.z - 1)
- && !new Coords(C.x, C.y, C.z - 1, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y, C.z - 1, wID).equals(Controller))
+ return true;
}
}
return false;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java
index e794b21a0c..eb5dd0b17d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java
@@ -1,38 +1,31 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
+
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
/**
- * This implementation is for some reason slower than the Recursive Check....
- * For ~3400 blocks this takes 8ms, the Recursive Check 5ms.
+ * This implementation is for some reason slower than the Recursive Check.... For ~3400 blocks this takes 8ms, the
+ * Recursive Check 5ms.
*/
public class ConnectedBlocksCheckerIteration {
@@ -122,17 +115,23 @@ public class ConnectedBlocksCheckerIteration {
}
} else {
if (n == w.getBlockMetadata(C.x, C.y + 1, C.z)
- && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y - 1, C.z)
- && !new Coords(C.x, C.y - 1, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y - 1, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x + 1, C.y, C.z)
- && !new Coords(C.x + 1, C.y, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x + 1, C.y, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x - 1, C.y, C.z)
- && !new Coords(C.x - 1, C.y, C.z, wID).equals(Controller)) return true;
+ && !new Coords(C.x - 1, C.y, C.z, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y, C.z + 1)
- && !new Coords(C.x, C.y, C.z + 1, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y, C.z + 1, wID).equals(Controller))
+ return true;
if (n == w.getBlockMetadata(C.x, C.y, C.z - 1)
- && !new Coords(C.x, C.y, C.z - 1, wID).equals(Controller)) return true;
+ && !new Coords(C.x, C.y, C.z - 1, wID).equals(Controller))
+ return true;
}
}
return false;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java
index 403f4bbf3e..b1ece2651f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java
index f4198466f0..f96ffc8997 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java
@@ -1,95 +1,52 @@
/*
- * 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.util;
+import net.minecraftforge.common.util.EnumHelper;
+
import gregtech.api.enums.Element;
import gregtech.api.enums.OrePrefixes;
-import net.minecraftforge.common.util.EnumHelper;
public class EnumUtils {
+
private EnumUtils() {}
- public static OrePrefixes addNewOrePrefix(
- String enumName,
- String aRegularLocalName,
- String aLocalizedMaterialPre,
- String aLocalizedMaterialPost,
- boolean aIsUnificatable,
- boolean aIsMaterialBased,
- boolean aIsSelfReferencing,
- boolean aIsContainer,
- boolean aDontUnificateActively,
- boolean aIsUsedForBlocks,
- boolean aAllowNormalRecycling,
- boolean aGenerateDefaultItem,
- boolean aIsEnchantable,
- boolean aIsUsedForOreProcessing,
- int aMaterialGenerationBits,
- long aMaterialAmount,
- int aDefaultStackSize,
+ public static OrePrefixes addNewOrePrefix(String enumName, String aRegularLocalName, String aLocalizedMaterialPre,
+ String aLocalizedMaterialPost, boolean aIsUnificatable, boolean aIsMaterialBased,
+ boolean aIsSelfReferencing, boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks,
+ boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable,
+ boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount, int aDefaultStackSize,
int aTextureindex) {
return EnumHelper.addEnum(
OrePrefixes.class,
enumName,
- new Class<?>[] {
- String.class, String.class, String.class,
- boolean.class, boolean.class, boolean.class,
- boolean.class, boolean.class, boolean.class,
- boolean.class, boolean.class, boolean.class,
- boolean.class, int.class, long.class,
- int.class, int.class
- },
- new Object[] {
- aRegularLocalName, aLocalizedMaterialPre, aLocalizedMaterialPost,
- aIsUnificatable, aIsMaterialBased, aIsSelfReferencing,
- aIsContainer, aDontUnificateActively, aIsUsedForBlocks,
- aAllowNormalRecycling, aGenerateDefaultItem, aIsEnchantable,
- aIsUsedForOreProcessing, aMaterialGenerationBits, aMaterialAmount,
- aDefaultStackSize, aTextureindex
- });
+ new Class<?>[] { String.class, String.class, String.class, boolean.class, boolean.class, boolean.class,
+ boolean.class, boolean.class, boolean.class, boolean.class, boolean.class, boolean.class,
+ boolean.class, int.class, long.class, int.class, int.class },
+ new Object[] { aRegularLocalName, aLocalizedMaterialPre, aLocalizedMaterialPost, aIsUnificatable,
+ aIsMaterialBased, aIsSelfReferencing, aIsContainer, aDontUnificateActively, aIsUsedForBlocks,
+ aAllowNormalRecycling, aGenerateDefaultItem, aIsEnchantable, aIsUsedForOreProcessing,
+ aMaterialGenerationBits, aMaterialAmount, aDefaultStackSize, aTextureindex });
}
- public static Element createNewElement(
- String enumName,
- long aProtons,
- long aNeutrons,
- long aAdditionalMass,
- long aHalfLifeSeconds,
- String aDecayTo,
- String aName,
- boolean aIsIsotope) {
+ public static Element createNewElement(String enumName, long aProtons, long aNeutrons, long aAdditionalMass,
+ long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) {
return EnumHelper.addEnum(
Element.class,
enumName,
- new Class[] {
- long.class, long.class, long.class,
- long.class, String.class, String.class,
- boolean.class
- },
- new Object[] {
- aProtons, aNeutrons, aAdditionalMass,
- aHalfLifeSeconds, aDecayTo, aName,
- aIsIsotope
- });
+ new Class[] { long.class, long.class, long.class, long.class, String.class, String.class,
+ boolean.class },
+ new Object[] { aProtons, aNeutrons, aAdditionalMass, aHalfLifeSeconds, aDecayTo, aName, aIsIsotope });
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java
index 7a3fa2c3ee..b3cbc9351f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/MegaUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/MegaUtils.java
index 7b7a0d75f8..d5c8be8a28 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/MegaUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/MegaUtils.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java
index dec3a8eb42..30b7ff76a0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java
@@ -1,22 +1,13 @@
/*
- * The MurmurHash3 algorithm was created by Austin Appleby and placed in the public domain.
- * This java port was authored by Yonik Seeley and also placed into the public domain.
- * The author hereby disclaims copyright to this source code.
- * <p>
- * This produces exactly the same hash values as the final C++
- * version of MurmurHash3 and is thus suitable for producing the same hash values across
- * platforms.
- * <p>
- * The 32 bit x86 version of this hash should be the fastest variant for relatively short keys like ids.
- * murmurhash3_x64_128 is a good choice for longer strings or if you need more than 32 bits of hash.
- * <p>
- * Note - The x86 and x64 versions do _not_ produce the same results, as the
- * algorithms are optimized for their respective platforms.
- * <p>
- * See http://github.com/yonik/java_util for future updates to this file.
- *
- *
- * Special Thanks to Austin Appleby and Yonik Seeley for placing this in the public domain and therefore allowing me to use it!
+ * The MurmurHash3 algorithm was created by Austin Appleby and placed in the public domain. This java port was authored
+ * by Yonik Seeley and also placed into the public domain. The author hereby disclaims copyright to this source code.
+ * <p> This produces exactly the same hash values as the final C++ version of MurmurHash3 and is thus suitable for
+ * producing the same hash values across platforms. <p> The 32 bit x86 version of this hash should be the fastest
+ * variant for relatively short keys like ids. murmurhash3_x64_128 is a good choice for longer strings or if you need
+ * more than 32 bits of hash. <p> Note - The x86 and x64 versions do _not_ produce the same results, as the algorithms
+ * are optimized for their respective platforms. <p> See http://github.com/yonik/java_util for future updates to this
+ * file. Special Thanks to Austin Appleby and Yonik Seeley for placing this in the public domain and therefore allowing
+ * me to use it!
*/
package com.github.bartimaeusnek.bartworks.util;
@@ -67,8 +58,9 @@ public final class MurmurHash3 {
for (int i = offset; i < roundedEnd; i += 4) {
// little endian load order
- int k1 =
- (data[i] & 0xff) | ((data[i + 1] & 0xff) << 8) | ((data[i + 2] & 0xff) << 16) | (data[i + 3] << 24);
+ int k1 = (data[i] & 0xff) | ((data[i + 1] & 0xff) << 8)
+ | ((data[i + 2] & 0xff) << 16)
+ | (data[i + 3] << 24);
k1 *= c1;
k1 = (k1 << 15) | (k1 >>> 17); // ROTL32(k1,15);
k1 *= c2;
@@ -110,9 +102,8 @@ public final class MurmurHash3 {
}
/**
- * Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String without actually encoding
- * the string to a temporary buffer. This is more than 2x faster than hashing the result
- * of String.getBytes().
+ * Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String without actually encoding the string to a
+ * temporary buffer. This is more than 2x faster than hashing the result of String.getBytes().
*/
public static int murmurhash3_x86_32(CharSequence data, int offset, int len, int seed) {
@@ -136,26 +127,14 @@ public final class MurmurHash3 {
bits = 8;
/***
- * // optimized ascii implementation (currently slower!!! code size?)
- * if (shift == 24) {
- * k1 = k1 | (code << 24);
+ * // optimized ascii implementation (currently slower!!! code size?) if (shift == 24) { k1 = k1 | (code
+ * << 24);
*
- * k1 *= c1;
- * k1 = (k1 << 15) | (k1 >>> 17); // ROTL32(k1,15);
- * k1 *= c2;
+ * k1 *= c1; k1 = (k1 << 15) | (k1 >>> 17); // ROTL32(k1,15); k1 *= c2;
*
- * h1 ^= k1;
- * h1 = (h1 << 13) | (h1 >>> 19); // ROTL32(h1,13);
- * h1 = h1*5+0xe6546b64;
+ * h1 ^= k1; h1 = (h1 << 13) | (h1 >>> 19); // ROTL32(h1,13); h1 = h1*5+0xe6546b64;
*
- * shift = 0;
- * nBytes += 4;
- * k1 = 0;
- * } else {
- * k1 |= code << shift;
- * shift += 8;
- * }
- * continue;
+ * shift = 0; nBytes += 4; k1 = 0; } else { k1 |= code << shift; shift += 8; } continue;
***/
} else if (code < 0x800) {
k2 = (0xC0 | (code >> 6)) | ((0x80 | (code & 0x3F)) << 8);
@@ -169,8 +148,7 @@ public final class MurmurHash3 {
// int utf32 = pos < end ? (int) data.charAt(pos++) : 0;
int utf32 = (int) data.charAt(pos++);
utf32 = ((code - 0xD7C0) << 10) + (utf32 & 0x3FF);
- k2 = (0xff & (0xF0 | (utf32 >> 18)))
- | ((0x80 | ((utf32 >> 12) & 0x3F))) << 8
+ k2 = (0xff & (0xF0 | (utf32 >> 18))) | ((0x80 | ((utf32 >> 12) & 0x3F))) << 8
| ((0x80 | ((utf32 >> 6) & 0x3F))) << 16
| (0x80 | (utf32 & 0x3F)) << 24;
bits = 32;
@@ -178,8 +156,8 @@ public final class MurmurHash3 {
k1 |= k2 << shift;
- // int used_bits = 32 - shift; // how many bits of k2 were used in k1.
- // int unused_bits = bits - used_bits; // (bits-(32-shift)) == bits+shift-32 == bits-newshift
+ // int used_bits = 32 - shift; // how many bits of k2 were used in k1.
+ // int unused_bits = bits - used_bits; // (bits-(32-shift)) == bits+shift-32 == bits-newshift
shift += bits;
if (shift >= 32) {
@@ -325,6 +303,7 @@ public final class MurmurHash3 {
* 128 bits of state
*/
public static final class LongPair {
+
public long val1;
public long val2;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java
index e5f9c42bf7..3595203ced 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java
@@ -1,33 +1,26 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util.NoiseUtil;
+import java.util.Random;
+
import com.github.bartimaeusnek.bartworks.API.INoiseGen;
import com.github.bartimaeusnek.bartworks.util.MathUtils;
import gregtech.api.objects.XSTR;
-import java.util.Random;
public class BartsNoise implements INoiseGen {
+
public void setUsePhase(boolean usePhase) {
this.usePhase = usePhase;
}
@@ -44,6 +37,7 @@ public class BartsNoise implements INoiseGen {
Random random;
public enum NoiseColor {
+
Red(-1),
Pink(-0.5),
White(0),
@@ -94,56 +88,56 @@ public class BartsNoise implements INoiseGen {
public BartsNoise copy(long seed) {
return new BartsNoise(this.octaves, this.frequency, this.amplitude, seed);
}
- // public static void main(String[] args) throws IOException {
+ // public static void main(String[] args) throws IOException {
//
- // BartsNoise noiseGen1 = new BartsNoise(2,0.005F,1D,System.nanoTime());
- //// BartsNoise noiseGen2 = new BartsNoise(1,0.002F,-1D,System.nanoTime());
- //// BartsNoise noiseGen3 = new BartsNoise(1,0.002F,-1D,System.nanoTime());
+ // BartsNoise noiseGen1 = new BartsNoise(2,0.005F,1D,System.nanoTime());
+ //// BartsNoise noiseGen2 = new BartsNoise(1,0.002F,-1D,System.nanoTime());
+ //// BartsNoise noiseGen3 = new BartsNoise(1,0.002F,-1D,System.nanoTime());
//
- // noiseGen1.setUsePhase(false);
- //// noiseGen2.setUsePhase(false);
- //// noiseGen3.setUsePhase(false);
+ // noiseGen1.setUsePhase(false);
+ //// noiseGen2.setUsePhase(false);
+ //// noiseGen3.setUsePhase(false);
//
//
- // BufferedImage image = new BufferedImage(640, 640, BufferedImage.TYPE_INT_RGB);
+ // BufferedImage image = new BufferedImage(640, 640, BufferedImage.TYPE_INT_RGB);
//
- // for (int chunkX = 0; chunkX < 40; chunkX++) {
- // for (int chunkZ = 0; chunkZ < 40; chunkZ++) {
- // for (int x = 0; x < 16; ++x) {
- // for (int z = 0; z < 16; ++z) {
- // double d = noiseGen1.getNoise(x + chunkX * 16, z + chunkZ * 16) * 2D;
- //// double d2 = noiseGen2.getNoise(x + chunkX * 16, z + chunkZ * 16) * 2D;
- //// double d3 = (noiseGen3.getNoise(x + chunkX * 16, z + chunkZ * 16) - 0.5D);
- //// d3 *= 2;
- // double yDev;
- //// if (d3 < 0.0D) {
- //// yDev = d;
- //// } else if (d3 > 1.0D) {
- //// yDev = d2;
- //// } else {
- // yDev = d*4;
- //// }
- // yDev=wrap(yDev,1);
- // image.setRGB(x + chunkX * 16,z + chunkZ * 16,new
+ // for (int chunkX = 0; chunkX < 40; chunkX++) {
+ // for (int chunkZ = 0; chunkZ < 40; chunkZ++) {
+ // for (int x = 0; x < 16; ++x) {
+ // for (int z = 0; z < 16; ++z) {
+ // double d = noiseGen1.getNoise(x + chunkX * 16, z + chunkZ * 16) * 2D;
+ //// double d2 = noiseGen2.getNoise(x + chunkX * 16, z + chunkZ * 16) * 2D;
+ //// double d3 = (noiseGen3.getNoise(x + chunkX * 16, z + chunkZ * 16) - 0.5D);
+ //// d3 *= 2;
+ // double yDev;
+ //// if (d3 < 0.0D) {
+ //// yDev = d;
+ //// } else if (d3 > 1.0D) {
+ //// yDev = d2;
+ //// } else {
+ // yDev = d*4;
+ //// }
+ // yDev=wrap(yDev,1);
+ // image.setRGB(x + chunkX * 16,z + chunkZ * 16,new
// Color((float)(1f*yDev),(float)(1f*yDev),(float)(1f*yDev)).getRGB());
- // }
- // }
- // }
- // }
- // File file = new File("myimage.png");
- // ImageIO.write(image, "png", file);
- //// BartsNoise redNoise = NoiseColor.Blue.getColoredNoise();
- //// redNoise.setOctaves(1);
- //// redNoise.setFrequency(0.05F);
- //// for (int i = 40; i < 50; i++) {
- //// String line = "";
- //// for (int j = 0; j < 10; j++) {
- //// double num = (redNoise.getNoise(i,j)-0.5D);
- //// line += num+",";
- //// }
- //// System.out.println(line);
- //// }
- // }
+ // }
+ // }
+ // }
+ // }
+ // File file = new File("myimage.png");
+ // ImageIO.write(image, "png", file);
+ //// BartsNoise redNoise = NoiseColor.Blue.getColoredNoise();
+ //// redNoise.setOctaves(1);
+ //// redNoise.setFrequency(0.05F);
+ //// for (int i = 40; i < 50; i++) {
+ //// String line = "";
+ //// for (int j = 0; j < 10; j++) {
+ //// double num = (redNoise.getNoise(i,j)-0.5D);
+ //// line += num+",";
+ //// }
+ //// System.out.println(line);
+ //// }
+ // }
public double getCosNoise(double x, double y) {
double pr = x * this.frequency;
@@ -161,21 +155,19 @@ public class BartsNoise implements INoiseGen {
}
double getNonOctavedNoise(double x, double y) {
- double phase = SimplexNoise.noise(
- Math.pow(x * this.frequency, this.amplitude), Math.pow(y * this.frequency, this.amplitude));
+ double phase = SimplexNoise
+ .noise(Math.pow(x * this.frequency, this.amplitude), Math.pow(y * this.frequency, this.amplitude));
return MathUtils.wrap(phase, 1);
}
public double getNeighbouringNoise(int x, int y) {
- return (this.getNoiseSingle(x - 1, y - 1)
- + this.getNoiseSingle(x, y - 1)
- + this.getNoiseSingle(x - 1, y)
- + this.getNoiseSingle(x + 1, y)
- + this.getNoiseSingle(x, y + 1)
- + this.getNoiseSingle(x + 1, y + 1)
- + this.getNoiseSingle(x - 1, y + 1)
- + this.getNoiseSingle(x + 1, y - 1))
- / 8;
+ return (this.getNoiseSingle(x - 1, y - 1) + this.getNoiseSingle(x, y - 1)
+ + this.getNoiseSingle(x - 1, y)
+ + this.getNoiseSingle(x + 1, y)
+ + this.getNoiseSingle(x, y + 1)
+ + this.getNoiseSingle(x + 1, y + 1)
+ + this.getNoiseSingle(x - 1, y + 1)
+ + this.getNoiseSingle(x + 1, y - 1)) / 8;
}
public double getNoiseSingle(int x, int y) {
@@ -198,12 +190,12 @@ public class BartsNoise implements INoiseGen {
@Override
public double[][] getNoiseForRegion(int xStart, int zStart, int xEnd, int zEnd) {
- // double[][] results = new double[Math.abs(xEnd)-Math.abs(xStart)][Math.abs(zEnd)-Math.abs(zStart)];
- // for (int i = xStart; i < xEnd; i++) {
- // for (int j = zStart; j < zEnd; j++) {
- // results
- // }
- // }
+ // double[][] results = new double[Math.abs(xEnd)-Math.abs(xStart)][Math.abs(zEnd)-Math.abs(zStart)];
+ // for (int i = xStart; i < xEnd; i++) {
+ // for (int j = zStart; j < zEnd; j++) {
+ // results
+ // }
+ // }
return new double[0][0];
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java
index 427cf5919e..3d0edb9bc0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java
@@ -1,78 +1,42 @@
package com.github.bartimaeusnek.bartworks.util.NoiseUtil;
/*
- * A speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.
- *
- * Based on example code by Stefan Gustavson (stegu@itn.liu.se).
- * Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
- * Better rank ordering method by Stefan Gustavson in 2012.
- *
- * This could be speeded up even further, but it's useful as it is.
- *
- * Version 2012-03-09
- *
- * This code was placed in the public domain by its original author,
- * Stefan Gustavson. You may use it as you see fit, but
+ * A speed-improved simplex noise algorithm for 2D, 3D and 4D in Java. Based on example code by Stefan Gustavson
+ * (stegu@itn.liu.se). Optimisations by Peter Eastman (peastman@drizzle.stanford.edu). Better rank ordering method by
+ * Stefan Gustavson in 2012. This could be speeded up even further, but it's useful as it is. Version 2012-03-09 This
+ * code was placed in the public domain by its original author, Stefan Gustavson. You may use it as you see fit, but
* attribution is appreciated.
- *
*/
import com.github.bartimaeusnek.bartworks.util.MathUtils;
public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
- private static Grad[] grad3 = {
- new Grad(1, 1, 0), new Grad(-1, 1, 0), new Grad(1, -1, 0), new Grad(-1, -1, 0),
- new Grad(1, 0, 1), new Grad(-1, 0, 1), new Grad(1, 0, -1), new Grad(-1, 0, -1),
- new Grad(0, 1, 1), new Grad(0, -1, 1), new Grad(0, 1, -1), new Grad(0, -1, -1)
- };
- private static Grad[] grad4 = {
- new Grad(0, 1, 1, 1),
- new Grad(0, 1, 1, -1),
- new Grad(0, 1, -1, 1),
- new Grad(0, 1, -1, -1),
- new Grad(0, -1, 1, 1),
- new Grad(0, -1, 1, -1),
- new Grad(0, -1, -1, 1),
- new Grad(0, -1, -1, -1),
- new Grad(1, 0, 1, 1),
- new Grad(1, 0, 1, -1),
- new Grad(1, 0, -1, 1),
- new Grad(1, 0, -1, -1),
- new Grad(-1, 0, 1, 1),
- new Grad(-1, 0, 1, -1),
- new Grad(-1, 0, -1, 1),
- new Grad(-1, 0, -1, -1),
- new Grad(1, 1, 0, 1),
- new Grad(1, 1, 0, -1),
- new Grad(1, -1, 0, 1),
- new Grad(1, -1, 0, -1),
- new Grad(-1, 1, 0, 1),
- new Grad(-1, 1, 0, -1),
- new Grad(-1, -1, 0, 1),
- new Grad(-1, -1, 0, -1),
- new Grad(1, 1, 1, 0),
- new Grad(1, 1, -1, 0),
- new Grad(1, -1, 1, 0),
- new Grad(1, -1, -1, 0),
- new Grad(-1, 1, 1, 0),
- new Grad(-1, 1, -1, 0),
- new Grad(-1, -1, 1, 0),
- new Grad(-1, -1, -1, 0)
- };
+ private static Grad[] grad3 = { new Grad(1, 1, 0), new Grad(-1, 1, 0), new Grad(1, -1, 0), new Grad(-1, -1, 0),
+ new Grad(1, 0, 1), new Grad(-1, 0, 1), new Grad(1, 0, -1), new Grad(-1, 0, -1), new Grad(0, 1, 1),
+ new Grad(0, -1, 1), new Grad(0, 1, -1), new Grad(0, -1, -1) };
- private static short[] p = {
- 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37,
- 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177,
- 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146,
- 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25,
- 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100,
- 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206,
- 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153,
- 101, 155, 167, 43, 172, 9, 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246,
- 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192,
- 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114,
- 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180
- };
+ private static Grad[] grad4 = { new Grad(0, 1, 1, 1), new Grad(0, 1, 1, -1), new Grad(0, 1, -1, 1),
+ new Grad(0, 1, -1, -1), new Grad(0, -1, 1, 1), new Grad(0, -1, 1, -1), new Grad(0, -1, -1, 1),
+ new Grad(0, -1, -1, -1), new Grad(1, 0, 1, 1), new Grad(1, 0, 1, -1), new Grad(1, 0, -1, 1),
+ new Grad(1, 0, -1, -1), new Grad(-1, 0, 1, 1), new Grad(-1, 0, 1, -1), new Grad(-1, 0, -1, 1),
+ new Grad(-1, 0, -1, -1), new Grad(1, 1, 0, 1), new Grad(1, 1, 0, -1), new Grad(1, -1, 0, 1),
+ new Grad(1, -1, 0, -1), new Grad(-1, 1, 0, 1), new Grad(-1, 1, 0, -1), new Grad(-1, -1, 0, 1),
+ new Grad(-1, -1, 0, -1), new Grad(1, 1, 1, 0), new Grad(1, 1, -1, 0), new Grad(1, -1, 1, 0),
+ new Grad(1, -1, -1, 0), new Grad(-1, 1, 1, 0), new Grad(-1, 1, -1, 0), new Grad(-1, -1, 1, 0),
+ new Grad(-1, -1, -1, 0) };
+
+ private static short[] p = { 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103,
+ 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203,
+ 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134,
+ 139, 48, 27, 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245,
+ 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135,
+ 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147,
+ 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170, 213, 119,
+ 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9, 129, 22, 39, 253, 19, 98, 108, 110, 79,
+ 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162,
+ 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121,
+ 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61,
+ 156, 180 };
// To remove the need for index wrapping, double the permutation table length
private static short[] perm = new short[512];
private static short[] permMod12 = new short[512];
@@ -132,9 +96,9 @@ public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
i1 = 0;
j1 = 1;
} // upper triangle, YX order: (0,0)->(0,1)->(1,1)
- // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and
- // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where
- // c = (3-sqrt(3))/6
+ // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and
+ // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where
+ // c = (3-sqrt(3))/6
double x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords
double y1 = y0 - j1 + G2;
double x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords
@@ -417,6 +381,7 @@ public class SimplexNoise { // Simplex noise in 2D, 3D and 4D
// Inner class to speed upp gradient computations
// (array access is a lot slower than member access)
private static class Grad {
+
double x, y, z, w;
Grad(double x, double y, double z) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java
index 2ccc22d1dd..7d33e56286 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
@@ -57,7 +48,7 @@ public class NonNullWrappedHashMap<K, V> extends HashMap<K, V> {
@Override
public V getOrDefault(Object key, V defaultValue) {
- return Objects.requireNonNull(
- Optional.ofNullable(super.getOrDefault(key, defaultValue)).orElse(this.defaultValue));
+ return Objects
+ .requireNonNull(Optional.ofNullable(super.getOrDefault(key, defaultValue)).orElse(this.defaultValue));
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java
index cb677be388..1a96a3fd7b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java
@@ -1,23 +1,14 @@
/*
- * 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.util;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java
index 0ebb5a4c37..8f34837f9a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util;
@@ -28,6 +19,7 @@ import java.util.Map;
@SuppressWarnings("unchecked")
public class Pair<A, B> implements Map.Entry<A, B> {
+
Object[] pair = new Object[2];
public Pair(Object[] pair) {
@@ -53,10 +45,7 @@ public class Pair<A, B> implements Map.Entry<A, B> {
@Override
public int hashCode() {
return MurmurHash3.murmurhash3_x86_32(
- ByteBuffer.allocate(8)
- .putInt(pair[0].hashCode())
- .putInt(pair[1].hashCode())
- .array(),
+ ByteBuffer.allocate(8).putInt(pair[0].hashCode()).putInt(pair[1].hashCode()).array(),
0,
8,
31);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java
index daa9994053..9f3df5d175 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java
@@ -1,14 +1,16 @@
package com.github.bartimaeusnek.bartworks.util;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
/**
* Handle the parallel more efficient.
*
@@ -17,18 +19,17 @@ import net.minecraftforge.fluids.FluidStack;
public class RecipeFinderForParallel {
/**
- * This method is used for mega multis which have extremely high parallel.
- * Never use it for non parallel machines, it will have worse performance.
- * It will auto consume the inputs.
+ * This method is used for mega multis which have extremely high parallel. Never use it for non parallel machines,
+ * it will have worse performance. It will auto consume the inputs.
*
- * @param aRecipe The target recipe that you want calculate the parallel
- * @param aFluidInputs The input fluid from machine
- * @param aItemStacks The input item from machine
- * @param aMaxParallel The max parallel that it can reach
- * @return The parallel that it can reach
+ * @param aRecipe The target recipe that you want calculate the parallel
+ * @param aFluidInputs The input fluid from machine
+ * @param aItemStacks The input item from machine
+ * @param aMaxParallel The max parallel that it can reach
+ * @return The parallel that it can reach
*/
- public static int handleParallelRecipe(
- GT_Recipe aRecipe, FluidStack[] aFluidInputs, ItemStack[] aItemStacks, int aMaxParallel) {
+ public static int handleParallelRecipe(GT_Recipe aRecipe, FluidStack[] aFluidInputs, ItemStack[] aItemStacks,
+ int aMaxParallel) {
if (aFluidInputs == null) aFluidInputs = new FluidStack[0];
if (aItemStacks == null) aItemStacks = new ItemStack[0];
HashMap<Integer, Integer> tCompressedFluidInput = compressFluid(aFluidInputs);
@@ -38,12 +39,12 @@ public class RecipeFinderForParallel {
int tCurrentPara = aMaxParallel;
for (int tFluid : tCompressedFluidRecipe.keySet()) {
if (tCompressedFluidInput.containsKey(tFluid) && tCompressedFluidRecipe.get(tFluid) != 0) {
- tCurrentPara =
- Math.min(tCurrentPara, tCompressedFluidInput.get(tFluid) / tCompressedFluidRecipe.get(tFluid));
+ tCurrentPara = Math
+ .min(tCurrentPara, tCompressedFluidInput.get(tFluid) / tCompressedFluidRecipe.get(tFluid));
}
}
for (int tItem : tCompressedItemRecipe.keySet()) {
- /*Wildcard Stuff*/
+ /* Wildcard Stuff */
if (tItem >> 16 == Short.MAX_VALUE) {
int tCountWildcard = 0;
for (int tInputItem : tCompressedItemInput.keySet()) {
@@ -53,7 +54,7 @@ public class RecipeFinderForParallel {
}
tCurrentPara = Math.min(tCurrentPara, tCountWildcard / tCompressedItemRecipe.get(tItem));
} else if (tCompressedItemRecipe.get(tItem) != 0) {
- /*OreDict Stuff*/
+ /* OreDict Stuff */
int tCountOre = 0;
ItemStack tRealRecipe = GT_Utility.intToStack(tItem);
for (int tInputItem : tCompressedItemInput.keySet()) {
@@ -81,16 +82,16 @@ public class RecipeFinderForParallel {
tFluid.amount -= tCompressedFluidRecipe.get(tFluid.getFluidID());
tCompressedFluidRecipe.remove(tFluid.getFluidID());
} else {
- tCompressedFluidRecipe.put(
- tFluid.getFluidID(), tCompressedFluidRecipe.get(tFluid.getFluidID()) - tFluid.amount);
+ tCompressedFluidRecipe
+ .put(tFluid.getFluidID(), tCompressedFluidRecipe.get(tFluid.getFluidID()) - tFluid.amount);
tFluid.amount = 0;
}
}
}
- /*OreDict Stuff*/
- /*Wildcard Stuff*/
- for (Iterator<Integer> i = tCompressedItemRecipe.keySet().iterator(); i.hasNext(); ) {
+ /* OreDict Stuff */
+ /* Wildcard Stuff */
+ for (Iterator<Integer> i = tCompressedItemRecipe.keySet().iterator(); i.hasNext();) {
int tItem = i.next();
if (tItem >> 16 == Short.MAX_VALUE) {
for (ItemStack tInputItem : aItemStacks) {
@@ -130,9 +131,9 @@ public class RecipeFinderForParallel {
/**
* Get the proper packed output stacks
*
- * @param aRecipe The target recipe
- * @param aPall The parallel it has
- * @return A pair of the output fluid and item stack, the first value is fluid, the second is item.
+ * @param aRecipe The target recipe
+ * @param aPall The parallel it has
+ * @return A pair of the output fluid and item stack, the first value is fluid, the second is item.
*/
public static Pair<ArrayList<FluidStack>, ArrayList<ItemStack>> getMultiOutput(GT_Recipe aRecipe, int aPall) {
ArrayList<FluidStack> tFluidList = new ArrayList<>();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java
index b1d1bac0d1..c56eac94dd 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java
@@ -1,32 +1,25 @@
/*
- * 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.util;
-import gregtech.api.util.GT_Recipe;
import java.util.Optional;
import java.util.function.Predicate;
+import gregtech.api.util.GT_Recipe;
+
public class StreamUtils {
+
private StreamUtils() {}
public static Predicate<GT_Recipe.GT_Recipe_Map> filterVisualMaps() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java
index 22e2a4e719..5afd78e1b6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java
@@ -1,28 +1,20 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util.accessprioritylist;
import java.util.*;
+
import org.apache.commons.lang3.NotImplementedException;
@SuppressWarnings("ALL")
@@ -266,10 +258,10 @@ public class AccessPriorityList<E> implements List<E>, Deque<E>, Set<E> {
@Override
public boolean remove(Object o) {
- // Object p;
- // for (Iterator it = this.iterator(); it.hasNext(); o.equals(p)){
- // p = it.next();
- // }
+ // Object p;
+ // for (Iterator it = this.iterator(); it.hasNext(); o.equals(p)){
+ // p = it.next();
+ // }
throw new NotImplementedException("");
}
@@ -325,8 +317,7 @@ public class AccessPriorityList<E> implements List<E>, Deque<E>, Set<E> {
if (current == Long.MAX_VALUE || (current > 0 && prio > 0 && prio + current < 0))
node.setPriority(Long.MAX_VALUE);
else node.setPriority(current + prio);
- while (node.getBefore() != null
- && node.getPriority() >= node.getBefore().getPriority()) {
+ while (node.getBefore() != null && node.getPriority() >= node.getBefore().getPriority()) {
moveNodeUp(node);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java
index 4e423b0654..dc826caa6d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java
@@ -1,42 +1,35 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util.accessprioritylist;
import java.util.Iterator;
import java.util.ListIterator;
+
import org.apache.commons.lang3.NotImplementedException;
public class AccessPriorityListIterators {
public static class AccessPriorityListListIterator<E> implements ListIterator<E> {
+
final AccessPriorityListNode<E> head;
final AccessPriorityListNode<E> tail;
AccessPriorityListNode<E> current;
int counter = 0;
boolean reverse;
- public AccessPriorityListListIterator(
- AccessPriorityListNode<E> head, AccessPriorityListNode<E> tail, boolean reverse) {
+ public AccessPriorityListListIterator(AccessPriorityListNode<E> head, AccessPriorityListNode<E> tail,
+ boolean reverse) {
this.head = head;
this.tail = tail;
current = reverse ? tail : head;
@@ -103,6 +96,7 @@ public class AccessPriorityListIterators {
}
public static class AccessPriorityListIterator<E> implements Iterator<E> {
+
final AccessPriorityListNode<E> head;
AccessPriorityListNode<E> current;
@@ -124,6 +118,7 @@ public class AccessPriorityListIterators {
}
public static class AccessPriorityListReverseIterator<E> implements Iterator<E> {
+
final AccessPriorityListNode<E> tail;
AccessPriorityListNode<E> current;
@@ -145,6 +140,7 @@ public class AccessPriorityListIterators {
}
public static class AccessPriorityListNodeIterator<E> implements Iterator<AccessPriorityListNode<E>> {
+
final AccessPriorityListNode<E> head;
AccessPriorityListNode<E> current;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java
index 1abeeb6e45..94bf309ef9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java
@@ -1,23 +1,14 @@
/*
- * Copyright (c) 2018-2019 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-2019 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.util.accessprioritylist;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java
index 5fd9dac817..d331b95e16 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java
@@ -1,23 +1,14 @@
/*
- * 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.util.flowerset;
@@ -109,6 +100,7 @@ public class FlowerSet<T> implements Set<T> {
public void clear() {}
static class FlowerNode<V> {
+
private final FlowerSet<V> map;
final V value;
final FlowerNode[] links;
@@ -142,6 +134,7 @@ public class FlowerSet<T> implements Set<T> {
}
static class Functions {
+
public static Function<FlowerNode, Integer> HashBasedFunction() {
return function -> function.hashCode() % function.map.petals;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java
index a52491c353..c54138f1ae 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java
@@ -1,28 +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.util.log;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
@@ -33,7 +23,10 @@ import java.util.logging.Formatter;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+
public class DebugLog {
+
private static boolean init;
static FileHandler fh;
private static Logger utilLog;
@@ -47,14 +40,14 @@ public class DebugLog {
DebugLog.utilLog.setUseParentHandlers(false);
DebugLog.utilLog.addHandler(DebugLog.fh);
Formatter formatter = new Formatter() {
+
@Override
public String format(LogRecord record) {
SimpleDateFormat logTime = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(record.getMillis());
- return "Level: " + record.getLevel()
- + " at " + logTime.format(cal.getTime())
- + " " + record.getMessage() + "\n";
+ return "Level: " + record
+ .getLevel() + " at " + logTime.format(cal.getTime()) + " " + record.getMessage() + "\n";
}
};
DebugLog.fh.setFormatter(formatter);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java
index 0e846834ca..69f9b8fb64 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java
@@ -1,23 +1,14 @@
/*
- * 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.
*/
@API(owner = "bartworks", apiVersion = API_REFERENCE.VERSION, provides = "bartworks util")
package com.github.bartimaeusnek.bartworks.util;
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
index a37db6b509..315d8a4592 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
@@ -1,50 +1,44 @@
/*
- * 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.crossmod;
+import java.io.StringReader;
+
+import net.minecraft.util.StringTranslate;
+
+import org.apache.commons.io.input.ReaderInputStream;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.crossmod.GTpp.loader.RadioHatchCompat;
import com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy;
import com.github.bartimaeusnek.crossmod.tectech.TecTechResearchLoader;
import com.github.bartimaeusnek.crossmod.thaumcraft.CustomAspects;
+
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
-import java.io.StringReader;
-import net.minecraft.util.StringTranslate;
-import org.apache.commons.io.input.ReaderInputStream;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
@Mod(
modid = BartWorksCrossmod.MOD_ID,
name = BartWorksCrossmod.NAME,
version = BartWorksCrossmod.VERSION,
- dependencies = "required-after:IC2; "
- + "required-after:gregtech; "
+ dependencies = "required-after:IC2; " + "required-after:gregtech; "
+ "required-after:bartworks;"
+ "after:GalacticraftMars; "
+ "after:GalacticraftCore; "
@@ -53,6 +47,7 @@ import org.apache.logging.log4j.Logger;
+ "after:EMT; "
+ "after:tectech; ")
public class BartWorksCrossmod {
+
public static final String NAME = "BartWorks Mod Additions";
public static final String VERSION = MainMod.VERSION;
public static final String MOD_ID = "bartworkscrossmod";
@@ -63,8 +58,8 @@ public class BartWorksCrossmod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent preinit) {
- // if (LoaderReference.appliedenergistics2)
- // new ItemSingleItemStorageCell("singleItemStorageCell");
+ // if (LoaderReference.appliedenergistics2)
+ // new ItemSingleItemStorageCell("singleItemStorageCell");
if (LoaderReference.GalacticraftCore) GalacticraftProxy.preInit(preinit);
if (LoaderReference.Thaumcraft) new CustomAspects();
}
@@ -81,29 +76,28 @@ public class BartWorksCrossmod {
if (LoaderReference.tectech) TecTechResearchLoader.runResearches();
}
- // @Mod.EventHandler
- // public void onFMLMissingMappingsEvent(FMLMissingMappingsEvent event){
- // for (FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()){
- // if (mapping.name.equalsIgnoreCase())
- // }
- // }
+ // @Mod.EventHandler
+ // public void onFMLMissingMappingsEvent(FMLMissingMappingsEvent event){
+ // for (FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()){
+ // if (mapping.name.equalsIgnoreCase())
+ // }
+ // }
- // @Mod.EventHandler
- // public void onServerStarted(FMLServerStartedEvent event) {
- // if (LoaderReference.EMT){
- // try {
- // TCRecipeHandler.init();
- // } catch (IllegalAccessException | InvocationTargetException e) {
- // e.printStackTrace();
- // }
- // }
- // }
+ // @Mod.EventHandler
+ // public void onServerStarted(FMLServerStartedEvent event) {
+ // if (LoaderReference.EMT){
+ // try {
+ // TCRecipeHandler.init();
+ // } catch (IllegalAccessException | InvocationTargetException e) {
+ // e.printStackTrace();
+ // }
+ // }
+ // }
@Mod.EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
- if (LoaderReference.miscutils)
- for (Object s : RadioHatchCompat.TranslateSet) {
- StringTranslate.inject(new ReaderInputStream(new StringReader((String) s)));
- }
+ if (LoaderReference.miscutils) for (Object s : RadioHatchCompat.TranslateSet) {
+ StringTranslate.inject(new ReaderInputStream(new StringReader((String) s)));
+ }
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java b/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java
index 14ebcb50cc..e40834da12 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java
@@ -1,44 +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.crossmod.GTpp.loader;
-import com.github.bartimaeusnek.bartworks.API.IRadMaterial;
-import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
-import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.ModContainer;
-import cpw.mods.fml.common.registry.GameData;
-import cpw.mods.fml.common.registry.GameRegistry;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
+
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.RegistryNamespaced;
import net.minecraftforge.oredict.OreDictionary;
-@SuppressWarnings({"unchecked", "rawtypes", "unused"})
+import com.github.bartimaeusnek.bartworks.API.IRadMaterial;
+import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
+import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.ModContainer;
+import cpw.mods.fml.common.registry.GameData;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+@SuppressWarnings({ "unchecked", "rawtypes", "unused" })
public class RadioHatchCompat {
private static Class intf;
@@ -114,8 +108,8 @@ public class RadioHatchCompat {
map.setAccessible(true);
Map<Item, String> UniqueIdentifierMap = (Map<Item, String>) map.get(GameData.getItemRegistry());
- Map<GameRegistry.UniqueIdentifier, ModContainer> ownerItems =
- (Map<GameRegistry.UniqueIdentifier, ModContainer>) cOwners.get(null);
+ Map<GameRegistry.UniqueIdentifier, ModContainer> ownerItems = (Map<GameRegistry.UniqueIdentifier, ModContainer>) cOwners
+ .get(null);
ModContainer gtpp = null;
ModContainer bartworks = null;
@@ -125,26 +119,24 @@ public class RadioHatchCompat {
else if (container.getModId().equalsIgnoreCase("miscutils")) gtpp = container;
}
- for (Object mats : (Set)
- RadioHatchCompat.materialClass.getField("mMaterialMap").get(null)) {
+ for (Object mats : (Set) RadioHatchCompat.materialClass.getField("mMaterialMap").get(null)) {
if (RadioHatchCompat.isRadioactive.getBoolean(mats)) {
- if (OreDictionary.getOres("stick" + RadioHatchCompat.unlocalizedName.get(mats))
- .isEmpty()) {
+ if (OreDictionary.getOres("stick" + RadioHatchCompat.unlocalizedName.get(mats)).isEmpty()) {
Item it = c1.newInstance(mats);
UniqueIdentifierMap.replace(it, "miscutils:" + it.getUnlocalizedName());
GameRegistry.UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor(it);
ownerItems.replace(ui, bartworks, gtpp);
- String tanslate =
- it.getUnlocalizedName() + ".name=" + RadioHatchCompat.localizedName.get(mats) + " Rod";
+ String tanslate = it.getUnlocalizedName() + ".name="
+ + RadioHatchCompat.localizedName.get(mats)
+ + " Rod";
RadioHatchCompat.TranslateSet.add(tanslate);
DebugLog.log(tanslate);
DebugLog.log("Generate: " + RadioHatchCompat.rod + RadioHatchCompat.unlocalizedName.get(mats));
}
- if (OreDictionary.getOres("stickLong" + RadioHatchCompat.unlocalizedName.get(mats))
- .isEmpty()) {
+ if (OreDictionary.getOres("stickLong" + RadioHatchCompat.unlocalizedName.get(mats)).isEmpty()) {
Item it2 = c2.newInstance(mats);
UniqueIdentifierMap.replace(it2, "miscutils:" + it2.getUnlocalizedName());
GameRegistry.UniqueIdentifier ui2 = GameRegistry.findUniqueIdentifierFor(it2);
@@ -155,12 +147,8 @@ public class RadioHatchCompat {
}
}
}
- } catch (NoSuchFieldException
- | IllegalAccessException
- | NoSuchMethodException
- | InvocationTargetException
- | InstantiationException
- | ClassNotFoundException e) {
+ } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException
+ | InstantiationException | ClassNotFoundException e) {
e.printStackTrace();
}
}
@@ -169,10 +157,7 @@ public class RadioHatchCompat {
try {
if (RadioHatchCompat.intf.isAssignableFrom(lStack.getItem().getClass())) {
if (!RadioHatchCompat.isRadioactive.getBoolean(RadioHatchCompat.f.get(lStack.getItem()))) return null;
- int amount = RadioHatchCompat.componentType
- .get(lStack.getItem())
- .equals(RadioHatchCompat.rod)
- ? 1
+ int amount = RadioHatchCompat.componentType.get(lStack.getItem()).equals(RadioHatchCompat.rod) ? 1
: RadioHatchCompat.componentType.get(lStack.getItem()).equals(RadioHatchCompat.longRod) ? 2 : 0;
if (amount == 0) return null;
return new RadioHatchCompat.GTPPRadAdapter(amount, RadioHatchCompat.f.get(lStack.getItem()));
@@ -205,8 +190,7 @@ public class RadioHatchCompat {
}
private static boolean isElement(Object GTPPMaterial) throws IllegalAccessException {
- return RadioHatchCompat.GTPPRadAdapter.getMaterialInput(GTPPMaterial)
- .isEmpty();
+ return RadioHatchCompat.GTPPRadAdapter.getMaterialInput(GTPPMaterial).isEmpty();
}
private static List getElemets(Object GTPPMaterial) throws IllegalAccessException {
@@ -229,12 +213,10 @@ public class RadioHatchCompat {
int ret = 0;
try {
List pureElements = RadioHatchCompat.GTPPRadAdapter.getElemets(m);
- for (Object materialObj : pureElements)
- if (RadioHatchCompat.isRadioactive.getBoolean(materialObj))
- ret += ((int) RadioHatchCompat.radlevel.getByte(m)
- + RadioHatchCompat.GTPPRadAdapter.clampToZero(
- RadioHatchCompat.protons.getLong(materialObj)));
- else ret += RadioHatchCompat.radlevel.getByte(m);
+ for (Object materialObj : pureElements) if (RadioHatchCompat.isRadioactive.getBoolean(materialObj))
+ ret += ((int) RadioHatchCompat.radlevel.getByte(m) + RadioHatchCompat.GTPPRadAdapter
+ .clampToZero(RadioHatchCompat.protons.getLong(materialObj)));
+ else ret += RadioHatchCompat.radlevel.getByte(m);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
@@ -243,8 +225,8 @@ public class RadioHatchCompat {
@Override
public int getRadiationLevel(ItemStack aStack) {
- return RadioHatchCompat.GTPPRadAdapter.BUFFER.computeIfAbsent(
- this.m, radlvl -> RadioHatchCompat.GTPPRadAdapter.calulateRad(this.m));
+ return RadioHatchCompat.GTPPRadAdapter.BUFFER
+ .computeIfAbsent(this.m, radlvl -> RadioHatchCompat.GTPPRadAdapter.calulateRad(this.m));
}
private static long clampToZero(long number) {
@@ -258,7 +240,7 @@ public class RadioHatchCompat {
@Override
public short[] getColorForGUI(ItemStack aStack) {
- short[] rgba = {0, 0, 0, 0};
+ short[] rgba = { 0, 0, 0, 0 };
try {
rgba = (short[]) RadioHatchCompat.RGBA.get(this.m);
} catch (IllegalAccessException e) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java b/src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java
index a9ac64b5fb..a55ca3cb31 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java
@@ -23,104 +23,104 @@
//
// public class ItemSingleItemStorageCell extends SimpleSubItemClass implements IStorageCell {
//
-// public ItemSingleItemStorageCell(String tex) {
-// super(tex);
-// Item thizz = this;
-// GameRegistry.registerItem(this, BartWorksCrossmod.MOD_ID+this.iconString);
-// }
-//
-// @Override
-// @SideOnly(Side.CLIENT)
-// public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List lines, boolean p_77624_4_) {
-// IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell().getCellInventory(stack,
+// public ItemSingleItemStorageCell(String tex) {
+// super(tex);
+// Item thizz = this;
+// GameRegistry.registerItem(this, BartWorksCrossmod.MOD_ID+this.iconString);
+// }
+//
+// @Override
+// @SideOnly(Side.CLIENT)
+// public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List lines, boolean p_77624_4_) {
+// IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell().getCellInventory(stack,
// (ISaveProvider)null, StorageChannel.ITEMS);
-// if (inventory instanceof ICellInventoryHandler) {
-// ICellInventoryHandler handler = (ICellInventoryHandler)inventory;
-// ICellInventory cellInventory = handler.getCellInv();
-// if (cellInventory != null) {
-// lines.add(cellInventory.getUsedBytes() + " " + GuiText.Of.getLocal() + ' ' +
+// if (inventory instanceof ICellInventoryHandler) {
+// ICellInventoryHandler handler = (ICellInventoryHandler)inventory;
+// ICellInventory cellInventory = handler.getCellInv();
+// if (cellInventory != null) {
+// lines.add(cellInventory.getUsedBytes() + " " + GuiText.Of.getLocal() + ' ' +
// cellInventory.getTotalBytes() + ' ' + GuiText.BytesUsed.getLocal());
-// lines.add(cellInventory.getStoredItemTypes() + " " + GuiText.Of.getLocal() + ' ' +
+// lines.add(cellInventory.getStoredItemTypes() + " " + GuiText.Of.getLocal() + ' ' +
// cellInventory.getTotalItemTypes() + ' ' + GuiText.Types.getLocal());
-// if (handler.isPreformatted()) {
-// String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included :
+// if (handler.isPreformatted()) {
+// String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included :
// GuiText.Excluded).getLocal();
-// if (handler.isFuzzy()) {
-// lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Fuzzy.getLocal());
-// } else {
-// lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Precise.getLocal());
-// }
-// }
-// }
-// }
-// }
-//
-// @Override
-// public int getBytes(ItemStack itemStack) {
-// return getTotalTypes(itemStack)*getBytesPerType(itemStack);
-// }
-//
-// @Override
-// public int BytePerType(ItemStack itemStack) {
-// return 1;
-// }
-//
-// @Override
-// public int getBytesPerType(ItemStack itemStack) {
-// return 1;
-// }
-//
-// @Override
-// public int getTotalTypes(ItemStack itemStack) {
-// return 4096;
-// }
-//
-// @Override
-// public boolean isBlackListed(ItemStack itemStack, IAEItemStack iaeItemStack) {
-// return iaeItemStack == null || iaeItemStack.getItem().getItemStackLimit() != 1;
-// }
-//
-// @Override
-// public boolean storableInStorageCell() {
-// return true;
-// }
-//
-// @Override
-// public boolean isStorageCell(ItemStack itemStack) {
-// return true;
-// }
-//
-// @Override
-// public double getIdleDrain() {
-// return 4D;
-// }
-//
-// @Override
-// public boolean isEditable(ItemStack itemStack) {
-// return true;
-// }
-//
-// @Override
-// public IInventory getUpgradesInventory(ItemStack itemStack) {
-// return new CellUpgrades(itemStack, 2);
-// }
-//
-// @Override
-// public IInventory getConfigInventory(ItemStack itemStack) {
-// return new CellUpgrades(itemStack,2);
-// }
-// @Override
-// public FuzzyMode getFuzzyMode(ItemStack is) {
-// String fz = Platform.openNbtData(is).getString("FuzzyMode");
-//
-// try {
-// return FuzzyMode.valueOf(fz);
-// } catch (Throwable var4) {
-// return FuzzyMode.IGNORE_ALL;
-// }
-// }
-// @Override
-// public void setFuzzyMode(ItemStack is, FuzzyMode fzMode) {
-// Platform.openNbtData(is).setString("FuzzyMode", fzMode.name());
-// }
+// if (handler.isFuzzy()) {
+// lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Fuzzy.getLocal());
+// } else {
+// lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Precise.getLocal());
+// }
+// }
+// }
+// }
+// }
+//
+// @Override
+// public int getBytes(ItemStack itemStack) {
+// return getTotalTypes(itemStack)*getBytesPerType(itemStack);
+// }
+//
+// @Override
+// public int BytePerType(ItemStack itemStack) {
+// return 1;
+// }
+//
+// @Override
+// public int getBytesPerType(ItemStack itemStack) {
+// return 1;
+// }
+//
+// @Override
+// public int getTotalTypes(ItemStack itemStack) {
+// return 4096;
+// }
+//
+// @Override
+// public boolean isBlackListed(ItemStack itemStack, IAEItemStack iaeItemStack) {
+// return iaeItemStack == null || iaeItemStack.getItem().getItemStackLimit() != 1;
+// }
+//
+// @Override
+// public boolean storableInStorageCell() {
+// return true;
+// }
+//
+// @Override
+// public boolean isStorageCell(ItemStack itemStack) {
+// return true;
+// }
+//
+// @Override
+// public double getIdleDrain() {
+// return 4D;
+// }
+//
+// @Override
+// public boolean isEditable(ItemStack itemStack) {
+// return true;
+// }
+//
+// @Override
+// public IInventory getUpgradesInventory(ItemStack itemStack) {
+// return new CellUpgrades(itemStack, 2);
+// }
+//
+// @Override
+// public IInventory getConfigInventory(ItemStack itemStack) {
+// return new CellUpgrades(itemStack,2);
+// }
+// @Override
+// public FuzzyMode getFuzzyMode(ItemStack is) {
+// String fz = Platform.openNbtData(is).getString("FuzzyMode");
+//
+// try {
+// return FuzzyMode.valueOf(fz);
+// } catch (Throwable var4) {
+// return FuzzyMode.IGNORE_ALL;
+// }
+// }
+// @Override
+// public void setFuzzyMode(ItemStack is, FuzzyMode fzMode) {
+// Platform.openNbtData(is).setString("FuzzyMode", fzMode.name());
+// }
// }
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java b/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java
index 134b541021..3d1a265b80 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.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.crossmod.cls;
-import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Optional;
-@SuppressWarnings({"rawtypes", "unchecked"})
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+
+@SuppressWarnings({ "rawtypes", "unchecked" })
public class CLSCompat {
+
private CLSCompat() {}
private static final long MINIMAL_UPDATE_INTERVAL = 1000 / 30; // target 30 fps
@@ -77,7 +70,7 @@ public class CLSCompat {
if (Werkstoff.werkstoffHashSet.size() >= 100) sizeStep = Werkstoff.werkstoffHashSet.size() / 100 - 1;
else sizeStep = sizeStep2 = Werkstoff.werkstoffHashSet.size();
- return new Integer[] {sizeStep, sizeStep2, sizeStep};
+ return new Integer[] { sizeStep, sizeStep2, sizeStep };
}
public static int invokeStepSize(Werkstoff werkstoff, Integer[] steps, int size) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
index fa3cf70882..124b41cd2f 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
@@ -1,33 +1,37 @@
/*
- * 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.crossmod.emt.recipe;
import static com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler.AspectAdder;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
import com.google.common.collect.ArrayListMultimap;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
@@ -35,19 +39,10 @@ import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
@SuppressWarnings("ALL")
public class TCRecipeHandler {
+
public static final GT_Recipe.GT_Recipe_Map alchemicalConstructHandler = new TCRecipeHandler.TCRecipeMap(
new HashSet<>(15000),
"bwcm.recipe.alchemicalConstruct",
@@ -140,18 +135,18 @@ public class TCRecipeHandler {
}
for (ItemStack o : itemToAspectsMap.keySet()) {
if (o.getItemDamage() == Short.MAX_VALUE) itemToCircuitConfigMap.put(o, 24);
- else
- for (int j = 1; j <= itemToAspectsMap.get(o).size(); j++) {
- itemToCircuitConfigMap.put(o, j % 24);
- }
+ else for (int j = 1; j <= itemToAspectsMap.get(o).size(); j++) {
+ itemToCircuitConfigMap.put(o, j % 24);
+ }
for (int j = 0; j < itemToAspectsMap.get(o).size(); j++) {
- ret.add(addRecipes(
- itemToResearchMap.get(o).get(j),
- itemToOutputMap.get(o).get(j),
- itemToAspectsMap.get(o).get(j),
- o,
- itemToCircuitConfigMap.get(o).get(j)));
+ ret.add(
+ addRecipes(
+ itemToResearchMap.get(o).get(j),
+ itemToOutputMap.get(o).get(j),
+ itemToAspectsMap.get(o).get(j),
+ o,
+ itemToCircuitConfigMap.get(o).get(j)));
}
}
@@ -170,8 +165,8 @@ public class TCRecipeHandler {
fake.setStackDisplayName(key);
GT_Recipe recipe = new BWRecipes.DynamicGTRecipe(
false,
- new ItemStack[] {cat, GT_Utility.getIntegratedCircuit(config)},
- new ItemStack[] {out},
+ new ItemStack[] { cat, GT_Utility.getIntegratedCircuit(config) },
+ new ItemStack[] { out },
fake,
null,
null,
@@ -183,21 +178,11 @@ public class TCRecipeHandler {
}
static class TCRecipeMap extends GT_Recipe.GT_Recipe_Map {
- public TCRecipeMap(
- Collection<GT_Recipe> aRecipeList,
- String aUnlocalizedName,
- String aLocalName,
- String aNEIName,
- String aNEIGUIPath,
- int aUsualInputCount,
- int aUsualOutputCount,
- int aMinimalInputItems,
- int aMinimalInputFluids,
- int aAmperage,
- String aNEISpecialValuePre,
- int aNEISpecialValueMultiplier,
- String aNEISpecialValuePost,
- boolean aShowVoltageAmperageInNEI,
+
+ public TCRecipeMap(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName,
+ String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount,
+ int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre,
+ int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI,
boolean aNEIAllowed) {
super(
aRecipeList,
@@ -218,14 +203,8 @@ public class TCRecipeHandler {
}
@Override
- public GT_Recipe findRecipe(
- IHasWorldObjectAndCoords aTileEntity,
- GT_Recipe aRecipe,
- boolean aNotUnificated,
- boolean aDontCheckStackSizes,
- long aVoltage,
- FluidStack[] aFluids,
- ItemStack aSpecialSlot,
+ public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated,
+ boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot,
ItemStack... aInputs) {
// No Recipes? Well, nothing to be found then.
if (mRecipeList.isEmpty()) return null;
@@ -246,86 +225,75 @@ public class TCRecipeHandler {
// Unification happens here in case the Input isn't already unificated.
if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs);
- // // Check the Recipe which has been used last time in order to not have to search for it again,
+ // // Check the Recipe which has been used last time in order to not have to search for it again,
// if possible.
- // if (aRecipe != null)
- // if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false,
+ // if (aRecipe != null)
+ // if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false,
// aDontCheckStackSizes, aFluids, aInputs)) {
- // NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
- // NBTTagCompound givenNBT = ((ItemStack)aRecipe.mSpecialItems).getTagCompound();
- // Object aAspectListToCheck = null;
- // Object aGivenAspectList = null;
- // try {
- // aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
- // aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
- // AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck,toCheckNBT);
- // AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList,givenNBT);
- // if
+ // NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
+ // NBTTagCompound givenNBT = ((ItemStack)aRecipe.mSpecialItems).getTagCompound();
+ // Object aAspectListToCheck = null;
+ // Object aGivenAspectList = null;
+ // try {
+ // aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
+ // aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
+ // AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck,toCheckNBT);
+ // AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList,givenNBT);
+ // if
// (!TCRecipeHandler.TCRecipeMap.containsAspects(aAspectListToCheck,aGivenAspectList))
- // return null;
- // } catch (InstantiationException | IllegalAccessException | InvocationTargetException
+ // return null;
+ // } catch (InstantiationException | IllegalAccessException | InvocationTargetException
// e) {
- // e.printStackTrace();
- // return null;
- // }
- // return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null;
- // }
+ // e.printStackTrace();
+ // return null;
+ // }
+ // return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null;
+ // }
// Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
- if (this.mUsualInputCount > 0 && aInputs != null)
- for (ItemStack tStack : aInputs)
- if (tStack != null) {
- Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes)
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
- NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
- NBTTagCompound givenNBT = ((ItemStack) aRecipe.mSpecialItems).getTagCompound();
- Object aAspectListToCheck = null;
- Object aGivenAspectList = null;
- try {
- aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
- aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
- AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck, toCheckNBT);
- AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList, givenNBT);
- if (!TCRecipeHandler.TCRecipeMap.containsAspects(
- aAspectListToCheck, aGivenAspectList)) continue;
- } catch (InstantiationException
- | IllegalAccessException
- | InvocationTargetException e) {
- e.printStackTrace();
- return null;
- }
- return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
- }
- tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(GT_Values.W, tStack)));
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes)
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
- && BW_Util.areStacksEqualOrNull(
- (ItemStack) tRecipe.mSpecialItems, aSpecialSlot)) {
- NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
- NBTTagCompound givenNBT = ((ItemStack) aRecipe.mSpecialItems).getTagCompound();
- Object aAspectListToCheck = null;
- Object aGivenAspectList = null;
- try {
- aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
- aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
- AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck, toCheckNBT);
- AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList, givenNBT);
- if (!TCRecipeHandler.TCRecipeMap.containsAspects(
- aAspectListToCheck, aGivenAspectList)) continue;
- } catch (InstantiationException
- | IllegalAccessException
- | InvocationTargetException e) {
- e.printStackTrace();
- return null;
- }
- return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
- }
- }
+ if (this.mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) if (tStack != null) {
+ Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
+ NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
+ NBTTagCompound givenNBT = ((ItemStack) aRecipe.mSpecialItems).getTagCompound();
+ Object aAspectListToCheck = null;
+ Object aGivenAspectList = null;
+ try {
+ aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
+ aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
+ AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck, toCheckNBT);
+ AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList, givenNBT);
+ if (!TCRecipeHandler.TCRecipeMap.containsAspects(aAspectListToCheck, aGivenAspectList))
+ continue;
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ e.printStackTrace();
+ return null;
+ }
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
+ tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(GT_Values.W, tStack)));
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
+ && BW_Util.areStacksEqualOrNull((ItemStack) tRecipe.mSpecialItems, aSpecialSlot)) {
+ NBTTagCompound toCheckNBT = aSpecialSlot.getTagCompound();
+ NBTTagCompound givenNBT = ((ItemStack) aRecipe.mSpecialItems).getTagCompound();
+ Object aAspectListToCheck = null;
+ Object aGivenAspectList = null;
+ try {
+ aAspectListToCheck = AspectAdder.mAspectListClass.newInstance();
+ aGivenAspectList = AspectAdder.mAspectListClass.newInstance();
+ AspectAdder.readAspectListFromNBT.invoke(aAspectListToCheck, toCheckNBT);
+ AspectAdder.readAspectListFromNBT.invoke(aGivenAspectList, givenNBT);
+ if (!TCRecipeHandler.TCRecipeMap.containsAspects(aAspectListToCheck, aGivenAspectList))
+ continue;
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ e.printStackTrace();
+ return null;
+ }
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
+ }
// And nothing has been found.
return null;
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java
index ce5efcd1a4..4f01c81db1 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java
@@ -1,32 +1,35 @@
/*
- * 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.crossmod.emt.tileentities.multi;
import static gregtech.api.enums.GT_Values.V;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.crossmod.emt.recipe.TCRecipeHandler;
import com.github.bartimaeusnek.crossmod.emt.util.EMTHandler;
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -34,15 +37,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("ALL")
public class GT_Industrial_Alchemic_Construct extends GT_MetaTileEntity_MultiBlockBase {
@@ -95,8 +89,8 @@ public class GT_Industrial_Alchemic_Construct extends GT_MetaTileEntity_MultiBlo
Object aspectList = EMTHandler.aAspectField.get(o);
ThaumcraftHandler.AspectAdder.add.invoke(allAspects, aspectList);
}
- NBTTagCompound toWrite = (NBTTagCompound)
- ThaumcraftHandler.AspectAdder.writeAspectListToNBT.invoke(allAspects, new NBTTagCompound());
+ NBTTagCompound toWrite = (NBTTagCompound) ThaumcraftHandler.AspectAdder.writeAspectListToNBT
+ .invoke(allAspects, new NBTTagCompound());
stack.setTagCompound(toWrite);
} catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
e.printStackTrace();
@@ -107,8 +101,8 @@ public class GT_Industrial_Alchemic_Construct extends GT_MetaTileEntity_MultiBlo
long tVoltage = this.getMaxInputVoltage();
byte tTier = (byte) Math.max(1, Math.min(GT_Utility.getTier(tVoltage), V.length - 1));
- GT_Recipe tRecipe = TCRecipeHandler.alchemicalConstructHandler.findRecipe(
- this.getBaseMetaTileEntity(), null, false, false, V[tTier], null, stack, tInputs);
+ GT_Recipe tRecipe = TCRecipeHandler.alchemicalConstructHandler
+ .findRecipe(this.getBaseMetaTileEntity(), null, false, false, V[tTier], null, stack, tInputs);
ItemStack helper = (ItemStack) tRecipe.mSpecialItems;
NBTTagCompound tagCompound = helper.getTagCompound();
String research = tagCompound.getCompoundTag("display").getString("Name");
@@ -183,8 +177,8 @@ public class GT_Industrial_Alchemic_Construct extends GT_MetaTileEntity_MultiBlo
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3, boolean b4) {
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3,
+ boolean b4) {
return new ITexture[0];
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java
index b369480116..afc42577fe 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java
@@ -1,39 +1,32 @@
/*
- * 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.crossmod.emt.util;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import java.lang.reflect.Field;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+
@SuppressWarnings("unchecked")
public class EMTHandler {
+
public static Class<? extends GT_MetaTileEntity_Hatch_Input> aEssentiaInputHatch;
public static Field aAspectField;
static {
try {
- aEssentiaInputHatch = (Class<? extends GT_MetaTileEntity_Hatch_Input>)
- Class.forName("emt.gthandler.common.implementations.EssentiaHatch");
+ aEssentiaInputHatch = (Class<? extends GT_MetaTileEntity_Hatch_Input>) Class
+ .forName("emt.gthandler.common.implementations.EssentiaHatch");
aAspectField = aEssentiaInputHatch.getDeclaredField("current");
aAspectField.setAccessible(true);
} catch (ClassNotFoundException | NoSuchFieldException e) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java
index f8e5827b0c..dfcdeddea5 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.galacticgreg;
@@ -26,18 +17,32 @@ import static bloodasp.galacticgreg.registry.GalacticGregRegistry.getModContaine
import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
import static gregtech.api.enums.GT_Values.VN;
+import java.util.*;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.ChunkProviderServer;
+import net.minecraftforge.fluids.FluidStack;
+
import bloodasp.galacticgreg.GT_Worldgen_GT_Ore_Layer_Space;
import bloodasp.galacticgreg.GT_Worldgen_GT_Ore_SmallPieces_Space;
import bloodasp.galacticgreg.GalacticGreg;
import bloodasp.galacticgreg.api.ModDimensionDef;
import bloodasp.galacticgreg.bartworks.BW_Worldgen_Ore_Layer_Space;
import bloodasp.galacticgreg.bartworks.BW_Worldgen_Ore_SmallOre_Space;
+
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.system.oregen.BW_OreLayer;
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.google.common.collect.ArrayListMultimap;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -49,28 +54,15 @@ import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Worldgen_GT_Ore_Layer;
import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
-import java.util.*;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.ChunkProviderServer;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("ALL")
public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_DrillerBase {
- private static ArrayListMultimap<Integer, Pair<Pair<Integer, Boolean>, Float>> extraDropsDimMap =
- ArrayListMultimap.create();
- private static FluidStack[] NOBLE_GASSES = new FluidStack[] {
- WerkstoffLoader.Neon.getFluidOrGas(1),
- WerkstoffLoader.Krypton.getFluidOrGas(1),
- WerkstoffLoader.Xenon.getFluidOrGas(1),
- WerkstoffLoader.Oganesson.getFluidOrGas(1)
- };
+ private static ArrayListMultimap<Integer, Pair<Pair<Integer, Boolean>, Float>> extraDropsDimMap = ArrayListMultimap
+ .create();
+ private static FluidStack[] NOBLE_GASSES = new FluidStack[] { WerkstoffLoader.Neon.getFluidOrGas(1),
+ WerkstoffLoader.Krypton.getFluidOrGas(1), WerkstoffLoader.Xenon.getFluidOrGas(1),
+ WerkstoffLoader.Oganesson.getFluidOrGas(1) };
private HashMap<Pair<Integer, Boolean>, Float> dropmap = null;
private float totalWeight;
@@ -81,18 +73,18 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
private boolean mBlacklist = false;
/**
- * Public method giving other mods the ability to add manually a material with an ore version into the external dromap for a specified dim id
+ * Public method giving other mods the ability to add manually a material with an ore version into the external
+ * dromap for a specified dim id
+ *
* @param DimensionID the dim id targetted
- * @param Material the material with an ore version
- * @param weight the non normalised version of the given weight
+ * @param Material the material with an ore version
+ * @param weight the non normalised version of the given weight
*/
public static void addMatierialToDimensionList(int DimensionID, ISubTagContainer Material, float weight) {
- if (Material instanceof Materials)
- getExtraDropsDimMap()
- .put(DimensionID, new Pair<>(new Pair<>(((Materials) Material).mMetaItemSubID, false), weight));
- else if (Material instanceof Werkstoff)
- getExtraDropsDimMap()
- .put(DimensionID, new Pair<>(new Pair<>((int) ((Werkstoff) Material).getmID(), true), weight));
+ if (Material instanceof Materials) getExtraDropsDimMap()
+ .put(DimensionID, new Pair<>(new Pair<>(((Materials) Material).mMetaItemSubID, false), weight));
+ else if (Material instanceof Werkstoff) getExtraDropsDimMap()
+ .put(DimensionID, new Pair<>(new Pair<>((int) ((Werkstoff) Material).getmID(), true), weight));
}
// adding tellurium to OW to ensure a way to get it, as it's used in Magneto Resonatic Dust and Circuit Compound MK3
@@ -152,8 +144,8 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
}
@Override
- protected boolean workingAtBottom(
- ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe,
+ int yHead, int oldYHead) {
// if the dropmap has never been initialised or if the dropmap is empty
if (dropmap == null || totalWeight == 0) calculateDropMap();
@@ -172,33 +164,30 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
String casings = getCasingBlockItem().get(0).getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Miner")
- .addInfo("Controller Block for the Void Miner " + GT_Values.VN[this.getMinTier()])
+ tt.addMachineType("Miner").addInfo("Controller Block for the Void Miner " + GT_Values.VN[this.getMinTier()])
.addInfo("Consumes " + GT_Values.V[this.getMinTier()] + "EU/t")
.addInfo(
"Can be supplied with 2L/s of Neon(x4), Krypton(x8), Xenon(x16) or Oganesson(x64) for higher outputs.")
- .addInfo("Will output " + (2 * TIER_MULTIPLIER)
- + " Ores per Second depending on the Dimension it is build in")
+ .addInfo(
+ "Will output " + (2 * TIER_MULTIPLIER)
+ + " Ores per Second depending on the Dimension it is build in")
.addInfo("Put the Ore into the input bus to set the Whitelist/Blacklist")
.addInfo("Use a screwdriver to toggle Whitelist/Blacklist")
- .addInfo("Blacklist or non Whitelist Ore will be VOIDED")
- .addSeparator()
- .beginStructureBlock(3, 7, 3, false)
- .addController("Front bottom")
+ .addInfo("Blacklist or non Whitelist Ore will be VOIDED").addSeparator()
+ .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
.addOtherStructurePart(casings, "form the 3x1x3 Base")
.addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
.addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing")
- .addMaintenanceHatch("Any base casing")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing").addMaintenanceHatch("Any base casing")
.addInputBus("Mining Pipes or Ores, optional, any base casing")
- .addInputHatch("Optional noble gas, any base casing")
- .addOutputBus("Any base casing")
+ .addInputHatch("Optional noble gas, any base casing").addOutputBus("Any base casing")
.toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
return tt;
}
/**
* getter for the external drop map
+ *
* @return the extraDriosDimMap
*/
public static ArrayListMultimap<Integer, Pair<Pair<Integer, Boolean>, Float>> getExtraDropsDimMap() {
@@ -207,6 +196,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Makes a predicate for the GT normal ore veins worldgen
+ *
* @return the predicate
*/
private Predicate<GT_Worldgen_GT_Ore_Layer> makeOreLayerPredicate() {
@@ -220,9 +210,9 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
return gt_worldgen -> gt_worldgen.mEnd || gt_worldgen.mEndAsteroid;
case 7:
/*
- explicitely giving different dim numbers so it default to false in the config, keeping compat
- with the current worldgen config
- */
+ * explicitely giving different dim numbers so it default to false in the config, keeping compat with
+ * the current worldgen config
+ */
return gt_worldgen -> gt_worldgen.isGenerationAllowed(world, 0, 7);
default:
@@ -232,6 +222,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Makes a predicate for the GT normal small ore worldgen
+ *
* @return the predicate
*/
private Predicate<GT_Worldgen_GT_Ore_SmallPieces> makeSmallOresPredicate() {
@@ -245,9 +236,9 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
return gt_worldgen -> gt_worldgen.mEnd;
case 7:
/*
- explicitely giving different dim numbers so it default to false in the config, keeping compat
- with the current worldgen config
- */
+ * explicitely giving different dim numbers so it default to false in the config, keeping compat with
+ * the current worldgen config
+ */
return gt_worldgen -> gt_worldgen.isGenerationAllowed(world, 0, 7);
default:
throw new IllegalStateException();
@@ -256,25 +247,31 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Method used to add an ore to the droplist
- * @param key a Pair of <int, bool> where the int is the meta of the ore, and the bool is true for BW ores, false for GT ores
+ *
+ * @param key a Pair of <int, bool> where the int is the meta of the ore, and the bool is true for BW ores, false
+ * for GT ores
* @param value the non normalised weight
*/
private void addDrop(Pair<Integer, Boolean> key, float value) {
final ItemStack ore = getOreItemStack(key);
- if (ConfigHandler.voidMinerBlacklist.contains(String.format(
- "%s:%d", GameRegistry.findUniqueIdentifierFor(ore.getItem()).toString(), ore.getItemDamage()))) return;
+ if (ConfigHandler.voidMinerBlacklist.contains(
+ String.format(
+ "%s:%d",
+ GameRegistry.findUniqueIdentifierFor(ore.getItem()).toString(),
+ ore.getItemDamage())))
+ return;
if (!dropmap.containsKey(key)) dropmap.put(key, value);
else dropmap.put(key, dropmap.get(key) + value);
}
/**
* Method to add the ores of a vanilla GT worldgen
+ *
* @param oreLayerPredicate the predicate made by makeOreLayerPredicate
*/
private void getDropsVanillaVeins(Predicate<GT_Worldgen_GT_Ore_Layer> oreLayerPredicate) {
GT_Worldgen_GT_Ore_Layer.sList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled && oreLayerPredicate.test(gt_worldgen))
- .forEach(element -> {
+ .filter(gt_worldgen -> gt_worldgen.mEnabled && oreLayerPredicate.test(gt_worldgen)).forEach(element -> {
addDrop(new Pair<>((int) element.mPrimaryMeta, false), (float) element.mWeight);
addDrop(new Pair<>((int) element.mSecondaryMeta, false), (float) element.mWeight);
addDrop(new Pair<>((int) element.mSporadicMeta, false), (element.mWeight / 8f));
@@ -284,6 +281,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Method to add the small ores of a vanilla GT worldgen
+ *
* @param smallOresPredicate the predicate made by makeSmallOresPredicate
*/
private void getDropsVanillaSmallOres(Predicate<GT_Worldgen_GT_Ore_SmallPieces> smallOresPredicate) {
@@ -294,20 +292,23 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* add to the dropmap the ores from the gagreg space worldgen corresponding to the target dim
+ *
* @param finalDef ModDimensionDef corresponding to the target dim
*/
private void getDropsOreVeinsSpace(ModDimensionDef finalDef) {
Set space = GalacticGreg.oreVeinWorldgenList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled
- && gt_worldgen instanceof GT_Worldgen_GT_Ore_Layer_Space
- && ((GT_Worldgen_GT_Ore_Layer_Space) gt_worldgen).isEnabledForDim(finalDef))
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled && gt_worldgen instanceof GT_Worldgen_GT_Ore_Layer_Space
+ && ((GT_Worldgen_GT_Ore_Layer_Space) gt_worldgen).isEnabledForDim(finalDef))
.collect(Collectors.toSet());
space.forEach(element -> {
- addDrop(new Pair<>((int) ((GT_Worldgen_GT_Ore_Layer_Space) element).mPrimaryMeta, false), (float)
- ((GT_Worldgen_GT_Ore_Layer_Space) element).mWeight);
- addDrop(new Pair<>((int) ((GT_Worldgen_GT_Ore_Layer_Space) element).mSecondaryMeta, false), (float)
- ((GT_Worldgen_GT_Ore_Layer_Space) element).mWeight);
+ addDrop(
+ new Pair<>((int) ((GT_Worldgen_GT_Ore_Layer_Space) element).mPrimaryMeta, false),
+ (float) ((GT_Worldgen_GT_Ore_Layer_Space) element).mWeight);
+ addDrop(
+ new Pair<>((int) ((GT_Worldgen_GT_Ore_Layer_Space) element).mSecondaryMeta, false),
+ (float) ((GT_Worldgen_GT_Ore_Layer_Space) element).mWeight);
addDrop(
new Pair<>((int) ((GT_Worldgen_GT_Ore_Layer_Space) element).mSporadicMeta, false),
(((GT_Worldgen_GT_Ore_Layer_Space) element).mWeight / 8f));
@@ -319,22 +320,24 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* add to the dropmap the small ores from the gagreg space worldgen corresponding to the target dim
+ *
* @param finalDef ModDimensionDef corresponding to the target dim
*/
private void getDropsSmallOreSpace(ModDimensionDef finalDef) {
- Set space = GalacticGreg.smallOreWorldgenList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled
- && gt_worldgen instanceof GT_Worldgen_GT_Ore_SmallPieces_Space
+ Set space = GalacticGreg.smallOreWorldgenList.stream().filter(
+ gt_worldgen -> gt_worldgen.mEnabled && gt_worldgen instanceof GT_Worldgen_GT_Ore_SmallPieces_Space
&& ((GT_Worldgen_GT_Ore_SmallPieces_Space) gt_worldgen).isEnabledForDim(finalDef))
.collect(Collectors.toSet());
- space.forEach(element ->
- addDrop(new Pair<>((int) ((GT_Worldgen_GT_Ore_SmallPieces_Space) element).mMeta, false), (float)
- ((GT_Worldgen_GT_Ore_SmallPieces_Space) element).mAmount));
+ space.forEach(
+ element -> addDrop(
+ new Pair<>((int) ((GT_Worldgen_GT_Ore_SmallPieces_Space) element).mMeta, false),
+ (float) ((GT_Worldgen_GT_Ore_SmallPieces_Space) element).mAmount));
}
/**
* method used to pick the next key in the dropmap that will be used to generate the ore.
+ *
* @return the chosen key
*/
private Pair<Integer, Boolean> getOreDamage() {
@@ -350,6 +353,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Method used to check the current gat and its corresponding multiplier
+ *
* @return the noble gas in the hatch. returns null if there is no noble gas found.
*/
private FluidStack getNobleGasInputAndSetMultiplier() {
@@ -367,6 +371,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* method used to decrement the quantity of gas in the hatch
+ *
* @param gasToConsume the fluid stack in the hatch
* @return if yes or no it was able to decrement the quantity of the fluidstack
*/
@@ -391,20 +396,21 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Handles the addition of Ross dims' ores into the drop map
+ *
* @param aID dim id of Ross128b or Ross128ba
*/
private void getDropMapRoss(int aID) {
Consumer<BW_OreLayer> addToList = makeAddToList();
BW_OreLayer.sList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled
- && gt_worldgen instanceof BW_OreLayer
- && gt_worldgen.isGenerationAllowed(null, aID, 0))
- .collect(Collectors.toSet())
- .forEach(addToList);
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled && gt_worldgen instanceof BW_OreLayer
+ && gt_worldgen.isGenerationAllowed(null, aID, 0))
+ .collect(Collectors.toSet()).forEach(addToList);
}
/**
* Method used to generate a consumer used specifically to add BW ores into the dropmap
+ *
* @return the consumer
*/
private Consumer<BW_OreLayer> makeAddToList() {
@@ -419,63 +425,61 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Method used to build the ModDimensionDef object corresponding to the dimension the VM is in.
+ *
* @return the ModDimensionDef object.
*/
private ModDimensionDef makeModDimDef() {
- return getModContainers().stream()
- .flatMap(modContainer -> modContainer.getDimensionList().stream())
- .filter(modDimensionDef -> modDimensionDef
- .getChunkProviderName()
- .equals(((ChunkProviderServer)
- this.getBaseMetaTileEntity().getWorld().getChunkProvider())
- .currentChunkProvider
- .getClass()
- .getName()))
- .findFirst()
- .orElse(null);
+ return getModContainers().stream().flatMap(modContainer -> modContainer.getDimensionList().stream())
+ .filter(
+ modDimensionDef -> modDimensionDef.getChunkProviderName().equals(
+ ((ChunkProviderServer) this.getBaseMetaTileEntity().getWorld()
+ .getChunkProvider()).currentChunkProvider.getClass().getName()))
+ .findFirst().orElse(null);
}
/**
* Handles the addition of small ores for bartwork dims
- * @param finalDef the ModDimensionDef object corresponding to the dim
+ *
+ * @param finalDef the ModDimensionDef object corresponding to the dim
* @param addToList a consumer used to add the ores from the vein with proper weight
*/
private void addOresVeinsBartworks(ModDimensionDef finalDef, Consumer<BW_OreLayer> addToList) {
try {
Set space = GalacticGreg.oreVeinWorldgenList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled
- && gt_worldgen instanceof BW_Worldgen_Ore_Layer_Space
- && ((BW_Worldgen_Ore_Layer_Space) gt_worldgen).isEnabledForDim(finalDef))
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled && gt_worldgen instanceof BW_Worldgen_Ore_Layer_Space
+ && ((BW_Worldgen_Ore_Layer_Space) gt_worldgen).isEnabledForDim(finalDef))
.collect(Collectors.toSet());
space.forEach(addToList);
- } catch (NullPointerException ignored) {
- }
+ } catch (NullPointerException ignored) {}
}
/**
* Handles the addition of small ores for bartwork dims
+ *
* @param finalDef the ModDimensionDef object corresponding to the dim
*/
private void addSmallOresBartworks(ModDimensionDef finalDef) {
try {
Set space = GalacticGreg.smallOreWorldgenList.stream()
- .filter(gt_worldgen -> gt_worldgen.mEnabled
- && gt_worldgen instanceof BW_Worldgen_Ore_SmallOre_Space
- && ((BW_Worldgen_Ore_SmallOre_Space) gt_worldgen).isEnabledForDim(finalDef))
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled && gt_worldgen instanceof BW_Worldgen_Ore_SmallOre_Space
+ && ((BW_Worldgen_Ore_SmallOre_Space) gt_worldgen).isEnabledForDim(finalDef))
.collect(Collectors.toSet());
- space.forEach(element -> addDrop(
- new Pair<>(
- ((BW_Worldgen_Ore_SmallOre_Space) element).mPrimaryMeta,
- ((BW_Worldgen_Ore_SmallOre_Space) element).bwOres != 0),
- (float) ((BW_Worldgen_Ore_SmallOre_Space) element).mDensity));
- } catch (NullPointerException ignored) {
- }
+ space.forEach(
+ element -> addDrop(
+ new Pair<>(
+ ((BW_Worldgen_Ore_SmallOre_Space) element).mPrimaryMeta,
+ ((BW_Worldgen_Ore_SmallOre_Space) element).bwOres != 0),
+ (float) ((BW_Worldgen_Ore_SmallOre_Space) element).mDensity));
+ } catch (NullPointerException ignored) {}
}
/**
* Handles the ores added manually with addMatierialToDimensionList
+ *
* @param id the specified dim id
*/
private void handleExtraDrops(int id) {
@@ -493,6 +497,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Computes the ores of the dim for the specifed dim id
+ *
* @param id the dim number
*/
private void handleModDimDef(int id) {
@@ -521,7 +526,8 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
}
/**
- * Computes first the ores related to the dim the VM is in, then the ores added manually, then it computes the totalweight for normalisation
+ * Computes first the ores related to the dim the VM is in, then the ores added manually, then it computes the
+ * totalweight for normalisation
*/
private void calculateDropMap() {
dropmap = new HashMap<>();
@@ -536,8 +542,8 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
*/
private void handleOutputs() {
Pair<Integer, Boolean> stats = getOreDamage();
- final List<ItemStack> inputOres =
- this.getStoredInputs().stream().filter(GT_Utility::isOre).collect(Collectors.toList());
+ final List<ItemStack> inputOres = this.getStoredInputs().stream().filter(GT_Utility::isOre)
+ .collect(Collectors.toList());
final ItemStack output = getOreItemStack(stats);
if (inputOres.size() == 0
|| (mBlacklist && inputOres.stream().allMatch(is -> !GT_Utility.areStacksEqual(is, output)))
@@ -548,12 +554,16 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri
/**
* Builds the ore item stack from the key specified in the dropmap
+ *
* @param stats the key of the dropmap
- * @return an ItemStack corresponding to the target ore, with a stacksize corresponding to the mutiplier induced by the gas used
+ * @return an ItemStack corresponding to the target ore, with a stacksize corresponding to the mutiplier induced by
+ * the gas used
*/
private ItemStack getOreItemStack(Pair<Integer, Boolean> stats) {
return new ItemStack(
- stats.getValue() ? WerkstoffLoader.BWOres : GregTech_API.sBlockOres1, multiplier, stats.getKey());
+ stats.getValue() ? WerkstoffLoader.BWOres : GregTech_API.sBlockOres1,
+ multiplier,
+ stats.getKey());
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java
index 6898b81ded..5f15bd6c09 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.galacticgreg;
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java
index d458ea07af..5d61796164 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java
@@ -1,42 +1,37 @@
/*
- * 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.crossmod.galacticraft;
+import java.io.File;
+
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.config.Configuration;
+
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128b;
import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128ba;
import com.github.bartimaeusnek.crossmod.galacticraft.atmosphere.BWAtmosphereManager;
import com.github.bartimaeusnek.crossmod.galacticraft.solarsystems.Ross128SolarSystem;
+
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import gregtech.api.objects.GT_UO_DimensionList;
-import java.io.File;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.config.Configuration;
public class GalacticraftProxy {
+
public static GT_UO_DimensionList uo_dimensionList = new GT_UO_DimensionList();
static Configuration gtConf;
@@ -65,8 +60,8 @@ public class GalacticraftProxy {
private static void clientpreInit(FMLPreInitializationEvent e) {}
private static void commonpreInit(FMLPreInitializationEvent e) {
- GalacticraftProxy.gtConf =
- new Configuration(new File(new File(e.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg"));
+ GalacticraftProxy.gtConf = new Configuration(
+ new File(new File(e.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg"));
GalacticraftProxy.uo_dimensionList.getConfig(GalacticraftProxy.gtConf, "undergroundfluid");
BW_WorldGenRoss128b.initundergroundFluids();
BW_WorldGenRoss128ba.init_undergroundFluids();
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java
index a0381dd0e9..d777bfa250 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java
@@ -1,34 +1,27 @@
/*
- * 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.crossmod.galacticraft;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import micdoodle8.mods.galacticraft.core.entities.EntityLander;
import micdoodle8.mods.galacticraft.core.entities.EntityLanderBase;
import micdoodle8.mods.galacticraft.planets.asteroids.entities.EntityEntryPod;
import micdoodle8.mods.galacticraft.planets.mars.entities.EntityLandingBalloons;
+
import net.minecraft.entity.player.EntityPlayerMP;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+
public class PlanetsHelperClass {
public static EntityLanderBase getLanderType(EntityPlayerMP player) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java
index ff53bfcfa8..0a030d8b7f 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java
@@ -1,39 +1,33 @@
/*
- * 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.crossmod.galacticraft;
-import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import java.util.Random;
+
import micdoodle8.mods.galacticraft.api.vector.Vector3;
import micdoodle8.mods.galacticraft.api.world.ITeleportType;
import micdoodle8.mods.galacticraft.core.entities.EntityLander;
import micdoodle8.mods.galacticraft.core.entities.EntityLanderBase;
import micdoodle8.mods.galacticraft.core.entities.player.GCPlayerStats;
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
+import com.github.bartimaeusnek.bartworks.API.LoaderReference;
+
public class UniversalTeleportType implements ITeleportType {
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java
index 79f4db3734..efc3323195 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java
@@ -1,61 +1,55 @@
/*
- * 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.crossmod.galacticraft.atmosphere;
+import java.util.*;
+
+import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
+import micdoodle8.mods.galacticraft.api.galaxies.GalaxyRegistry;
+import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas;
+
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import com.google.common.collect.ArrayListMultimap;
+
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.ISubTagContainer;
-import java.util.*;
-import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
-import micdoodle8.mods.galacticraft.api.galaxies.GalaxyRegistry;
-import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas;
-@SuppressWarnings({"unused", "RedundantSuppression"})
+@SuppressWarnings({ "unused", "RedundantSuppression" })
public final class BWAtmosphereManager {
private static final Map<Integer, Integer[]> COEFFICIENT_MAP = new HashMap<>();
private BWAtmosphereManager() {
- BWAtmosphereManager.COEFFICIENT_MAP.put(1, new Integer[] {100});
- BWAtmosphereManager.COEFFICIENT_MAP.put(2, new Integer[] {70, 30});
- BWAtmosphereManager.COEFFICIENT_MAP.put(3, new Integer[] {60, 25, 15});
- BWAtmosphereManager.COEFFICIENT_MAP.put(4, new Integer[] {50, 25, 15, 10});
- BWAtmosphereManager.COEFFICIENT_MAP.put(5, new Integer[] {45, 25, 15, 10, 5});
- BWAtmosphereManager.COEFFICIENT_MAP.put(6, new Integer[] {45, 20, 15, 10, 5, 5});
- BWAtmosphereManager.COEFFICIENT_MAP.put(7, new Integer[] {40, 20, 15, 10, 5, 5, 5});
- BWAtmosphereManager.COEFFICIENT_MAP.put(8, new Integer[] {35, 20, 15, 10, 5, 5, 5, 5});
- BWAtmosphereManager.COEFFICIENT_MAP.put(9, new Integer[] {35, 15, 15, 10, 5, 5, 5, 5, 5});
+ BWAtmosphereManager.COEFFICIENT_MAP.put(1, new Integer[] { 100 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(2, new Integer[] { 70, 30 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(3, new Integer[] { 60, 25, 15 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(4, new Integer[] { 50, 25, 15, 10 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(5, new Integer[] { 45, 25, 15, 10, 5 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(6, new Integer[] { 45, 20, 15, 10, 5, 5 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(7, new Integer[] { 40, 20, 15, 10, 5, 5, 5 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(8, new Integer[] { 35, 20, 15, 10, 5, 5, 5, 5 });
+ BWAtmosphereManager.COEFFICIENT_MAP.put(9, new Integer[] { 35, 15, 15, 10, 5, 5, 5, 5, 5 });
}
public static final BWAtmosphereManager INSTANCE = new BWAtmosphereManager();
- private static final ArrayListMultimap<Integer, Pair<ISubTagContainer, Integer>> gasConcentration =
- ArrayListMultimap.create();
+ private static final ArrayListMultimap<Integer, Pair<ISubTagContainer, Integer>> gasConcentration = ArrayListMultimap
+ .create();
public static List<Pair<ISubTagContainer, Integer>> getGasFromWorldID(int worldID) {
return BWAtmosphereManager.gasConcentration.get(worldID);
@@ -101,8 +95,7 @@ public final class BWAtmosphereManager {
if (mat == Werkstoff.default_null_Werkstoff) {
return false;
}
- BWAtmosphereManager.addGasToWorld(
- worldID, mat, BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]);
+ BWAtmosphereManager.addGasToWorld(worldID, mat, BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]);
return true;
}
@@ -110,10 +103,12 @@ public final class BWAtmosphereManager {
public void gcAutoRegister(GalaxyRegistry.PlanetRegisterEvent event) {
CelestialBody planet = GalaxyRegistry.getRegisteredPlanets().get(event.planetName);
for (int i = 0; i < planet.atmosphere.size(); i++) {
- if (!BWAtmosphereManager.addGCGasToWorld(
- planet.getDimensionID(), planet.atmosphere.get(i), i, planet.atmosphere.size()))
- BartWorksCrossmod.LOGGER.warn("Unidentified Fluid (" + planet.atmosphere.get(i)
- + ") in the Atmosphere of: " + planet.getLocalizedName());
+ if (!BWAtmosphereManager
+ .addGCGasToWorld(planet.getDimensionID(), planet.atmosphere.get(i), i, planet.atmosphere.size()))
+ BartWorksCrossmod.LOGGER.warn(
+ "Unidentified Fluid (" + planet.atmosphere.get(i)
+ + ") in the Atmosphere of: "
+ + planet.getLocalizedName());
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java
index 04d4e41cb8..af9d9647af 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java
@@ -1,33 +1,25 @@
/*
- * 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.crossmod.galacticraft.blocks;
-import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks;
-import com.github.bartimaeusnek.crossmod.galacticraft.creativetabs.SpaceTab;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.IBlockAccess;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks;
+import com.github.bartimaeusnek.crossmod.galacticraft.creativetabs.SpaceTab;
+
public class UniversalSpaceBlocks extends BW_Blocks {
public UniversalSpaceBlocks(String name, String[] texture) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java
index b44120bf34..5d9b9c3cc1 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java
@@ -1,31 +1,23 @@
/*
- * 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.crossmod.galacticraft.creativetabs;
-import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+
public class SpaceTab extends CreativeTabs {
private static final SpaceTab instance = new SpaceTab("SpaceTab");
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java
index 5f1d2a98e6..33f4f6f9ae 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.galacticraft.planets;
@@ -27,6 +18,7 @@ import micdoodle8.mods.galacticraft.api.world.IExitHeight;
import micdoodle8.mods.galacticraft.api.world.ISolarLevel;
public abstract class AbstractWorldProviderSpace extends WorldProviderSpace implements IExitHeight, ISolarLevel {
+
@Override
public boolean canRainOrSnow() {
return false;
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
index 2d5928bb37..89330e3d45 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.galacticraft.planets.ross128b;
@@ -25,13 +16,8 @@ package com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b;
import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE;
import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE;
-import com.github.bartimaeusnek.bartworks.API.LoaderReference;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import com.github.bartimaeusnek.bartworks.system.oregen.BW_WordGenerator;
-import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins;
-import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
-import gregtech.api.objects.XSTR;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
import net.minecraft.entity.EnumCreatureType;
@@ -49,7 +35,15 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.event.terraingen.TerrainGen;
+import com.github.bartimaeusnek.bartworks.API.LoaderReference;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.system.oregen.BW_WordGenerator;
+import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins;
+import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+import gregtech.api.objects.XSTR;
+
public class ChunkProviderRoss128b extends ChunkProviderGenerate {
+
XSTR rand = new XSTR();
private BiomeGenBase[] biomesForGeneration;
public static final BW_WordGenerator BWOreGen = new BW_WordGenerator();
@@ -74,8 +68,7 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
Block[] ablock = new Block[65536];
byte[] abyte = new byte[65536];
this.func_147424_a(p_73154_1_, p_73154_2_, ablock);
- this.biomesForGeneration = this.worldObj
- .getWorldChunkManager()
+ this.biomesForGeneration = this.worldObj.getWorldChunkManager()
.loadBlockGeneratorData(this.biomesForGeneration, p_73154_1_ * 16, p_73154_2_ * 16, 16, 16);
for (int i = 0; i < this.biomesForGeneration.length; i++) {
BiomeGenBase biomeGenBase = this.biomesForGeneration[i];
@@ -120,14 +113,13 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
this.rand.setSeed((long) p_73153_2_ * i1 + (long) p_73153_3_ * j1 ^ this.worldObj.getSeed());
}
- MinecraftForge.EVENT_BUS.post(
- new PopulateChunkEvent.Pre(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false));
+ MinecraftForge.EVENT_BUS
+ .post(new PopulateChunkEvent.Pre(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false));
int x1;
int y1;
int z1;
- if (biomegenbase != BiomeGenBase.desert
- && biomegenbase != BiomeGenBase.desertHills
+ if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills
&& TerrainGen.populate(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false, LAKE)) {
x1 = k + this.rand.nextInt(16) + 8;
y1 = this.rand.nextInt(256);
@@ -136,8 +128,7 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
if (rni == 0) (new WorldGenLakes(Blocks.ice)).generate(this.worldObj, this.rand, x1, y1, z1);
else if (rni == 4) (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, x1, y1, z1);
}
- if (biomegenbase != BiomeGenBase.ocean
- && biomegenbase != BiomeGenBase.deepOcean
+ if (biomegenbase != BiomeGenBase.ocean && biomegenbase != BiomeGenBase.deepOcean
&& biomegenbase != BiomeGenBase.river
&& biomegenbase != BiomeGenBase.frozenOcean
&& biomegenbase != BiomeGenBase.frozenRiver
@@ -169,8 +160,8 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
}
BWOreGen.generate(this.rand, p_73153_2_, p_73153_3_, this.worldObj, this, this);
- MinecraftForge.EVENT_BUS.post(
- new PopulateChunkEvent.Post(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false));
+ MinecraftForge.EVENT_BUS
+ .post(new PopulateChunkEvent.Post(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false));
BlockFalling.fallInstantly = false;
}
@@ -179,8 +170,8 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
public void recreateStructures(int p_82695_1_, int p_82695_2_) {}
@Override
- public void replaceBlocksForBiome(
- int p_147422_1_, int p_147422_2_, Block[] blocks, byte[] metas, BiomeGenBase[] p_147422_5_) {
+ public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] blocks, byte[] metas,
+ BiomeGenBase[] p_147422_5_) {
super.replaceBlocksForBiome(p_147422_1_, p_147422_2_, blocks, metas, p_147422_5_);
for (int i = 0; i < blocks.length; i++) {
if (blocks[i] == Blocks.grass) {
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java
index e8962ed14a..26ad8d9d7a 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java
@@ -1,32 +1,25 @@
/*
- * 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.crossmod.galacticraft.planets.ross128b;
-import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import net.minecraft.util.ResourceLocation;
+import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+
public class SkyProviderRoss128b {
+
// ASM enables this texture
- public static final ResourceLocation sunTex =
- new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/World/SunRoss128.png");
+ public static final ResourceLocation sunTex = new ResourceLocation(
+ BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/World/SunRoss128.png");
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java
index 5a6c5b6dca..b67dbe6503 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java
@@ -1,38 +1,32 @@
/*
- * 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.crossmod.galacticraft.planets.ross128b;
-import com.github.bartimaeusnek.crossmod.galacticraft.planets.AbstractWorldProviderSpace;
-import com.github.bartimaeusnek.crossmod.galacticraft.solarsystems.Ross128SolarSystem;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
import micdoodle8.mods.galacticraft.api.vector.Vector3;
+
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.chunk.IChunkProvider;
+import com.github.bartimaeusnek.crossmod.galacticraft.planets.AbstractWorldProviderSpace;
+import com.github.bartimaeusnek.crossmod.galacticraft.solarsystems.Ross128SolarSystem;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class WorldProviderRoss128b extends AbstractWorldProviderSpace {
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java
index ec7ecb17c1..96108217e9 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java
@@ -1,37 +1,27 @@
/*
- * 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.crossmod.galacticraft.planets.ross128ba;
-import com.github.bartimaeusnek.bartworks.util.NoiseUtil.BartsNoise;
-import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b.ChunkProviderRoss128b;
-import gregtech.api.objects.XSTR;
import java.util.Arrays;
import java.util.Random;
+
import micdoodle8.mods.galacticraft.api.prefab.world.gen.MapGenBaseMeta;
import micdoodle8.mods.galacticraft.core.blocks.GCBlocks;
import micdoodle8.mods.galacticraft.core.world.gen.BiomeGenBaseMoon;
import micdoodle8.mods.galacticraft.core.world.gen.ChunkProviderMoon;
import micdoodle8.mods.galacticraft.core.world.gen.MapGenCavesMoon;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
import net.minecraft.init.Blocks;
@@ -40,6 +30,10 @@ import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkProvider;
+import com.github.bartimaeusnek.bartworks.util.NoiseUtil.BartsNoise;
+import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b.ChunkProviderRoss128b;
+import gregtech.api.objects.XSTR;
+
public class ChunkProviderRoss128ba extends ChunkProviderMoon {
private final XSTR rand = new XSTR();
@@ -49,7 +43,7 @@ public class ChunkProviderRoss128ba extends ChunkProviderMoon {
public ChunkProviderRoss128ba(World world, long seed, boolean mapFeaturesEnabled) {
super(world, seed, mapFeaturesEnabled);
- this.biomesForGeneration = new BiomeGenBase[] {BiomeGenBaseMoon.moonFlat};
+ this.biomesForGeneration = new BiomeGenBase[] { BiomeGenBaseMoon.moonFlat };
this.caveGenerator = new MapGenCavesMoon();
this.worldObj = world;
}
@@ -60,8 +54,7 @@ public class ChunkProviderRoss128ba extends ChunkProviderMoon {
byte[] meta = new byte[65536];
Arrays.fill(ids, Blocks.air);
this.generateTerrain(cx, cz, ids, meta);
- this.biomesForGeneration = this.worldObj
- .getWorldChunkManager()
+ this.biomesForGeneration = this.worldObj.getWorldChunkManager()
.loadBlockGeneratorData(this.biomesForGeneration, cx * 16, cz * 16, 16, 16);
this.createCraters(cx, cz, ids, meta);
this.replaceBlocksForBiome(cx, cz, ids, meta, this.biomesForGeneration);
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java
index c51fe51611..7dfa0ab446 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java
@@ -1,37 +1,31 @@
/*
- * 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.crossmod.galacticraft.planets.ross128ba;
-import com.github.bartimaeusnek.bartworks.util.MathUtils;
-import com.github.bartimaeusnek.crossmod.galacticraft.planets.AbstractWorldProviderSpace;
-import com.github.bartimaeusnek.crossmod.galacticraft.solarsystems.Ross128SolarSystem;
import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
import micdoodle8.mods.galacticraft.api.vector.Vector3;
import micdoodle8.mods.galacticraft.core.world.gen.WorldChunkManagerMoon;
+
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.chunk.IChunkProvider;
+import com.github.bartimaeusnek.bartworks.util.MathUtils;
+import com.github.bartimaeusnek.crossmod.galacticraft.planets.AbstractWorldProviderSpace;
+import com.github.bartimaeusnek.crossmod.galacticraft.solarsystems.Ross128SolarSystem;
+
public class WorldProviderRoss128ba extends AbstractWorldProviderSpace {
+
@Override
public Vector3 getFogColor() {
return new Vector3(0, 0, 0);
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java
index 6bc6aafc09..1ce3a61058 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java
@@ -1,41 +1,35 @@
/*
- * 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.crossmod.galacticraft.solarsystems;
-import com.github.bartimaeusnek.bartworks.API.LoaderReference;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
-import com.github.bartimaeusnek.crossmod.galacticraft.UniversalTeleportType;
-import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b.WorldProviderRoss128b;
-import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128ba.WorldProviderRoss128ba;
import java.util.Arrays;
+
import micdoodle8.mods.galacticraft.api.GalacticraftRegistry;
import micdoodle8.mods.galacticraft.api.galaxies.*;
import micdoodle8.mods.galacticraft.api.vector.Vector3;
import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas;
import micdoodle8.mods.galacticraft.core.GalacticraftCore;
+
import net.minecraft.util.ResourceLocation;
+import com.github.bartimaeusnek.bartworks.API.LoaderReference;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+import com.github.bartimaeusnek.crossmod.galacticraft.UniversalTeleportType;
+import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b.WorldProviderRoss128b;
+import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128ba.WorldProviderRoss128ba;
+
public class Ross128SolarSystem {
public static SolarSystem Ross128System;
@@ -47,10 +41,9 @@ public class Ross128SolarSystem {
public static void init() {
- Ross128SolarSystem.Ross128System =
- new SolarSystem("Ross128System", "milkyWay").setMapPosition(new Vector3(-1.0D, 1.3D, 0.0D));
- Ross128SolarSystem.Ross128 = (Star) new Star("Ross128")
- .setParentSolarSystem(Ross128SolarSystem.Ross128System)
+ Ross128SolarSystem.Ross128System = new SolarSystem("Ross128System", "milkyWay")
+ .setMapPosition(new Vector3(-1.0D, 1.3D, 0.0D));
+ Ross128SolarSystem.Ross128 = (Star) new Star("Ross128").setParentSolarSystem(Ross128SolarSystem.Ross128System)
.setTierRequired(-1);
Ross128SolarSystem.Ross128.setUnreachable();
Ross128SolarSystem.Ross128.setBodyIcon(
@@ -64,8 +57,8 @@ public class Ross128SolarSystem {
new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/MapObjs/Ross128b.png"));
Ross128SolarSystem.Ross128b.setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(0.75F, 1.75F));
Ross128SolarSystem.Ross128b.setRelativeOrbitTime(0.65F);
- Ross128SolarSystem.Ross128b.atmosphere.addAll(
- Arrays.asList(IAtmosphericGas.OXYGEN, IAtmosphericGas.NITROGEN, IAtmosphericGas.ARGON));
+ Ross128SolarSystem.Ross128b.atmosphere
+ .addAll(Arrays.asList(IAtmosphericGas.OXYGEN, IAtmosphericGas.NITROGEN, IAtmosphericGas.ARGON));
Ross128SolarSystem.Ross128b.setDimensionInfo(ConfigHandler.ross128BID, WorldProviderRoss128b.class);
Ross128SolarSystem.Ross128b.setTierRequired(ConfigHandler.ross128btier);
@@ -75,8 +68,8 @@ public class Ross128SolarSystem {
Ross128SolarSystem.Ross128ba.setBodyIcon(
new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/MapObjs/Ross128ba.png"));
Ross128SolarSystem.Ross128ba.setDimensionInfo(ConfigHandler.ross128BAID, WorldProviderRoss128ba.class);
- Ross128SolarSystem.Ross128ba.setTierRequired(
- LoaderReference.GalaxySpace ? Math.min(ConfigHandler.ross128btier + 2, 8) : 3);
+ Ross128SolarSystem.Ross128ba
+ .setTierRequired(LoaderReference.GalaxySpace ? Math.min(ConfigHandler.ross128btier + 2, 8) : 3);
GalaxyRegistry.registerSolarSystem(Ross128SolarSystem.Ross128System);
GalaxyRegistry.registerPlanet(Ross128SolarSystem.Ross128b);
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java
index e2271aaeff..b5d7e7cb5d 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java
@@ -1,38 +1,32 @@
/*
- * 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.crossmod.galaxySpace.tileEntity;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
import micdoodle8.mods.galacticraft.core.GalacticraftCore;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+
public class DysonSwarmSunReplacement extends MetaTileEntity {
+
private static boolean wasBuild;
private static long dysonObjs;
private static long swarmControllers;
@@ -47,16 +41,12 @@ public class DysonSwarmSunReplacement extends MetaTileEntity {
public void toggle() {
if (!wasBuild) {
- GalacticraftCore.solarSystemSol
- .getMainStar()
- .setBodyIcon(new ResourceLocation(
- GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/moon.png"));
+ GalacticraftCore.solarSystemSol.getMainStar().setBodyIcon(
+ new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/moon.png"));
wasBuild = !wasBuild;
} else {
- GalacticraftCore.solarSystemSol
- .getMainStar()
- .setBodyIcon(new ResourceLocation(
- GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/sun.png"));
+ GalacticraftCore.solarSystemSol.getMainStar().setBodyIcon(
+ new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/sun.png"));
wasBuild = !wasBuild;
}
}
@@ -94,8 +84,8 @@ public class DysonSwarmSunReplacement extends MetaTileEntity {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- aBaseMetaTileEntity.increaseStoredEnergyUnits(
- (DysonSwarmSunReplacement.dysonObjs * 10000) / swarmControllers, true);
+ aBaseMetaTileEntity
+ .increaseStoredEnergyUnits((DysonSwarmSunReplacement.dysonObjs * 10000) / swarmControllers, true);
}
public boolean isEnetOutput() {
@@ -118,8 +108,8 @@ public class DysonSwarmSunReplacement extends MetaTileEntity {
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3, boolean b4) {
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3,
+ boolean b4) {
return new ITexture[0];
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java
index 77dc5c2c22..1bdcc942ba 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.galaxySpace.tileEntity;
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java
index ea4e349ca8..0502f26f9c 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.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.crossmod.openComputers;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_NBT_DataBase {
@@ -96,8 +88,8 @@ public class GT_NBT_DataBase {
this.id = id;
}
- public static GT_NBT_DataBase makeNewWithoutRegister(
- String mDataName, String mDataTitle, NBTTagCompound tagCompound) {
+ public static GT_NBT_DataBase makeNewWithoutRegister(String mDataName, String mDataTitle,
+ NBTTagCompound tagCompound) {
return new GT_NBT_DataBase(tagCompound, mDataName, mDataTitle, Long.MIN_VALUE);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
index 80c52c56a3..30c2b3b1d7 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
@@ -1,49 +1,44 @@
/*
- * 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.crossmod.openComputers;
-import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
-import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-import com.github.bartimaeusnek.bartworks.API.SideReference;
-import com.google.common.collect.BiMap;
-import com.google.common.collect.HashBiMap;
-import cpw.mods.fml.common.Optional;
-import gregtech.api.enums.ItemList;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.behaviors.Behaviour_DataOrb;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+
import li.cil.oc.api.machine.Arguments;
import li.cil.oc.api.machine.Callback;
import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
+import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
+import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+
+import cpw.mods.fml.common.Optional;
+import gregtech.api.enums.ItemList;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.behaviors.Behaviour_DataOrb;
+
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")
public class TileEntity_GTDataServer extends TileEntity
implements ISidedInventory, ITileAddsInformation, ITileHasDifferentTextureSides, SimpleComponent {
@@ -63,8 +58,7 @@ public class TileEntity_GTDataServer extends TileEntity
public Object[] listData(Context context, Arguments args) {
Set<String> ret = new HashSet<>();
for (Map.Entry<Long, GT_NBT_DataBase> entry : OrbDataBase.entrySet()) {
- ret.add((entry.getValue().getId() + Long.MAX_VALUE) + ". "
- + entry.getValue().getmDataTitle());
+ ret.add((entry.getValue().getId() + Long.MAX_VALUE) + ". " + entry.getValue().getmDataTitle());
}
return ret.toArray(new String[0]);
}
@@ -72,7 +66,7 @@ public class TileEntity_GTDataServer extends TileEntity
@Optional.Method(modid = "OpenComputers")
@Callback
public Object[] imprintOrb(Context context, Arguments args) {
- return new Object[] {false};
+ return new Object[] { false };
}
private boolean isServerSide() {
@@ -107,10 +101,9 @@ public class TileEntity_GTDataServer extends TileEntity
short mapID = GT_Utility.ItemNBT.getMapID(this.mItems[0]);
byte data = (byte) (bookTitle.isEmpty() ? punchcardData.isEmpty() ? mapID != -1 ? 3 : -1 : 2 : 1);
- String title =
- data == 1 ? bookTitle : data == 2 ? punchcardData : data == 3 ? "" + mapID : "Custom Data";
- String name = data == 1
- ? "eBook"
+ String title = data == 1 ? bookTitle
+ : data == 2 ? punchcardData : data == 3 ? "" + mapID : "Custom Data";
+ String name = data == 1 ? "eBook"
: data == 2 ? "Punch Card Data" : data == 3 ? "Map Data" : "Custom Data";
if (GT_NBT_DataBase.getIdFromTag(this.mItems[0].getTagCompound()) == null) {
this.OrbDataBase.put(
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java
index 7caac936d5..360ccff458 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java
@@ -1,38 +1,31 @@
/*
- * 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.crossmod.tectech;
+import java.util.ArrayList;
+import java.util.Iterator;
+
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ManualTrafo;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
-import java.util.ArrayList;
-import java.util.Iterator;
-@SuppressWarnings({"unused", "RedundantSuppression"})
+@SuppressWarnings({ "unused", "RedundantSuppression" })
public class TT_TileEntity_ManualTrafo extends GT_TileEntity_ManualTrafo {
ArrayList<GT_MetaTileEntity_Hatch_EnergyMulti> mTTEnergyHatches = new ArrayList<>();
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java
index 593fcf33b8..f5e07545b1 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java
@@ -1,38 +1,32 @@
/*
- * 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.crossmod.tectech;
+import java.util.List;
+
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.util.GT_Utility;
-import java.util.List;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
public interface TecTechEnabledMulti {
@@ -57,7 +51,7 @@ public interface TecTechEnabledMulti {
maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
}
}
- return new long[] {storedEnergy, maxEnergy};
+ return new long[] { storedEnergy, maxEnergy };
}
default String[] getInfoDataArray(GT_MetaTileEntity_MultiBlockBase multiBlockBase) {
@@ -81,29 +75,55 @@ public interface TecTechEnabledMulti {
}
return new String[] {
- StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(multiBlockBase.mProgresstime / 20) + EnumChatFormatting.RESET + " s / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(multiBlockBase.mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s",
- StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU",
- StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(-multiBlockBase.mEUt) + EnumChatFormatting.RESET + " EU/t",
- StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(multiBlockBase.getMaxInputVoltage()) + EnumChatFormatting.RESET
- + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier")
- + ": " + EnumChatFormatting.YELLOW
- + GT_Values.VN[GT_Utility.getTier(multiBlockBase.getMaxInputVoltage())] + EnumChatFormatting.RESET,
- StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED
- + (multiBlockBase.getIdealStatus() - multiBlockBase.getRepairStatus()) + EnumChatFormatting.RESET
- + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
- + ": " + EnumChatFormatting.YELLOW
- + (float) multiBlockBase.mEfficiency / 100.0F + EnumChatFormatting.RESET + " %",
- StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN
- + mPollutionReduction + EnumChatFormatting.RESET + " %",
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(multiBlockBase.mProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(multiBlockBase.mMaxProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s",
+ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(storedEnergy)
+ + EnumChatFormatting.RESET
+ + " EU / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(maxEnergy)
+ + EnumChatFormatting.RESET
+ + " EU",
+ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": "
+ + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(-multiBlockBase.mEUt)
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(multiBlockBase.getMaxInputVoltage())
+ + EnumChatFormatting.RESET
+ + " EU/t(*2A) "
+ + StatCollector.translateToLocal("GT5U.machines.tier")
+ + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Values.VN[GT_Utility.getTier(multiBlockBase.getMaxInputVoltage())]
+ + EnumChatFormatting.RESET,
+ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ + EnumChatFormatting.RED
+ + (multiBlockBase.getIdealStatus() - multiBlockBase.getRepairStatus())
+ + EnumChatFormatting.RESET
+ + " "
+ + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
+ + ": "
+ + EnumChatFormatting.YELLOW
+ + (float) multiBlockBase.mEfficiency / 100.0F
+ + EnumChatFormatting.RESET
+ + " %",
+ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": "
+ + EnumChatFormatting.GREEN
+ + mPollutionReduction
+ + EnumChatFormatting.RESET
+ + " %",
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java
index 83d1604d11..67c0ea56f3 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java
@@ -1,39 +1,32 @@
/*
- * 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.crossmod.tectech;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.LoaderReference;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.technus.tectech.recipe.TT_recipeAdder;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class TecTechResearchLoader {
@@ -51,17 +44,13 @@ public class TecTechResearchLoader {
256,
BW_Util.getMachineVoltageFromTier(7),
24,
- new Object[] {
- ItemRegistry.voidminer[0].copy(),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 9L),
- Materials.BlackPlutonium.getPlates(3),
- ItemList.Electric_Motor_ZPM.get(9L),
- ItemList.Sensor_ZPM.get(9L),
- ItemList.Field_Generator_ZPM.get(9L),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.BlackPlutonium, 36L)
- },
- new FluidStack[] {new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Krypton.getFluidOrGas(20000)
- },
+ new Object[] { ItemRegistry.voidminer[0].copy(),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 9L),
+ Materials.BlackPlutonium.getPlates(3), ItemList.Electric_Motor_ZPM.get(9L),
+ ItemList.Sensor_ZPM.get(9L), ItemList.Field_Generator_ZPM.get(9L),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.BlackPlutonium, 36L) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440),
+ WerkstoffLoader.Krypton.getFluidOrGas(20000) },
ItemRegistry.voidminer[1].copy(),
216000,
BW_Util.getMachineVoltageFromTier(7));
@@ -72,18 +61,13 @@ public class TecTechResearchLoader {
512,
BW_Util.getMachineVoltageFromTier(8),
64,
- new Object[] {
- ItemRegistry.voidminer[1].copy(),
- GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 9L),
- Materials.Neutronium.getPlates(3),
- ItemList.Electric_Motor_UV.get(9L),
- ItemList.Sensor_UV.get(9L),
- ItemList.Field_Generator_UV.get(9L),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 36L)
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Oganesson.getFluidOrGas(20000)
- },
+ new Object[] { ItemRegistry.voidminer[1].copy(),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 9L),
+ Materials.Neutronium.getPlates(3), ItemList.Electric_Motor_UV.get(9L),
+ ItemList.Sensor_UV.get(9L), ItemList.Field_Generator_UV.get(9L),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 36L) },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440),
+ WerkstoffLoader.Oganesson.getFluidOrGas(20000) },
ItemRegistry.voidminer[2].copy(),
432000,
BW_Util.getMachineVoltageFromTier(8));
@@ -95,50 +79,44 @@ public class TecTechResearchLoader {
48,
BW_Util.getMachineVoltageFromTier(8),
8,
- new Object[] {
- ItemList.Machine_Multi_ImplosionCompressor.get(1L),
- Materials.Neutronium.getBlocks(5),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmium, 64),
- GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Osmium, 64),
- GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 64),
- ItemList.Electric_Piston_UV.get(64),
- },
- new FluidStack[] {
- new FluidStack(solderIndalloy, 1440),
- Materials.Osmium.getMolten(1440),
- Materials.Neutronium.getMolten(1440)
- },
+ new Object[] { ItemList.Machine_Multi_ImplosionCompressor.get(1L), Materials.Neutronium.getBlocks(5),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmium, 64),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Osmium, 64),
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 64),
+ ItemList.Electric_Piston_UV.get(64), },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440), Materials.Osmium.getMolten(1440),
+ Materials.Neutronium.getMolten(1440) },
ItemRegistry.eic.copy(),
240000,
BW_Util.getMachineVoltageFromTier(8));
- // BartWorksCrossmod.LOGGER.info("Nerfing Assembly Lines >= LuV Recipes to run with TecTech!");
- // HashSet<GT_Recipe.GT_Recipe_AssemblyLine> toRem = new HashSet<>();
- // for (GT_Recipe.GT_Recipe_AssemblyLine recipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes){
- // if (recipe.mEUt >= BW_Util.getTierVoltage(6) && !GT_Utility.areStacksEqual(recipe.mResearchItem,
+ // BartWorksCrossmod.LOGGER.info("Nerfing Assembly Lines >= LuV Recipes to run with TecTech!");
+ // HashSet<GT_Recipe.GT_Recipe_AssemblyLine> toRem = new HashSet<>();
+ // for (GT_Recipe.GT_Recipe_AssemblyLine recipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes){
+ // if (recipe.mEUt >= BW_Util.getTierVoltage(6) && !GT_Utility.areStacksEqual(recipe.mResearchItem,
// CustomItemList.UnusedStuff.get(1L))){
- // String modId = GameRegistry.findUniqueIdentifierFor(recipe.mOutput.getItem()).modId;
- // if (!modId.equalsIgnoreCase("tectech"))
- // if (!modId.equalsIgnoreCase("gregtech") || modId.equalsIgnoreCase("gregtech") &&
+ // String modId = GameRegistry.findUniqueIdentifierFor(recipe.mOutput.getItem()).modId;
+ // if (!modId.equalsIgnoreCase("tectech"))
+ // if (!modId.equalsIgnoreCase("gregtech") || modId.equalsIgnoreCase("gregtech") &&
// (recipe.mOutput.getItemDamage() < 15000 || recipe.mOutput.getItemDamage() > 16999))
- // toRem.add(recipe);
- // }
- // }
- // HashSet<GT_Recipe> toRemVisualScanner = new HashSet<>();
- // HashSet<GT_Recipe> toRemVisualAssLine = new HashSet<>();
- // GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.removeAll(toRem);
+ // toRem.add(recipe);
+ // }
+ // }
+ // HashSet<GT_Recipe> toRemVisualScanner = new HashSet<>();
+ // HashSet<GT_Recipe> toRemVisualAssLine = new HashSet<>();
+ // GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.removeAll(toRem);
//
- // for (GT_Recipe.GT_Recipe_AssemblyLine recipe : toRem){
- // GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.stream().filter(re ->
+ // for (GT_Recipe.GT_Recipe_AssemblyLine recipe : toRem){
+ // GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.stream().filter(re ->
// GT_Utility.areStacksEqual(re.mOutputs[0],recipe.mOutput)).forEach(toRemVisualAssLine::add);
- // GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.mRecipeList.stream().filter(re ->
+ // GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.mRecipeList.stream().filter(re ->
// GT_Utility.areStacksEqual(re.mOutputs[0],recipe.mOutput)).forEach(toRemVisualScanner::add);
- // TT_recipeAdder.addResearchableAssemblylineRecipe(recipe.mResearchItem, recipe.mResearchTime,
+ // TT_recipeAdder.addResearchableAssemblylineRecipe(recipe.mResearchItem, recipe.mResearchTime,
// recipe.mResearchTime/1000, recipe.mEUt, GT_Utility.getTier(recipe.mEUt)-2, recipe.mInputs,
// recipe.mFluidInputs, recipe.mOutput, recipe.mDuration, recipe.mEUt);
- // }
+ // }
//
- // GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.mRecipeList.removeAll(toRemVisualScanner);
- // GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.removeAll(toRemVisualAssLine);
+ // GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.mRecipeList.removeAll(toRemVisualScanner);
+ // GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.removeAll(toRemVisualAssLine);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java
index f8d0db5ea6..e61bc68cee 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.tectech.helper;
@@ -25,6 +16,7 @@ package com.github.bartimaeusnek.crossmod.tectech.helper;
import gregtech.api.enums.HeatingCoilLevel;
public interface IHasCoils {
+
void setCoilHeat(HeatingCoilLevel coilMeta);
HeatingCoilLevel getCoilHeat();
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java
index af3059ea7c..57c58f5d3a 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java
@@ -1,23 +1,14 @@
/*
- * 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.crossmod.tectech.helper;
@@ -25,6 +16,7 @@ package com.github.bartimaeusnek.crossmod.tectech.helper;
import com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel;
+
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
@@ -33,13 +25,13 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
public class TecTechUtils {
@Deprecated
- public static boolean addEnergyInputToMachineList(
- TecTechEnabledMulti baseTE, IGregTechTileEntity te, int aBaseCasingIndex) {
+ public static boolean addEnergyInputToMachineList(TecTechEnabledMulti baseTE, IGregTechTileEntity te,
+ int aBaseCasingIndex) {
return addEnergyInputToMachineList(baseTE, te, aBaseCasingIndex, -1) != -1;
}
- public static int addEnergyInputToMachineList(
- TecTechEnabledMulti baseTE, IGregTechTileEntity te, int aBaseCasingIndex, int aTier) {
+ public static int addEnergyInputToMachineList(TecTechEnabledMulti baseTE, IGregTechTileEntity te,
+ int aBaseCasingIndex, int aTier) {
if (te == null || !(te.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch)) return -1;
else {
GT_MetaTileEntity_Hatch mte = (GT_MetaTileEntity_Hatch) te.getMetaTileEntity();
@@ -47,8 +39,7 @@ public class TecTechUtils {
if (mte.mTier != aTier && aTier != -1) return -1;
if (mte instanceof GT_MetaTileEntity_Hatch_EnergyTunnel)
- if (baseTE.getVanillaEnergyHatches().isEmpty()
- && baseTE.getTecTechEnergyMultis().isEmpty())
+ if (baseTE.getVanillaEnergyHatches().isEmpty() && baseTE.getTecTechEnergyMultis().isEmpty())
baseTE.getTecTechEnergyTunnels().add((GT_MetaTileEntity_Hatch_EnergyTunnel) mte);
else return -1;
else if (baseTE.getTecTechEnergyTunnels().isEmpty()) {
@@ -104,10 +95,8 @@ public class TecTechUtils {
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : multi.getTecTechEnergyMultis())
hasDrained &= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false);
- return hasDrained
- && (multi.getVanillaEnergyHatches().size() > 0
- || multi.getTecTechEnergyTunnels().size() > 0
- || multi.getTecTechEnergyMultis().size() > 0);
+ return hasDrained && (multi.getVanillaEnergyHatches().size() > 0 || multi.getTecTechEnergyTunnels().size() > 0
+ || multi.getTecTechEnergyMultis().size() > 0);
}
public static long getnominalVoltageTT(TecTechEnabledMulti base) {
@@ -179,6 +168,6 @@ public class TecTechUtils {
}
public static long getEUPerTickFromLaser(GT_MetaTileEntity_Hatch_EnergyTunnel tHatch) {
- return tHatch.Amperes * tHatch.maxEUInput() /* - (tHatch.Amperes / 20)*/;
+ return tHatch.Amperes * tHatch.maxEUInput() /* - (tHatch.Amperes / 20) */;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java
index 77677ed79b..5bd2f68fe9 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java
@@ -1,29 +1,21 @@
/*
- * 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.crossmod.tectech.tileentites.tiered;
import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel;
import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Energy;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
@@ -69,8 +61,8 @@ public interface LowPowerLaser extends IMetaTileEntity, IConnectsToEnergyTunnel
byte opposite = GT_Utility.getOppositeSide(front);
for (short dist = 1; dist < 250; ++dist) {
- IGregTechTileEntity tGTTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityAtSideAndDistance(front, dist);
+ IGregTechTileEntity tGTTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityAtSideAndDistance(front, dist);
if (tGTTileEntity == null || tGTTileEntity.getColorization() != color) {
return;
}
@@ -80,8 +72,7 @@ public interface LowPowerLaser extends IMetaTileEntity, IConnectsToEnergyTunnel
return;
}
- if (aMetaTileEntity instanceof LowPowerLaser
- && ((LowPowerLaser) aMetaTileEntity).isReceiver()
+ if (aMetaTileEntity instanceof LowPowerLaser && ((LowPowerLaser) aMetaTileEntity).isReceiver()
&& opposite == tGTTileEntity.getFrontFacing()) {
if (this.maxEUOutput() > ((LowPowerLaser) aMetaTileEntity).maxEUInput()
|| this.getAMPERES() > ((LowPowerLaser) aMetaTileEntity).getAMPERES()) {
@@ -95,14 +86,11 @@ public interface LowPowerLaser extends IMetaTileEntity, IConnectsToEnergyTunnel
this.getAMPERES() * 20L * this.maxEUOutput(),
Math.min(
((LowPowerLaser) aMetaTileEntity).maxEUStore()
- - aMetaTileEntity
- .getBaseMetaTileEntity()
- .getStoredEU(),
+ - aMetaTileEntity.getBaseMetaTileEntity().getStoredEU(),
aBaseMetaTileEntity.getStoredEU()));
this.setEUVar(aBaseMetaTileEntity.getStoredEU() - diff);
((LowPowerLaser) aMetaTileEntity)
- .setEUVar(
- aMetaTileEntity.getBaseMetaTileEntity().getStoredEU() + diff);
+ .setEUVar(aMetaTileEntity.getBaseMetaTileEntity().getStoredEU() + diff);
}
return;
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java
index f6db55e4d3..d2a68b72aa 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java
@@ -1,80 +1,54 @@
/*
- * 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.crossmod.tectech.tileentites.tiered;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import java.util.Optional;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
+
public abstract class TT_Abstract_LowPowerLaserThingy extends GT_MetaTileEntity_TieredMachineBlock
implements LowPowerLaser {
protected long AMPERES;
- public TT_Abstract_LowPowerLaserThingy(
- int aID,
- String aName,
- String aNameRegional,
- int aTier,
- long aAmperes,
- int aInvSlotCount,
- String aDescription,
- ITexture... aTextures) {
+ public TT_Abstract_LowPowerLaserThingy(int aID, String aName, String aNameRegional, int aTier, long aAmperes,
+ int aInvSlotCount, String aDescription, ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
this.AMPERES = aAmperes;
}
- public TT_Abstract_LowPowerLaserThingy(
- int aID,
- String aName,
- String aNameRegional,
- int aTier,
- long aAmperes,
- int aInvSlotCount,
- String[] aDescription,
- ITexture... aTextures) {
+ public TT_Abstract_LowPowerLaserThingy(int aID, String aName, String aNameRegional, int aTier, long aAmperes,
+ int aInvSlotCount, String[] aDescription, ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
this.AMPERES = aAmperes;
}
- public TT_Abstract_LowPowerLaserThingy(
- String aName, int aTier, long aAmperes, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
+ public TT_Abstract_LowPowerLaserThingy(String aName, int aTier, long aAmperes, int aInvSlotCount,
+ String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
this.AMPERES = aAmperes;
}
- public TT_Abstract_LowPowerLaserThingy(
- String aName,
- int aTier,
- long aAmperes,
- int aInvSlotCount,
- String[] aDescription,
- ITexture[][][] aTextures) {
+ public TT_Abstract_LowPowerLaserThingy(String aName, int aTier, long aAmperes, int aInvSlotCount,
+ String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
this.AMPERES = aAmperes;
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java
index 996a106b4b..382fa74a3a 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java
@@ -1,29 +1,21 @@
/*
- * 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.crossmod.tectech.tileentites.tiered;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -32,13 +24,13 @@ import gregtech.api.util.GT_Utility;
public class TT_MetaTileEntity_LowPowerLaserBox extends TT_Abstract_LowPowerLaserThingy {
- public TT_MetaTileEntity_LowPowerLaserBox(
- int aID, String aName, String aNameRegional, int aTier, long aAmperes, ITexture... aTextures) {
+ public TT_MetaTileEntity_LowPowerLaserBox(int aID, String aName, String aNameRegional, int aTier, long aAmperes,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, aAmperes, 0, new String[0], aTextures);
}
- public TT_MetaTileEntity_LowPowerLaserBox(
- String aName, int aTier, long aAmperes, String[] aDescription, ITexture[][][] aTextures) {
+ public TT_MetaTileEntity_LowPowerLaserBox(String aName, int aTier, long aAmperes, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aAmperes, 0, aDescription, aTextures);
}
@@ -95,7 +87,11 @@ public class TT_MetaTileEntity_LowPowerLaserBox extends TT_Abstract_LowPowerLase
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
return new TT_MetaTileEntity_LowPowerLaserBox(
- this.mName, this.mTier, this.AMPERES, this.mDescriptionArray, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.AMPERES,
+ this.mDescriptionArray,
+ this.mTextures);
}
@Override
@@ -124,77 +120,48 @@ public class TT_MetaTileEntity_LowPowerLaserBox extends TT_Abstract_LowPowerLase
ITexture[][][] rTextures = new ITexture[12][17][];
for (byte i = -1; i < 16; ++i) {
- rTextures[0][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[1][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[2][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier]
- };
- rTextures[3][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier]
- };
- rTextures[4][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier]
- };
- rTextures[5][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier]
- };
- rTextures[6][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
- rTextures[7][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
- rTextures[8][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
- rTextures[9][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier]
- };
- rTextures[10][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier]
- };
- rTextures[11][i + 1] = new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
- com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier]
- };
+ rTextures[0][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[1][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[2][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[this.mTier] };
+ rTextures[3][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier] };
+ rTextures[4][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier] };
+ rTextures[5][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT[this.mTier] };
+ rTextures[6][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
+ rTextures[7][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
+ rTextures[8][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
+ rTextures[9][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier] };
+ rTextures[10][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier] };
+ rTextures[11][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1],
+ com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT[this.mTier] };
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
return this.mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aActive ? 0 : 6)][aColorIndex + 1];
}
@Override
public String[] getDescription() {
- return new String[] {
- "Like a Tranformer... but for LAZORZ",
- "Transfer rate: " + ChatColorHelper.YELLOW + GT_Utility.formatNumbers(this.getTotalPower())
- + ChatColorHelper.WHITE + " EU/t",
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { "Like a Tranformer... but for LAZORZ",
+ "Transfer rate: " + ChatColorHelper.YELLOW
+ + GT_Utility.formatNumbers(this.getTotalPower())
+ + ChatColorHelper.WHITE
+ + " EU/t",
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java
index 0aa5cbee2d..1b7b4441ef 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.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.crossmod.tectech.tileentites.tiered;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoTunnel;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.util.GT_Utility;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
@SuppressWarnings("deprecation")
public class TT_MetaTileEntity_LowPowerLaserDynamo extends GT_MetaTileEntity_Hatch_DynamoTunnel
@@ -39,15 +32,19 @@ public class TT_MetaTileEntity_LowPowerLaserDynamo extends GT_MetaTileEntity_Hat
super(aID, aName, aNameRegional, aTier, aAmp);
}
- public TT_MetaTileEntity_LowPowerLaserDynamo(
- String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) {
+ public TT_MetaTileEntity_LowPowerLaserDynamo(String aName, int aTier, int aAmp, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aAmp, aDescription, aTextures);
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new TT_MetaTileEntity_LowPowerLaserDynamo(
- this.mName, this.mTier, this.Amperes, this.mDescription, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.Amperes,
+ this.mDescription,
+ this.mTextures);
}
@Override
@@ -72,13 +69,13 @@ public class TT_MetaTileEntity_LowPowerLaserDynamo extends GT_MetaTileEntity_Hat
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": "
- + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.getTotalPower())
- + EnumChatFormatting.RESET + " EU/t",
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { this.mDescription,
+ StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(this.getTotalPower())
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java
index 3cacc5e843..025e80a9c6 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.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.crossmod.tectech.tileentites.tiered;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.util.GT_Utility;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
@SuppressWarnings("deprecation")
public class TT_MetaTileEntity_LowPowerLaserHatch extends GT_MetaTileEntity_Hatch_EnergyTunnel
@@ -39,26 +32,30 @@ public class TT_MetaTileEntity_LowPowerLaserHatch extends GT_MetaTileEntity_Hatc
super(aID, aName, aNameRegional, aTier, aAmp);
}
- public TT_MetaTileEntity_LowPowerLaserHatch(
- String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) {
+ public TT_MetaTileEntity_LowPowerLaserHatch(String aName, int aTier, int aAmp, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aAmp, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": "
- + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.getTotalPower())
- + EnumChatFormatting.RESET + " EU/t",
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { this.mDescription,
+ StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(this.getTotalPower())
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new TT_MetaTileEntity_LowPowerLaserHatch(
- this.mName, this.mTier, this.Amperes, this.mDescription, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.Amperes,
+ this.mDescription,
+ this.mTextures);
}
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java
index 4be79bfd10..087215f36a 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java
@@ -1,29 +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.crossmod.tectech.tileentites.tiered;
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import net.minecraft.block.Block;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -35,11 +34,6 @@ import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Client;
import ic2.core.Ic2Items;
-import java.util.ArrayList;
-import java.util.HashSet;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Cable implements LowPowerLaser {
@@ -47,15 +41,8 @@ public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Ca
super(aID, aName, aNameRegional, 0.25f, Materials.BorosilicateGlass, 0, 0, 0, false, false);
}
- public TT_MetaTileEntity_Pipe_Energy_LowPower(
- String aName,
- float aThickNess,
- Materials aMaterial,
- long aCableLossPerMeter,
- long aAmperage,
- long aVoltage,
- boolean aInsulated,
- boolean aCanShock) {
+ public TT_MetaTileEntity_Pipe_Energy_LowPower(String aName, float aThickNess, Materials aMaterial,
+ long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) {
super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock);
}
@@ -80,33 +67,36 @@ public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Ca
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aConnections,
- byte aColorIndex,
- boolean aConnected,
- boolean aRedstone) {
- return new ITexture[] {
- TextureFactory.of(
- Block.getBlockFromItem(Ic2Items.glassFiberCableBlock.getItem()),
- Ic2Items.glassFiberCableBlock.getItemDamage(),
- ForgeDirection.getOrientation(aSide))
- };
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections,
+ byte aColorIndex, boolean aConnected, boolean aRedstone) {
+ return new ITexture[] { TextureFactory.of(
+ Block.getBlockFromItem(Ic2Items.glassFiberCableBlock.getItem()),
+ Ic2Items.glassFiberCableBlock.getItemDamage(),
+ ForgeDirection.getOrientation(aSide)) };
}
@Override
public String[] getDescription() {
- return new String[] {
- "Primitive Laser Cable intended for Low Power Applications",
- "Does not auto-connect",
- "Does not turn or bend",
- ChatColorHelper.WHITE + "Must be " + ChatColorHelper.YELLOW + "c" + ChatColorHelper.RED + "o"
- + ChatColorHelper.BLUE + "l" + ChatColorHelper.DARKPURPLE + "o" + ChatColorHelper.GOLD + "r"
- + ChatColorHelper.DARKRED + "e" + ChatColorHelper.DARKGREEN + "d" + ChatColorHelper.WHITE
- + " in order to work",
- BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()
- };
+ return new String[] { "Primitive Laser Cable intended for Low Power Applications", "Does not auto-connect",
+ "Does not turn or bend",
+ ChatColorHelper.WHITE + "Must be "
+ + ChatColorHelper.YELLOW
+ + "c"
+ + ChatColorHelper.RED
+ + "o"
+ + ChatColorHelper.BLUE
+ + "l"
+ + ChatColorHelper.DARKPURPLE
+ + "o"
+ + ChatColorHelper.GOLD
+ + "r"
+ + ChatColorHelper.DARKRED
+ + "e"
+ + ChatColorHelper.DARKGREEN
+ + "d"
+ + ChatColorHelper.WHITE
+ + " in order to work",
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
}
@Override
@@ -152,8 +142,8 @@ public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Ca
@Override
@Deprecated
@SuppressWarnings("deprecation")
- public long transferElectricity(
- byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList) {
+ public long transferElectricity(byte aSide, long aVoltage, long aAmperage,
+ ArrayList<TileEntity> aAlreadyPassedTileEntityList) {
return 0L;
}
@@ -163,14 +153,14 @@ public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Ca
}
@Override
- public boolean letsIn(
- GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ public boolean letsIn(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable,
+ ICoverable aTileEntity) {
return true;
}
@Override
- public boolean letsOut(
- GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ public boolean letsOut(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable,
+ ICoverable aTileEntity) {
return true;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java b/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java
index e64bcab13f..d9cf64f221 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java
@@ -1,31 +1,34 @@
package com.github.bartimaeusnek.crossmod.tgregworks;
-import com.github.bartimaeusnek.bartworks.API.LoaderReference;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
+
import net.minecraftforge.common.config.Property;
+
import tconstruct.library.TConstructRegistry;
import vexatos.tgregworks.TGregworks;
import vexatos.tgregworks.integration.TGregRegistry;
import vexatos.tgregworks.item.ItemTGregPart;
import vexatos.tgregworks.reference.Config;
+import com.github.bartimaeusnek.bartworks.API.LoaderReference;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+
@Mod(
modid = MaterialsInjector.MOD_ID,
name = MaterialsInjector.NAME,
version = MaterialsInjector.VERSION,
- dependencies = "required-after:IC2; "
- + "required-after:gregtech; "
+ dependencies = "required-after:IC2; " + "required-after:gregtech; "
+ "required-after:bartworks;"
+ "before:TGregworks;"
+ "before:miscutils; ")
@@ -57,10 +60,7 @@ public class MaterialsInjector {
try {
getFields();
getMethodes();
- } catch (IllegalArgumentException
- | IllegalAccessException
- | NoSuchFieldException
- | NoSuchMethodException
+ } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | NoSuchMethodException
| SecurityException e) {
MainMod.LOGGER.catching(e);
FMLCommonHandler.instance().exitJava(1, true);
@@ -81,8 +81,8 @@ public class MaterialsInjector {
getGlobalMultiplierMethod = TGregRegistry.class.getDeclaredMethod("getGlobalMultiplier", String.class);
getGlobalMultiplierMethod.setAccessible(true);
- getGlobalMultiplierMethodTwoArguments =
- TGregRegistry.class.getDeclaredMethod("getGlobalMultiplier", String.class, double.class);
+ getGlobalMultiplierMethodTwoArguments = TGregRegistry.class
+ .getDeclaredMethod("getGlobalMultiplier", String.class, double.class);
getGlobalMultiplierMethodTwoArguments.setAccessible(true);
getMultiplierMethod = TGregRegistry.class.getDeclaredMethod("getMultiplier", Materials.class, String.class);
@@ -102,9 +102,7 @@ public class MaterialsInjector {
MainMod.LOGGER.info("Registering TGregworks - BartWorks tool parts.");
Werkstoff.werkstoffHashSet.stream()
.filter(x -> x.hasItemType(OrePrefixes.gem) || x.hasItemType(OrePrefixes.plate))
- .map(Werkstoff::getBridgeMaterial)
- .filter(x -> x.mMetaItemSubID == -1)
- .filter(x -> x.mDurability != 0)
+ .map(Werkstoff::getBridgeMaterial).filter(x -> x.mMetaItemSubID == -1).filter(x -> x.mDurability != 0)
.forEach(m -> {
setConfigProps(m);
registerParts(m);
@@ -136,8 +134,8 @@ public class MaterialsInjector {
private static void setConfigProps(Materials m) {
if (TGregworks.config.get(Config.Category.Enable, m.mName, true).getBoolean(true)) {
TGregworks.registry.toolMaterials.add(m);
- Property configProp =
- TGregworks.config.get(Config.onMaterial(Config.MaterialID), m.mName, 0, null, 0, 100000);
+ Property configProp = TGregworks.config
+ .get(Config.onMaterial(Config.MaterialID), m.mName, 0, null, 0, 100000);
configProps.put(m, configProp);
configIDs.add(configProp.getInt());
}
@@ -150,21 +148,18 @@ public class MaterialsInjector {
m.mName,
m.mLocalizedName,
m.mToolQuality,
- (int) (m.mDurability
- * (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.Durability)
+ (int) (m.mDurability * (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.Durability)
* (float) getMultiplierMethod.invoke(TGregworks.registry, m, Config.Durability)), // Durability
- (int) (m.mToolSpeed
- * 100F
+ (int) (m.mToolSpeed * 100F
* (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.MiningSpeed)
- * (float)
- getMultiplierMethod.invoke(TGregworks.registry, m, Config.MiningSpeed)), // Mining speed
- (int) (m.mToolQuality
- * (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.Attack)
+ * (float) getMultiplierMethod.invoke(TGregworks.registry, m, Config.MiningSpeed)), // Mining
+ // speed
+ (int) (m.mToolQuality * (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.Attack)
* (float) getMultiplierMethod.invoke(TGregworks.registry, m, Config.Attack)), // Attack
(m.mToolQuality - 0.5F)
* (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.HandleModifier)
- * (float) getMultiplierMethod.invoke(
- TGregworks.registry, m, Config.HandleModifier), // Handle Modifier
+ * (float) getMultiplierMethod.invoke(TGregworks.registry, m, Config.HandleModifier), // Handle
+ // Modifier
(int) getReinforcedLevelMethod.invoke(TGregworks.registry, m),
(float) getStoneboundLevelMethod.invoke(TGregworks.registry, m),
"",
@@ -175,8 +170,7 @@ public class MaterialsInjector {
throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
TConstructRegistry.addBowMaterial(
matID,
- (int) ((float) m.mToolQuality
- * 10F
+ (int) ((float) m.mToolQuality * 10F
* (float) getGlobalMultiplierMethod.invoke(TGregworks.registry, Config.BowDrawSpeed)
* (float) getMultiplierMethod.invoke(TGregworks.registry, m, Config.BowDrawSpeed)),
(((float) m.mToolQuality) - 0.5F)
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java
index 07adc7e752..28d5ba07cc 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java
@@ -1,55 +1,46 @@
/*
- * 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.crossmod.thaumcraft;
public class CustomAspects {
- // static Constructor aspectConstructor;
- // static Object TRADE;
- // static Object UNIVERSE;
- // static Object SCIENCE;
- // static Object[] tmpArray = new Object[3];
- // static{
- // try {
- // aspectConstructor = ThaumcraftHandler.AspectAdder.mAspectClass.getConstructor(String.class,int.class,
+ // static Constructor aspectConstructor;
+ // static Object TRADE;
+ // static Object UNIVERSE;
+ // static Object SCIENCE;
+ // static Object[] tmpArray = new Object[3];
+ // static{
+ // try {
+ // aspectConstructor = ThaumcraftHandler.AspectAdder.mAspectClass.getConstructor(String.class,int.class,
// Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,1).getClass(), ResourceLocation.class,int.class);
- // tmpArray[0] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
- // tmpArray[1] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
- // tmpArray[2] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
- // Array.set(tmpArray[0],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("EXCHANGE").get(null));
- // Array.set(tmpArray[0],1,ThaumcraftHandler.AspectAdder.mAspectClass.getField("GREED").get(null));
- // TRADE = aspectConstructor.newInstance("Artis",0x00FF00, tmpArray[0],new
+ // tmpArray[0] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
+ // tmpArray[1] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
+ // tmpArray[2] = Array.newInstance(ThaumcraftHandler.AspectAdder.mAspectClass,2);
+ // Array.set(tmpArray[0],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("EXCHANGE").get(null));
+ // Array.set(tmpArray[0],1,ThaumcraftHandler.AspectAdder.mAspectClass.getField("GREED").get(null));
+ // TRADE = aspectConstructor.newInstance("Artis",0x00FF00, tmpArray[0],new
// ResourceLocation(MainMod.MOD_ID+":Aspects/Artis.png"),1);
- // Array.set(tmpArray[1],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("MAGIC").get(null));
- // Array.set(tmpArray[1],1,ThaumcraftHandler.AspectAdder.mAspectClass.getField("ELDRITCH").get(null));
- // UNIVERSE = aspectConstructor.newInstance("Universum",0x0000FF, tmpArray[1],new
+ // Array.set(tmpArray[1],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("MAGIC").get(null));
+ // Array.set(tmpArray[1],1,ThaumcraftHandler.AspectAdder.mAspectClass.getField("ELDRITCH").get(null));
+ // UNIVERSE = aspectConstructor.newInstance("Universum",0x0000FF, tmpArray[1],new
// ResourceLocation(MainMod.MOD_ID+":Aspects/Universum.png"),1);
- // Array.set(tmpArray[2],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("MAN").get(null));
- // Array.set(tmpArray[2],1,UNIVERSE);
- // SCIENCE = aspectConstructor.newInstance("Scientia",0x00FFFF, tmpArray[2],new
+ // Array.set(tmpArray[2],0,ThaumcraftHandler.AspectAdder.mAspectClass.getField("MAN").get(null));
+ // Array.set(tmpArray[2],1,UNIVERSE);
+ // SCIENCE = aspectConstructor.newInstance("Scientia",0x00FFFF, tmpArray[2],new
// ResourceLocation(MainMod.MOD_ID+":Aspects/Scientia.png"),1);
- // } catch (NoSuchMethodException | NoSuchFieldException | IllegalAccessException | InstantiationException |
+ // } catch (NoSuchMethodException | NoSuchFieldException | IllegalAccessException | InstantiationException |
// InvocationTargetException e) {
- // e.printStackTrace();
- // }
- // }
+ // e.printStackTrace();
+ // }
+ // }
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java
index 3c0c8abf3e..fee3cfaa41 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java
@@ -1,32 +1,24 @@
/*
- * 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.crossmod.thaumcraft.tile;
+import net.minecraft.item.ItemStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import net.minecraft.item.ItemStack;
public class GT_Multi_IndustrialCrucible extends GT_MetaTileEntity_MultiBlockBase {
@@ -84,8 +76,8 @@ public class GT_Multi_IndustrialCrucible extends GT_MetaTileEntity_MultiBlockBas
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3, boolean b4) {
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3,
+ boolean b4) {
return new ITexture[0];
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java
index 813aa16d74..fcc45f069f 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java
@@ -1,28 +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.crossmod.thaumcraft.tile;
+import net.minecraft.item.ItemStack;
+
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaBase_Item;
@@ -30,9 +24,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatter
import gregtech.api.util.GT_ModHandler;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
-import net.minecraft.item.ItemStack;
public class GT_WandBuffer extends GT_MetaTileEntity_BasicBatteryBuffer {
+
public GT_WandBuffer(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount);
}
@@ -114,6 +108,6 @@ public class GT_WandBuffer extends GT_MetaTileEntity_BasicBatteryBuffer {
tStored = 9223372036854775807L;
}
- return new long[] {tStored, tScale};
+ return new long[] { tStored, tScale };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
index 1cca3a9f8d..531111b221 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
@@ -1,40 +1,34 @@
/*
- * 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.crossmod.thaumcraft.util;
-import com.github.bartimaeusnek.bartworks.API.API_ConfigValues;
-import com.github.bartimaeusnek.bartworks.util.Pair;
-import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
-import gregtech.api.enums.TC_Aspects;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.biome.BiomeGenBase;
-@SuppressWarnings({"rawtypes", "unchecked", "unused"})
+import com.github.bartimaeusnek.bartworks.API.API_ConfigValues;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
+import gregtech.api.enums.TC_Aspects;
+
+@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
public class ThaumcraftHandler {
+
private ThaumcraftHandler() {}
private static Integer taintBiomeID;
@@ -51,9 +45,7 @@ public class ThaumcraftHandler {
public static boolean isWand(ItemStack aStack) {
try {
- return aStack != null
- && ThaumcraftHandler.mWandInterface.isAssignableFrom(
- aStack.getItem().getClass());
+ return aStack != null && ThaumcraftHandler.mWandInterface.isAssignableFrom(aStack.getItem().getClass());
} catch (Throwable var3) {
return false;
}
@@ -62,10 +54,9 @@ public class ThaumcraftHandler {
public static boolean isMagicalForestBiome(int biomeID) {
if (ThaumcraftHandler.magicalForestBiomeID == null) {
try {
- BiomeGenBase biome =
- (BiomeGenBase) Class.forName("thaumcraft.common.lib.world.ThaumcraftWorldGenerator")
- .getField("biomeMagicalForest")
- .get(null);
+ BiomeGenBase biome = (BiomeGenBase) Class
+ .forName("thaumcraft.common.lib.world.ThaumcraftWorldGenerator").getField("biomeMagicalForest")
+ .get(null);
return biomeID == (ThaumcraftHandler.magicalForestBiomeID = biome.biomeID);
} catch (ClassCastException | ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
@@ -78,10 +69,9 @@ public class ThaumcraftHandler {
public static boolean isTaintBiome(int biomeID) {
if (ThaumcraftHandler.taintBiomeID == null) {
try {
- BiomeGenBase TaintBiome =
- (BiomeGenBase) Class.forName("thaumcraft.common.lib.world.ThaumcraftWorldGenerator")
- .getField("biomeTaint")
- .get(null);
+ BiomeGenBase TaintBiome = (BiomeGenBase) Class
+ .forName("thaumcraft.common.lib.world.ThaumcraftWorldGenerator").getField("biomeTaint")
+ .get(null);
return biomeID == (ThaumcraftHandler.taintBiomeID = TaintBiome.biomeID);
} catch (ClassCastException | ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
@@ -92,6 +82,7 @@ public class ThaumcraftHandler {
}
public static class AspectAdder {
+
public static Class mAspectListClass;
public static Class mAspectClass;
public static Method registerObjectTag;
@@ -109,27 +100,29 @@ public class ThaumcraftHandler {
try {
ThaumcraftHandler.AspectAdder.mAspectListClass = Class.forName("thaumcraft.api.aspects.AspectList");
ThaumcraftHandler.AspectAdder.mAspectClass = Class.forName("thaumcraft.api.aspects.Aspect");
- ThaumcraftHandler.AspectAdder.addToList = ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod(
- "add", ThaumcraftHandler.AspectAdder.mAspectClass, int.class);
+ ThaumcraftHandler.AspectAdder.addToList = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("add", ThaumcraftHandler.AspectAdder.mAspectClass, int.class);
ThaumcraftHandler.AspectAdder.registerObjectTag = Class.forName("thaumcraft.api.ThaumcraftApi")
.getMethod(
- "registerObjectTag", ItemStack.class, ThaumcraftHandler.AspectAdder.mAspectListClass);
+ "registerObjectTag",
+ ItemStack.class,
+ ThaumcraftHandler.AspectAdder.mAspectListClass);
ThaumcraftHandler.AspectAdder.getName = ThaumcraftHandler.AspectAdder.mAspectClass.getMethod("getName");
- ThaumcraftHandler.AspectAdder.writeAspectListToNBT =
- ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod("writeToNBT", NBTTagCompound.class);
- ThaumcraftHandler.AspectAdder.add = ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod(
- "add", ThaumcraftHandler.AspectAdder.mAspectListClass);
- ThaumcraftHandler.AspectAdder.getAmount = ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod(
- "getAmount", ThaumcraftHandler.AspectAdder.mAspectClass);
- ThaumcraftHandler.AspectAdder.getAspects =
- ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod("getAspects");
- ThaumcraftHandler.AspectAdder.readAspectListFromNBT =
- ThaumcraftHandler.AspectAdder.mAspectListClass.getMethod("readFromNBT", NBTTagCompound.class);
- ThaumcraftHandler.AspectAdder.isResearchComplete = Class.forName(
- "thaumcraft.common.lib.research.ResearchManager")
+ ThaumcraftHandler.AspectAdder.writeAspectListToNBT = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("writeToNBT", NBTTagCompound.class);
+ ThaumcraftHandler.AspectAdder.add = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("add", ThaumcraftHandler.AspectAdder.mAspectListClass);
+ ThaumcraftHandler.AspectAdder.getAmount = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("getAmount", ThaumcraftHandler.AspectAdder.mAspectClass);
+ ThaumcraftHandler.AspectAdder.getAspects = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("getAspects");
+ ThaumcraftHandler.AspectAdder.readAspectListFromNBT = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getMethod("readFromNBT", NBTTagCompound.class);
+ ThaumcraftHandler.AspectAdder.isResearchComplete = Class
+ .forName("thaumcraft.common.lib.research.ResearchManager")
.getMethod("isResearchComplete", String.class, String.class);
- ThaumcraftHandler.AspectAdder.linkedAspektList =
- ThaumcraftHandler.AspectAdder.mAspectListClass.getField("aspects");
+ ThaumcraftHandler.AspectAdder.linkedAspektList = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getField("aspects");
} catch (ClassNotFoundException | NoSuchMethodException | NoSuchFieldException e) {
e.printStackTrace();
}
@@ -140,10 +133,14 @@ public class ThaumcraftHandler {
try {
Object aspectList = ThaumcraftHandler.AspectAdder.mAspectListClass.newInstance();
for (Pair a : aspectPair) {
- if (API_ConfigValues.debugLog)
- DebugLog.log("Stack:" + stack.getDisplayName() + " Damage:" + stack.getItemDamage()
- + " aspectPair: " + ThaumcraftHandler.AspectAdder.getName.invoke(a.getKey()) + " / "
- + a.getValue());
+ if (API_ConfigValues.debugLog) DebugLog.log(
+ "Stack:" + stack.getDisplayName()
+ + " Damage:"
+ + stack.getItemDamage()
+ + " aspectPair: "
+ + ThaumcraftHandler.AspectAdder.getName.invoke(a.getKey())
+ + " / "
+ + a.getValue());
ThaumcraftHandler.AspectAdder.addToList.invoke(aspectList, a.getKey(), a.getValue());
}
ThaumcraftHandler.AspectAdder.registerObjectTag.invoke(null, stack, aspectList);
@@ -155,9 +152,8 @@ public class ThaumcraftHandler {
public static void addAspectViaGT(ItemStack stack, TC_Aspects.TC_AspectStack... tc_aspectStacks) {
try {
Object aspectList = ThaumcraftHandler.AspectAdder.mAspectListClass.newInstance();
- for (TC_Aspects.TC_AspectStack tc_aspects : tc_aspectStacks)
- ThaumcraftHandler.AspectAdder.addToList.invoke(
- aspectList, tc_aspects.mAspect.mAspect, (int) tc_aspects.mAmount);
+ for (TC_Aspects.TC_AspectStack tc_aspects : tc_aspectStacks) ThaumcraftHandler.AspectAdder.addToList
+ .invoke(aspectList, tc_aspects.mAspect.mAspect, (int) tc_aspects.mAmount);
ThaumcraftHandler.AspectAdder.registerObjectTag.invoke(null, stack, aspectList);
} catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
e.printStackTrace();