aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaven Szewczyk <git@eigenraven.me>2024-05-24 19:14:02 +0100
committerRaven Szewczyk <git@eigenraven.me>2024-05-24 19:14:02 +0100
commit7b534efabcc2f45031f29b197a3fa896e7166258 (patch)
tree50d44610116ac2836703f327861468b8a576d0fa
parent9b6fc0420059c6b399506cee841290766b72bd53 (diff)
parenta3bc5e1404d24b1af784d165988baba682f660a5 (diff)
downloadGT5-Unofficial-7b534efabcc2f45031f29b197a3fa896e7166258.tar.gz
GT5-Unofficial-7b534efabcc2f45031f29b197a3fa896e7166258.tar.bz2
GT5-Unofficial-7b534efabcc2f45031f29b197a3fa896e7166258.zip
Merge in bartworks with history
git-subtree-dir: bartworks git-subtree-mainline: 9b6fc0420059c6b399506cee841290766b72bd53 git-subtree-split: a3bc5e1404d24b1af784d165988baba682f660a5
-rw-r--r--bartworks/.editorconfig19
-rw-r--r--bartworks/.git-blame-ignore-revs4
-rw-r--r--bartworks/.gitattributes44
-rw-r--r--bartworks/.github/workflows/build-and-test.yml13
-rw-r--r--bartworks/.github/workflows/release-tags.yml14
-rw-r--r--bartworks/.gitignore38
-rw-r--r--bartworks/BWLogo.pngbin0 -> 642 bytes
-rw-r--r--bartworks/BlockAdderGenerator/biovatgen.py68
-rw-r--r--bartworks/BlockAdderGenerator/csv.csv28
-rw-r--r--bartworks/CHANGELOG-2.1.1.0.md320
-rw-r--r--bartworks/CODEOWNERS3
-rw-r--r--bartworks/ID Range.txt6
-rw-r--r--bartworks/LICENSE165
-rw-r--r--bartworks/README.md16
-rw-r--r--bartworks/build.gradle5
-rw-r--r--bartworks/dependencies.gradle19
-rw-r--r--bartworks/gradle.properties192
-rw-r--r--bartworks/gradle/wrapper/gradle-wrapper.jarbin0 -> 43453 bytes
-rw-r--r--bartworks/gradle/wrapper/gradle-wrapper.properties7
-rwxr-xr-xbartworks/gradlew249
-rw-r--r--bartworks/gradlew.bat92
-rw-r--r--bartworks/jitpack.yml2
-rw-r--r--bartworks/repositories.gradle16
-rw-r--r--bartworks/settings.gradle23
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java20
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java197
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java112
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java126
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java325
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java211
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java29
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java39
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java19
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java23
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java39
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java39
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java25
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java35
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java31
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java61
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java17
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BWNBTDependantCraftingRecipe.java76
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BacterialVatFrontend.java92
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BartWorksRecipeMaps.java91
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/DynamicGTRecipe.java34
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/RadioHatchFrontend.java45
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java54
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java84
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java82
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java113
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java227
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java35
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java239
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java53
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java127
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java32
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java31
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java31
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java90
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java112
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java137
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java56
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java159
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java111
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java333
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java92
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java135
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java188
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java180
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java204
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java44
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java164
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java93
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java72
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java39
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java37
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java62
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java38
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java46
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java334
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java98
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java79
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java165
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java238
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java90
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java185
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java143
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java41
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java154
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java35
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java78
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java199
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java128
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java104
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java107
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java23
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java194
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ElectricImplosionCompressorRecipes.java213
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java146
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java147
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java453
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java62
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java224
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java60
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java35
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java583
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Assembler.java294
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/AssemblyLine.java85
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Autoclave.java41
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Centrifuge.java144
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalBath.java84
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalReactor.java29
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/CraftingRecipes.java462
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Electrolyzer.java152
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Extractor.java45
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FakeRecipes.java11
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidHeater.java27
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidSolidifier.java103
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FormingPress.java77
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/LaserEngraver.java28
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Mixer.java65
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Pulverizer.java98
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/PyrolyseOven.java24
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java162
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java88
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java60
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java108
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java71
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java99
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java61
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java24
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java42
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java126
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java374
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java163
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java42
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java836
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java641
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java338
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java550
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java614
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java598
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java365
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java413
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java641
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java428
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java267
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java449
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java223
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java459
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java256
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java157
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java412
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java62
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java136
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java87
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java42
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_HumongousInputHatch.java46
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java499
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java157
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java71
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java72
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java250
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java97
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java95
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java194
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java107
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java121
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java51
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java51
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java144
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java116
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java128
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java73
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java131
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java272
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java134
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java76
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java50
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java65
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java161
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java39
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java396
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java76
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java368
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java266
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java213
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java145
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java1158
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java1265
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java2092
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AddSomeRecipes.java96
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java671
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java48
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java77
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java21
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java58
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java74
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java78
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java332
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java296
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java282
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java529
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java296
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java66
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java377
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java69
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java62
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/RawOreLoader.java62
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java250
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java602
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java42
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java173
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java40
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java43
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java95
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java273
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java140
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java213
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java220
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java49
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java502
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java210
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java220
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java57
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java803
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java253
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java51
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java173
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java51
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java31
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java42
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java187
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java146
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java79
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java50
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java116
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java309
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java172
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java396
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java56
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java51
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java81
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java187
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ResultWrongSievert.java82
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java38
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java392
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java163
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java72
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java146
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java65
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java19
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java98
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java285
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java104
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java304
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java115
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/VoidMinerUtility.java316
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java96
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java34
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java78
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java121
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java38
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java37
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java37
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java186
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java25
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java155
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java108
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java113
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java92
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java97
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java203
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java93
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java121
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java156
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java177
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java98
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java82
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java163
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java82
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java84
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java118
-rw-r--r--bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java166
-rw-r--r--bartworks/src/main/resources/assets/bartworks/lang/de_DE.lang152
-rw-r--r--bartworks/src/main/resources/assets/bartworks/lang/en_US.lang202
-rw-r--r--bartworks/src/main/resources/assets/bartworks/lang/fr_FR.lang160
-rw-r--r--bartworks/src/main/resources/assets/bartworks/lang/zh_CN.lang163
-rw-r--r--bartworks/src/main/resources/assets/bartworks/sounds.json11
-rw-r--r--bartworks/src/main/resources/assets/bartworks/sounds/radhatch.oggbin0 -> 236744 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/GUIPrimitiveKUBox.pngbin0 -> 812 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/background/brown.pngbin0 -> 438 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.pngbin0 -> 994 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/assembler_mode.pngbin0 -> 684 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/line_mode.pngbin0 -> 714 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.pngbin0 -> 169 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.pngbin0 -> 202 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.pngbin0 -> 170 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.pngbin0 -> 196 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.pngbin0 -> 261 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.pngbin0 -> 215 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.pngbin0 -> 240 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.pngbin0 -> 146 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.pngbin0 -> 243 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.pngbin0 -> 156 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.pngbin0 -> 133 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.pngbin0 -> 230 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.pngbin0 -> 132 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.pngbin0 -> 435 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.pngbin0 -> 1002 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.pngbin0 -> 236 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.pngbin0 -> 249 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.pngbin0 -> 145 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/slot/brown.pngbin0 -> 109 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.pngbin0 -> 130 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.pngbin0 -> 154 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.pngbin0 -> 150 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/BWRotorBlock.pngbin0 -> 559 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlock.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlockRandlos.pngbin0 -> 177 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock1.pngbin0 -> 187 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock2.pngbin0 -> 185 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock3.pngbin0 -> 187 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock4.pngbin0 -> 188 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock5.pngbin0 -> 187 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock6.pngbin0 -> 187 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/CosmicNeutroniumReinforcedBoronSilicateGlassBlock.pngbin0 -> 129 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.pngbin0 -> 471 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/GrindstoneL.pngbin0 -> 835 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/InfinityReinforcedBoronSilicateGlassBlock.pngbin0 -> 336 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/IridiumReinforcedBoronSilicateGlassBlock.pngbin0 -> 196 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.pngbin0 -> 666 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.pngbin0 -> 680 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.pngbin0 -> 680 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.pngbin0 -> 682 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.pngbin0 -> 795 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/LuVTierMaterialReinforcedBoronSilicateGlassBlock.pngbin0 -> 199 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/NeutroniumReinforcedBoronSilicateGlassBlock.pngbin0 -> 126 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/NickelFerriteBlocks.pngbin0 -> 382 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/OsmiumReinforcedBoronSilicateGlassBlock.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.pngbin0 -> 623 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/ThoriumYttriumGlass.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/TitaniumReinforcedBoronSilicateGlassBlock.pngbin0 -> 130 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/TranscendentallyReinforcedBoronSilicateGlassBlock.pngbin0 -> 227 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.pngbin0 -> 665 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/TungstenSteelReinforcedBoronSilicateGlassBlock.pngbin0 -> 125 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_0.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_1.pngbin0 -> 207 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_10.pngbin0 -> 228 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_11.pngbin0 -> 227 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_12.pngbin0 -> 207 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_13.pngbin0 -> 205 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_14.pngbin0 -> 207 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_15.pngbin0 -> 203 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_2.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_3.pngbin0 -> 208 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_4.pngbin0 -> 209 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_5.pngbin0 -> 207 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_6.pngbin0 -> 206 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_7.pngbin0 -> 202 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_8.pngbin0 -> 227 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_9.pngbin0 -> 226 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_0.pngbin0 -> 186 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_1.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_10.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_11.pngbin0 -> 182 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_12.pngbin0 -> 188 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_13.pngbin0 -> 183 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_14.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_15.pngbin0 -> 177 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_2.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_3.pngbin0 -> 182 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_4.pngbin0 -> 187 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_5.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_6.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_7.pngbin0 -> 180 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_8.pngbin0 -> 186 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_9.pngbin0 -> 184 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpDown.pngbin0 -> 473 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpSide.pngbin0 -> 549 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpTop.pngbin0 -> 473 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/blocks/windmill_top.pngbin0 -> 591 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/Agarose.pngbin0 -> 259 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletBall.pngbin0 -> 305 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletCompound.pngbin0 -> 269 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.pngbin0 -> 448 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BWmotor.pngbin0 -> 506 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BWrawtube.pngbin0 -> 450 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPellet.pngbin0 -> 258 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPelletBall.pngbin0 -> 291 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/CircuitProgrammer.pngbin0 -> 253 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/ClonalCellularSynthesisModule.pngbin0 -> 481 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/DNAExtractionModule.pngbin0 -> 525 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/DNASampleFlask.pngbin0 -> 775 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/DetergentPowder.pngbin0 -> 261 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/GT2Coin.pngbin0 -> 259 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.pngbin0 -> 353 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.pngbin0 -> 362 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.pngbin0 -> 5702 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.pngbin0 -> 5691 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.pngbin0 -> 5716 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.pngbin0 -> 6022 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.pngbin0 -> 5971 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.pngbin0 -> 6020 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.pngbin0 -> 5726 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.pngbin0 -> 5709 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.pngbin0 -> 5725 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.pngbin0 -> 6031 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.pngbin0 -> 5964 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.pngbin0 -> 6030 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.pngbin0 -> 5973 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.pngbin0 -> 5937 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.pngbin0 -> 5988 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.pngbin0 -> 5932 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.pngbin0 -> 5885 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.pngbin0 -> 5971 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.pngbin0 -> 5658 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.pngbin0 -> 5673 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.pngbin0 -> 5703 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/IncubationModule.pngbin0 -> 623 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/PCRThermoclyclingModule.pngbin0 -> 566 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/PlasmaMembrane.pngbin0 -> 2522 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidCell.pngbin0 -> 777 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidSynthesisModule.pngbin0 -> 499 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPellet.pngbin0 -> 257 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletBall.pngbin0 -> 305 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletCompound.pngbin0 -> 244 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/TransformationModule.pngbin0 -> 529 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/WrapOverlay.pngbin0 -> 496 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/completed_grindstone.pngbin0 -> 932 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_bottom.pngbin0 -> 823 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_top.pngbin0 -> 822 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.pngbin0 -> 284 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/petriDish.pngbin0 -> 441 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/combinedParts.pngbin0 -> 699 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorCombined.pngbin0 -> 407 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorLeather.pngbin0 -> 441 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorPaper.pngbin0 -> 472 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorWool.pngbin0 -> 382 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/leatherParts.pngbin0 -> 600 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/paperParts.pngbin0 -> 510 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorCombined.pngbin0 -> 2294 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorLeather.pngbin0 -> 1295 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorPaper.pngbin0 -> 583 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorWool.pngbin0 -> 1123 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworks/textures/items/rotors/woolParts.pngbin0 -> 601 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128.pngbin0 -> 934 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128b.pngbin0 -> 1048 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128ba.pngbin0 -> 990 bytes
-rw-r--r--bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/World/SunRoss128.pngbin0 -> 1260 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasing.pngbin0 -> 703 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/copy.bat1
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_Cell.pngbin0 -> 443 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_CellDep.pngbin0 -> 437 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.pngbin0 -> 362 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.pngbin0 -> 364 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.pngbin0 -> 535 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.pngbin0 -> 528 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.pngbin0 -> 318 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.pngbin0 -> 318 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/0.pngbin0 -> 566 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/1.pngbin0 -> 298 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/10.pngbin0 -> 337 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/11.pngbin0 -> 367 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/12.pngbin0 -> 433 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/13.pngbin0 -> 401 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/14.pngbin0 -> 859 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/2.pngbin0 -> 443 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/3.pngbin0 -> 232 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/4.pngbin0 -> 222 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/5.pngbin0 -> 344 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/6.pngbin0 -> 347 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/7.pngbin0 -> 331 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/8.pngbin0 -> 331 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/9.pngbin0 -> 378 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing.pngbin0 -> 626 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced.pngbin0 -> 639 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing_OVERLAY.pngbin0 -> 139 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule.pngbin0 -> 211 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten.pngbin0 -> 135 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten_OVERLAY.pngbin0 -> 168 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule_OVERLAY.pngbin0 -> 308 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle.pngbin0 -> 214 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle_OVERLAY.pngbin0 -> 267 bytes
-rw-r--r--bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/copy.bat1
-rw-r--r--bartworks/src/main/resources/mcmod.info55
859 files changed, 46750 insertions, 0 deletions
diff --git a/bartworks/.editorconfig b/bartworks/.editorconfig
new file mode 100644
index 0000000000..6effbc91a8
--- /dev/null
+++ b/bartworks/.editorconfig
@@ -0,0 +1,19 @@
+# This is the universal Text Editor Configuration
+# for all GTNewHorizons projects
+# See: https://editorconfig.org/
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{bat,ini}]
+end_of_line = crlf
+
+[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}]
+indent_size = 2
diff --git a/bartworks/.git-blame-ignore-revs b/bartworks/.git-blame-ignore-revs
new file mode 100644
index 0000000000..b4d44c6096
--- /dev/null
+++ b/bartworks/.git-blame-ignore-revs
@@ -0,0 +1,4 @@
+# Ignore spotlessApply reformat
+f0f62d38a0c7834336afb73446ed67f7a850ae44
+dff9a4e6c3e688dd66dd44ce546d1d1e01f5c77a
+9c07ac0bffe24963f4fd6f44d148e3dcea5b2fd7
diff --git a/bartworks/.gitattributes b/bartworks/.gitattributes
new file mode 100644
index 0000000000..fd2792b6cb
--- /dev/null
+++ b/bartworks/.gitattributes
@@ -0,0 +1,44 @@
+* text eol=lf
+
+*.[jJ][aA][rR] binary
+
+*.[pP][nN][gG] binary
+*.[jJ][pP][gG] binary
+*.[jJ][pP][eE][gG] binary
+*.[gG][iI][fF] binary
+*.[tT][iI][fF] binary
+*.[tT][iI][fF][fF] binary
+*.[iI][cC][oO] binary
+*.[sS][vV][gG] text
+*.[eE][pP][sS] binary
+*.[xX][cC][fF] binary
+
+*.[kK][aA][rR] binary
+*.[mM]4[aA] binary
+*.[mM][iI][dD] binary
+*.[mM][iI][dD][iI] binary
+*.[mM][pP]3 binary
+*.[oO][gG][gG] binary
+*.[rR][aA] binary
+
+*.7[zZ] binary
+*.[gG][zZ] binary
+*.[tT][aA][rR] binary
+*.[tT][gG][zZ] binary
+*.[zZ][iI][pP] binary
+
+*.[tT][cC][nN] binary
+*.[sS][oO] binary
+*.[dD][lL][lL] binary
+*.[dD][yY][lL][iI][bB] binary
+*.[pP][sS][dD] binary
+*.[tT][tT][fF] binary
+*.[oO][tT][fF] binary
+
+*.[pP][aA][tT][cC][hH] -text
+
+*.[bB][aA][tT] text eol=crlf
+*.[cC][mM][dD] text eol=crlf
+*.[pP][sS]1 text eol=crlf
+
+*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
diff --git a/bartworks/.github/workflows/build-and-test.yml b/bartworks/.github/workflows/build-and-test.yml
new file mode 100644
index 0000000000..3ee2f686fd
--- /dev/null
+++ b/bartworks/.github/workflows/build-and-test.yml
@@ -0,0 +1,13 @@
+
+name: Build and test
+
+on:
+ pull_request:
+ branches: [ master, main ]
+ push:
+ branches: [ master, main ]
+
+jobs:
+ build-and-test:
+ uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
+ secrets: inherit
diff --git a/bartworks/.github/workflows/release-tags.yml b/bartworks/.github/workflows/release-tags.yml
new file mode 100644
index 0000000000..e4c0be6b0d
--- /dev/null
+++ b/bartworks/.github/workflows/release-tags.yml
@@ -0,0 +1,14 @@
+
+name: Release tagged build
+
+on:
+ push:
+ tags: [ '*' ]
+
+permissions:
+ contents: write
+
+jobs:
+ release-tags:
+ uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
+ secrets: inherit
diff --git a/bartworks/.gitignore b/bartworks/.gitignore
new file mode 100644
index 0000000000..5e80e0ae57
--- /dev/null
+++ b/bartworks/.gitignore
@@ -0,0 +1,38 @@
+.gradle
+.settings
+/.idea/
+/.vscode/
+/run/
+/build/
+/eclipse/
+.classpath
+.project
+/bin/
+/config/
+/crash-reports/
+/logs/
+options.txt
+/saves/
+usernamecache.json
+banned-ips.json
+banned-players.json
+eula.txt
+ops.json
+server.properties
+servers.dat
+usercache.json
+whitelist.json
+/out/
+*.iml
+*.ipr
+*.iws
+src/main/resources/mixins.*([!.]).json
+*.bat
+*.DS_Store
+!gradlew.bat
+.factorypath
+addon.local.gradle
+addon.local.gradle.kts
+addon.late.local.gradle
+addon.late.local.gradle.kts
+layout.json
diff --git a/bartworks/BWLogo.png b/bartworks/BWLogo.png
new file mode 100644
index 0000000000..61e1a41a95
--- /dev/null
+++ b/bartworks/BWLogo.png
Binary files differ
diff --git a/bartworks/BlockAdderGenerator/biovatgen.py b/bartworks/BlockAdderGenerator/biovatgen.py
new file mode 100644
index 0000000000..650cc52de7
--- /dev/null
+++ b/bartworks/BlockAdderGenerator/biovatgen.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Wed Jan 2 19:11:07 2019
+
+Copyright (c) 2019 boubou_19, bartimaeusnek
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+@author: boubou_19, bartimaeusnek
+"""
+
+import os
+import datetime
+import time
+name="GTNHBlocks" #change the name of the output file here
+ending=".java"
+csv_path = os.getcwd()+os.sep+"csv.csv" # change the name of the csv here
+output_file_path = os.getcwd()+os.sep+name+ending
+code_list = [] #will store all the lines of code
+max_meta = []
+with open(csv_path, "r") as file:#open the file and automatically close it when it leaves the scope
+ code_list.append("import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;\n")
+ code_list.append("\n")
+ code_list.append("//Autogenerated run file, script Created on Wed Jan 2 19:11:07 2019 by boubou_19 and bartimaeusnek\n")
+ code_list.append("//Executed on "+datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')+"\n")
+ code_list.append("public class "+name+" implements Runnable {\n")
+ code_list.append("\n")
+ code_list.append(" @Override\n")
+ code_list.append(" public void run(){\n")
+ file.readline() #skip the first line of the file
+
+ for line in file:
+ line = line.split(";") #turns the string into a list of strings using the ";" separator
+ line[4] = line[4].strip("\n") #it remove the \n at the end of a csv line otherwise it will do shit in the string later
+ if line[3] == "-1" or line[3] == "0":
+ code_list.append(" BioVatLogicAdder.BioVatGlass.addCustomGlass(\"{0}\",\"{1}\",{2},{3});\n".format(line[0],line[1],line[2],line[4]))
+ else:
+ if line[3] == "15" and line[2] == "0":
+ max_meta.append(" BioVatLogicAdder.BioVatGlass.addCustomGlass(\"{0}\",\"{1}\",i,{3});\n".format(line[0],line[1],line[2],line[4]))
+ else:
+ code_list.append("\n for (int i = {0}; i <= {1};++i)\n".format(line[2],line[3]))
+ code_list.append(" BioVatLogicAdder.BioVatGlass.addCustomGlass(\"{0}\",\"{1}\",i,{3});\n\n".format(line[0],line[1],line[2],line[4]))
+
+ # for i in range(int(line[2]),int(line[3])+1): #the +1 is here because range instruction always exclude the last number
+ code_list.append("\n for (int i = 0; i <= 15;++i;){\n")
+ for line in max_meta:
+ code_list.append(line)
+ code_list.append(" }\n")
+ code_list.append(" }\n")
+ code_list.append("}\n")
+with open(output_file_path,"w") as out:
+ out.writelines(code_list)
+
diff --git a/bartworks/BlockAdderGenerator/csv.csv b/bartworks/BlockAdderGenerator/csv.csv
new file mode 100644
index 0000000000..2f1ee7ef53
--- /dev/null
+++ b/bartworks/BlockAdderGenerator/csv.csv
@@ -0,0 +1,28 @@
+mod;unlocalised name;meta start;meta end;tier
+minecraft;stained_glass;0;15;3
+minecraft;glass;0;-1;3
+BloodArsenal;blood_stained_glass;0;-1;3
+Botany;stained;0;0;3
+EnderIO;blockFusedQuartz;0;5;3
+ExtraUtilities;decorativeBlock1;9;-1;3
+ExtraUtilities;decorativeBlock2;0;11;3
+ExtraUtilities;etherealglass;0;5;3
+GalaxySpace;futureglasses;0;15;3
+GalaxySpace;futureglass;0;-1;3
+HardcoreEnderExpension;laboratory_glass;0;-1;3
+IC2;blockAlloyGlass;0;-1;4
+Natura;NetherGlass;0;1;3
+Railcraft;glass;0;15;3
+RandomThings;spectreGlass;0;-1;3
+TConstruct;GlassBlock;0;-1;3
+TConstruct;GlassBlock.StainedClear;0;15;3
+Ztones;tile.glaxx;0;15;3
+chisel;glass;0;15;3
+chisel;stained_glass_white;0;15;3
+chisel;stained_glass_yellow;0;15;3
+chisel;stained_glass_lightgray;0;15;3
+chisel;stained_glass_brown;0;15;3
+chisel;glass2;0;-1;3
+chisel;stained_glass_forestry;0;15;3
+tectech;tile.quantumGlass;0;-1;5
+witchery;shadedglass;0;15;3
diff --git a/bartworks/CHANGELOG-2.1.1.0.md b/bartworks/CHANGELOG-2.1.1.0.md
new file mode 100644
index 0000000000..4018003d1e
--- /dev/null
+++ b/bartworks/CHANGELOG-2.1.1.0.md
@@ -0,0 +1,320 @@
+
+#
+
+Changelog of .
+
+
+### No issue
+**Merge pull request #11 from boubou19/master**
+* fixed another coil mistake in the MBF
+
+[dc72318c3f58ada](https://github.com///commit/dc72318c3f58ada)
+by Martin Robertz *2021-06-26 18:04:54*
+
+**fixed another coil mistake in the MBF**
+
+[237d8f4585ae013](https://github.com///commit/237d8f4585ae013)
+by boubou_19 *2021-06-26 17:56:23*
+
+**Merge pull request #10 from boubou19/master**
+* fix MBF heat issues with new coils
+
+[fa26481f178fad9](https://github.com///commit/fa26481f178fad9)
+by Martin Robertz *2021-06-24 20:31:06*
+
+**fix MBF heat issues with new coils**
+
+[1fee9b879a45aae](https://github.com///commit/1fee9b879a45aae)
+by boubou_19 *2021-06-24 20:22:40*
+
+**Merge pull request #9 from GTNewHorizons/cal-oc-fix**
+* Re-add CAL perfect overclock
+
+[f75c1c2b6e062fb](https://github.com///commit/f75c1c2b6e062fb)
+by Martin Robertz *2021-06-20 21:26:53*
+
+**re-add perfect overclock to CAL**
+
+[e137d2fb58e4672](https://github.com///commit/e137d2fb58e4672)
+by llk89 *2021-06-20 20:08:43*
+
+### No issue
+**bump version**
+
+[ed0a2aca198234c](https://github.com///commit/ed0a2aca198234c)
+by DreamMasterXXL *2021-06-15 19:57:19*
+
+**feat(textures): migrate to TextureFactory API and glow textures (#8)**
+* - Migrate to the new implementation-free TextureFactory API.
+* - Implement support for glow textures.
+
+[154b85fcf373469](https://github.com///commit/154b85fcf373469)
+by Léa Gris *2021-05-25 15:47:44*
+
+**Merge pull request #7 from GTNewHorizons/fix_deprecated_CASING_BLOCKS**
+* fix(texture): multiblock addressing deprecated array
+
+[1a4f57e86b13e0b](https://github.com///commit/1a4f57e86b13e0b)
+by Martin Robertz *2021-05-22 22:12:34*
+
+**fix(texture): multiblock addressing deprecated array**
+* replaces deprecated CASING_BLOCKS by getCasingTextureForId
+
+[16a8dcd3d780c1d](https://github.com///commit/16a8dcd3d780c1d)
+by Léa Gris *2021-05-22 14:09:27*
+
+**Merge pull request #4 from GTNewHorizons/not-break-cracker**
+* unbreak cracker structure
+
+[09553fd84b217bb](https://github.com///commit/09553fd84b217bb)
+by Martin Robertz *2021-05-19 17:48:32*
+
+**Merge pull request #6 from GTNH-Afx237v7/master**
+* fix MBF controller typo
+
+[59e0f02e4d1c523](https://github.com///commit/59e0f02e4d1c523)
+by Martin Robertz *2021-05-17 17:44:45*
+
+**Merge pull request #5 from GTNewHorizons/patch-implosion-compressor**
+* prevent resetPiston when machine not formed
+
+[2a4ce7bd5eb5fd0](https://github.com///commit/2a4ce7bd5eb5fd0)
+by Ethryan *2021-05-17 10:48:03*
+
+**fix MBF controller typo**
+* see https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6912
+
+[ba76318c4a0f84f](https://github.com///commit/ba76318c4a0f84f)
+by GTNH-Afx237v7 *2021-05-17 08:55:07*
+
+**Fix buildscript**
+
+[f6ba20281fc61a9](https://github.com///commit/f6ba20281fc61a9)
+by Glease *2021-05-17 00:57:58*
+
+**prevent resetPiston when machine not formed**
+
+[69032bec727fe9b](https://github.com///commit/69032bec727fe9b)
+by Glease *2021-05-17 00:55:01*
+
+**remove unsused letter**
+
+[92802cc5888caf1](https://github.com///commit/92802cc5888caf1)
+by korneel vandamme *2021-02-07 20:13:56*
+
+**unbreak cracker structure**
+
+[9bc7482c7b5c215](https://github.com///commit/9bc7482c7b5c215)
+by korneel vandamme *2021-02-07 20:07:58*
+
+**Power pass upgrade (#125) (#3)**
+* Implemented PowerPassUpgrade
+* Fixes setBlock on adv. casings
+* Configured code to use TecTech implementation of PowerPass
+* Co-authored-by: bartimaeusnek &lt;no-email&gt;
+
+[0f823268177df2b](https://github.com///commit/0f823268177df2b)
+by bartimaeusnek *2021-01-31 14:56:50*
+
+**Update MainMod.java**
+* (cherry picked from commit c51b5fec03cb907f993609b984d346fad3e8a1c2)
+
+[e5f3536d9220bd6](https://github.com///commit/e5f3536d9220bd6)
+by Martin Robertz *2021-01-30 10:03:48*
+
+**lets see if this works**
+* (cherry picked from commit c525c3a6687832f4ba9c55e8978181ba723f2690)
+
+[602a9ff085bd250](https://github.com///commit/602a9ff085bd250)
+by bartimaeusnek *2021-01-30 09:38:50*
+
+**Merge pull request #2 from bartimaeusnek/master**
+* sync
+
+[ac1afbbb1d38f1c](https://github.com///commit/ac1afbbb1d38f1c)
+by bartimaeusnek *2021-01-30 00:25:45*
+
+**New Casing from EmeraldsEmerald (#123)**
+
+[eb0d7a4a8bb7495](https://github.com///commit/eb0d7a4a8bb7495)
+by basdxz *2021-01-25 20:47:37*
+
+### No issue
+**bump version**
+
+[ac258b7f67c26e3](https://github.com///commit/ac258b7f67c26e3)
+by DreamMasterXXL *2021-05-16 11:26:55*
+
+**Revert "bump version"**
+* This reverts commit 932a62a34b2e8f311094baec3baf6ba65f266c1a.
+
+[371af8febf464a1](https://github.com///commit/371af8febf464a1)
+by DreamMasterXXL *2021-05-16 11:26:37*
+
+**bump version**
+
+[932a62a34b2e8f3](https://github.com///commit/932a62a34b2e8f3)
+by DreamMasterXXL *2021-05-16 11:26:04*
+
+**allwo for more recipes in the oilcracker (#128)**
+* allow for more difrent recipes
+* allows for more difrent recipes while still keeping hydrogen and steam in the middle
+* remove extra space
+* (cherry picked from commit e6baffb1b886c74789b97691c9f331c323b9a61f)
+
+[b419e0aa5af4ffb](https://github.com///commit/b419e0aa5af4ffb)
+by botn365 *2021-04-16 18:43:36*
+
+**Removed old dependency annotation**
+* (cherry picked from commit fa28b21c97ca3578791a80d5b576e1e9370393f0)
+
+[e03fbe8b4cf4689](https://github.com///commit/e03fbe8b4cf4689)
+by bartimaeusnek *2021-03-12 10:39:43*
+
+**Resolve Cyclic Dependancy with miscutils**
+* + also made gradle wait for deps by default.
+* (cherry picked from commit f83de89d0cfac9dbd01b3e519f4c7c569da60ee1)
+
+[54c689c12f2bc34](https://github.com///commit/54c689c12f2bc34)
+by bartimaeusnek *2021-03-12 09:22:45*
+
+**Added TGregworks integration (#126)**
+* (cherry picked from commit 457c0b58698cb456b53eeede1f8f884587656dd2)
+
+[d15a07ea14bce24](https://github.com///commit/d15a07ea14bce24)
+by bartimaeusnek *2021-03-03 18:35:41*
+
+**fixes Pyrolyse not checking top**
+* (cherry picked from commit 0988abe6c1c6d3a0d9d4dfce7ba3782dcc1c0aaa)
+
+[afbe11010896cac](https://github.com///commit/afbe11010896cac)
+by bartimaeusnek *2021-03-03 17:54:57*
+
+**revert**
+
+[a8347b7879ce951](https://github.com///commit/a8347b7879ce951)
+by DreamMasterXXL *2021-02-26 06:27:12*
+
+**Merge remote-tracking branch 'BART/master'**
+
+[e5b83941435dbfd](https://github.com///commit/e5b83941435dbfd)
+by DreamMasterXXL *2021-02-26 06:25:54*
+
+**Molten Recipe Changes and Refactor**
+* (cherry picked from commit 58c1bf1bd33b714cb69a460a2a72105e0c61b06a)
+
+[75908f9985218f1](https://github.com///commit/75908f9985218f1)
+by bartimaeusnek *2021-02-12 13:13:10*
+
+### No issue
+**Molten Recipe Changes and Refactor**
+
+[58c1bf1bd33b714](https://github.com///commit/58c1bf1bd33b714)
+by bartimaeusnek *2021-02-12 10:33:59*
+
+### No issue
+**Re-Enable Client Side Warning**
+
+[64b72d3848bd93f](https://github.com///commit/64b72d3848bd93f)
+by bartimaeusnek *2021-01-31 14:57:44*
+
+**Merge branch 'master' into master**
+
+[6637412e8ca9e5d](https://github.com///commit/6637412e8ca9e5d)
+by bartimaeusnek *2021-01-31 14:56:38*
+
+**Power pass upgrade (#125)**
+* Implemented PowerPassUpgrade
+* Fixes setBlock on adv. casings
+* Configured code to use TecTech implementation of PowerPass
+* Co-authored-by: bartimaeusnek &lt;no-email&gt;
+
+[191ae1ba699d5b0](https://github.com///commit/191ae1ba699d5b0)
+by bartimaeusnek *2021-01-31 14:55:21*
+
+### No issue
+**Merge remote-tracking branch 'origin/master'**
+
+[6d936e451470af8](https://github.com///commit/6d936e451470af8)
+by bartimaeusnek *2021-01-30 00:19:03*
+
+**Added bot's range**
+
+[7a6288b6b5041f8](https://github.com///commit/7a6288b6b5041f8)
+by bartimaeusnek *2021-01-30 00:18:51*
+
+**remove client only config due to ASM Space issues**
+
+[56620f6f8f40ab5](https://github.com///commit/56620f6f8f40ab5)
+by bartimaeusnek *2021-01-29 21:08:36*
+
+**Merge remote-tracking branch 'origin/master'**
+
+[58ed9019175d4c9](https://github.com///commit/58ed9019175d4c9)
+by bartimaeusnek *2021-01-29 10:08:29*
+
+**Several fixes**
+
+[c5006ee765f083d](https://github.com///commit/c5006ee765f083d)
+by bartimaeusnek *2021-01-29 10:06:03*
+
+### No issue
+**Socket Time Out GitHub Actions**
+
+[a7d676c96bb3d90](https://github.com///commit/a7d676c96bb3d90)
+by bartimaeusnek *2021-01-29 21:25:35*
+
+**SocketTime Out Travis**
+
+[257787a9aff803f](https://github.com///commit/257787a9aff803f)
+by bartimaeusnek *2021-01-29 21:25:09*
+
+### No issue
+**Adds Input Filters to TT Multis**
+
+[305cc469dc60785](https://github.com///commit/305cc469dc60785)
+by bartimaeusnek *2021-01-11 17:37:23*
+
+### No issue
+**Several fixes**
+
+[d1ffbd200edb4ec](https://github.com///commit/d1ffbd200edb4ec)
+by bartimaeusnek *2021-01-11 16:44:17*
+
+### No issue
+**Tanh speed improvement**
+
+[a811bd46d45ba07](https://github.com///commit/a811bd46d45ba07)
+by bartimaeusnek *2021-01-05 22:00:01*
+
+### No issue
+**Fixes setBlock on adv. casings**
+
+[eda3090a2a6504b](https://github.com///commit/eda3090a2a6504b)
+by bartimaeusnek *2021-01-04 15:32:09*
+
+### No issue
+**Round Up Replacement-Multiblocks**
+
+[398e0bcdf94fbc4](https://github.com///commit/398e0bcdf94fbc4)
+by bartimaeusnek *2020-01-01 18:47:10*
+
+### No issue
+**Fixed Tooltips & GUI for TT Replacements**
+
+[74d4e6d1f39daf8](https://github.com///commit/74d4e6d1f39daf8)
+by bartimaeusnek *2020-12-31 22:51:49*
+
+### No issue
+**EBF Heating Cap Fix**
+
+[e3398dbe8bc9f59](https://github.com///commit/e3398dbe8bc9f59)
+by bartimaeusnek *2020-12-29 16:15:41*
+
+### No issue
+**Added Multi Smelter TT Replacement**
+* Updated Coil Logic
+
+[205579baab63a75](https://github.com///commit/205579baab63a75)
+by bartimaeusnek *2020-12-29 12:35:25*
+
diff --git a/bartworks/CODEOWNERS b/bartworks/CODEOWNERS
new file mode 100644
index 0000000000..a6b5f68cd0
--- /dev/null
+++ b/bartworks/CODEOWNERS
@@ -0,0 +1,3 @@
+# Any Github changes require admin approval
+/.github/** @GTNewHorizons/admin
+
diff --git a/bartworks/ID Range.txt b/bartworks/ID Range.txt
new file mode 100644
index 0000000000..264b4c9661
--- /dev/null
+++ b/bartworks/ID Range.txt
@@ -0,0 +1,6 @@
+12501-13000
+
+12501-12600 are occupied by Crops++
+12900-13000 are occupied by EMT
+
+12600-12900 are aviable for bartworks \ No newline at end of file
diff --git a/bartworks/LICENSE b/bartworks/LICENSE
new file mode 100644
index 0000000000..0a041280bd
--- /dev/null
+++ b/bartworks/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/bartworks/README.md b/bartworks/README.md
new file mode 100644
index 0000000000..a18852bc19
--- /dev/null
+++ b/bartworks/README.md
@@ -0,0 +1,16 @@
+# bartworks
+A Gregtech addon, that adds GT2,3,4 stuff, a BioLabor, and much more custom content. Integration for Galaxy Space, and new Ores as well.
+Visit us on Twitch:
+https://minecraft.curseforge.com/projects/bartworks/
+
+Please add -Dfml.coreMods.load=com.github.bartimaeusnek.bartworks.ASM.BWCorePlugin to your args when you run this in a dev environment!
+
+Any issues with this code should be reported to the [GTNH GitHub](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues).
+
+## License
+
+GTNH modifications Copyright (c) 2021-2024 The GTNH Team
+
+This code is licensed LGPL v3.0 or later. Feel free to use our changes, just give back any changes you make to the community as well!
+
+Original code Copyright (c) bartimaeusnek 2018-2020 and was released under the MIT license.
diff --git a/bartworks/build.gradle b/bartworks/build.gradle
new file mode 100644
index 0000000000..e57a16f9f1
--- /dev/null
+++ b/bartworks/build.gradle
@@ -0,0 +1,5 @@
+//version: 1707058017
+
+plugins {
+ id 'com.gtnewhorizons.gtnhconvention'
+}
diff --git a/bartworks/dependencies.gradle b/bartworks/dependencies.gradle
new file mode 100644
index 0000000000..1c63563399
--- /dev/null
+++ b/bartworks/dependencies.gradle
@@ -0,0 +1,19 @@
+// Add your dependencies here
+
+dependencies {
+ runtimeOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev')
+ runtimeOnlyNonPublishable('com.github.GTNewHorizons:waila:1.8.0:dev')
+
+ compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha50:api') { transitive = false }
+
+ api('com.github.GTNewHorizons:GT5-Unofficial:5.09.46.23:dev')
+ api("com.github.GTNewHorizons:TecTech:5.4.2:dev")
+ api("com.github.GTNewHorizons:GalacticGregGT5:1.1.0:dev") {
+ exclude group:"com.github.GTNewHorizons", module:"bartworks"
+ }
+ api("com.github.GTNewHorizons:Avaritia:1.49:dev")
+ implementation("com.github.GTNewHorizons:TinkersConstruct:1.12.1-GTNH:dev")
+
+ compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.26:deobf") {transitive = false}
+ compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.11-GTNH:api") {transitive = false}
+}
diff --git a/bartworks/gradle.properties b/bartworks/gradle.properties
new file mode 100644
index 0000000000..0c29462f28
--- /dev/null
+++ b/bartworks/gradle.properties
@@ -0,0 +1,192 @@
+# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
+# LOCAL to test local config updates.
+gtnh.settings.blowdryerTag = 0.2.2
+
+# Human-readable mod name, available for mcmod.info population.
+modName = BartWorks
+
+# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
+# Conventionally lowercase.
+modId = bartworks
+
+# Root package of the mod, used to find various classes in other properties,
+# mcmod.info substitution, enabling assertions in run tasks, etc.
+modGroup = com.github.bartimaeusnek.bartworks
+
+# Whether to use modGroup as the maven publishing group.
+# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
+useModGroupForPublishing = false
+
+# Updates your build.gradle and settings.gradle automatically whenever an update is available.
+autoUpdateBuildScript = false
+
+# Version of Minecraft to target
+minecraftVersion = 1.7.10
+
+# Version of Minecraft Forge to target
+forgeVersion = 10.13.4.1614
+
+# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
+channel = stable
+
+# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
+mappingsVersion = 12
+
+# Defines other MCP mappings for dependency deobfuscation.
+remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
+
+# Select a default username for testing your mod. You can always override this per-run by running
+# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
+developmentEnvironmentUserName = Developer
+
+# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
+# See https://github.com/bsideup/jabel for details on how this works.
+enableModernJavaSyntax = true
+
+# Enables injecting missing generics into the decompiled source code for a better coding experience.
+# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
+enableGenericInjection = true
+
+# Generate a class with a String field for the mod version named as defined below.
+# If generateGradleTokenClass is empty or not missing, no such class will be generated.
+# If gradleTokenVersion is empty or missing, the field will not be present in the class.
+generateGradleTokenClass = com.github.bartimaeusnek.bartworks.API.API_REFERENCE
+
+# Name of the token containing the project's current version to generate/replace.
+gradleTokenVersion = VERSION
+
+# [DEPRECATED] Mod ID replacement token.
+gradleTokenModId =
+
+# [DEPRECATED] Mod name replacement token.
+gradleTokenModName =
+
+# [DEPRECATED] Mod Group replacement token.
+gradleTokenGroupName =
+
+# [DEPRECATED]
+# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
+# public static final String VERSION = "GRADLETOKEN_VERSION";
+# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
+# version in @Mod([...], version = VERSION, [...]).
+# Leave these properties empty to skip individual token replacements.
+replaceGradleTokenInFile =
+
+# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
+# leave this property empty.
+# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
+apiPackage =
+
+# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
+# There can be multiple files in a space-separated list.
+# Example value: mymodid_at.cfg nei_at.cfg
+accessTransformersFile =
+
+# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
+usesMixins = false
+
+# Adds some debug arguments like verbose output and class export.
+usesMixinDebug = false
+
+# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
+mixinPlugin =
+
+# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
+mixinsPackage =
+
+# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
+# This parameter is for legacy compatibility only
+# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
+coreModClass = ASM.BWCorePlugin
+
+# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
+# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
+containsMixinsAndOrCoreModOnly = false
+
+# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
+forceEnableMixins = true
+
+# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
+# responsibility to check the license and request permission for distribution if required.
+usesShadowedDependencies = false
+
+# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
+# their own classes, making the minimization unreliable.
+minimizeShadowedDependencies = true
+
+# If disabled, won't rename the shadowed classes.
+relocateShadowedDependencies = true
+
+# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
+includeWellKnownRepositories = true
+
+# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
+# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
+# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
+usesMavenPublishing = true
+
+# Maven repository to publish the mod to.
+# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
+
+# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
+#
+# The project's ID on Modrinth. Can be either the slug or the ID.
+# Leave this empty if you don't want to publish to Modrinth.
+modrinthProjectId =
+
+# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
+# Syntax: scope1-type1:name1;scope2-type2:name2;...
+# Where scope can be one of [required, optional, incompatible, embedded],
+# type can be one of [project, version],
+# and the name is the Modrinth project or version slug/id of the other mod.
+# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
+# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
+modrinthRelations =
+
+# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
+#
+# The project's numeric ID on CurseForge. You can find this in the About Project box.
+# Leave this empty if you don't want to publish on CurseForge.
+curseForgeProjectId =
+
+# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
+# Syntax: type1:name1;type2:name2;...
+# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
+# and the name is the CurseForge project slug of the other mod.
+# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
+# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
+curseForgeRelations =
+
+# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
+# projects. New projects should not use this parameter.
+# customArchiveBaseName =
+
+# Optional parameter to have the build automatically fail if an illegal version is used.
+# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
+# The check is ONLY performed if the version is a git tag.
+# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
+# versionPattern =
+
+# Uncomment to prevent the source code from being published.
+# noPublishedSources = true
+
+# Uncomment this to disable Spotless checks.
+# This should only be uncommented to keep it easier to sync with upstream/other forks.
+# That is, if there is no other active fork/upstream, NEVER change this.
+# disableSpotless = true
+
+# Uncomment this to disable Checkstyle checks (currently wildcard import check).
+# disableCheckstyle = true
+
+# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
+# (force use delegated build).
+# This is meant to be set in $HOME/.gradle/gradle.properties.
+# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
+# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
+# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
+# ideaOverrideBuildType = idea
+
+# Whether IDEA should run spotless checks when pressing the Build button.
+# This is meant to be set in $HOME/.gradle/gradle.properties.
+# ideaCheckSpotlessOnBuild = true
+
diff --git a/bartworks/gradle/wrapper/gradle-wrapper.jar b/bartworks/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..e6441136f3
--- /dev/null
+++ b/bartworks/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/bartworks/gradle/wrapper/gradle-wrapper.properties b/bartworks/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..b82aa23a4f
--- /dev/null
+++ b/bartworks/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/bartworks/gradlew b/bartworks/gradlew
new file mode 100755
index 0000000000..1aa94a4269
--- /dev/null
+++ b/bartworks/gradlew
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/bartworks/gradlew.bat b/bartworks/gradlew.bat
new file mode 100644
index 0000000000..25da30dbde
--- /dev/null
+++ b/bartworks/gradlew.bat
@@ -0,0 +1,92 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/bartworks/jitpack.yml b/bartworks/jitpack.yml
new file mode 100644
index 0000000000..09bbb514fc
--- /dev/null
+++ b/bartworks/jitpack.yml
@@ -0,0 +1,2 @@
+before_install:
+ - ./gradlew setupCIWorkspace \ No newline at end of file
diff --git a/bartworks/repositories.gradle b/bartworks/repositories.gradle
new file mode 100644
index 0000000000..40118b1677
--- /dev/null
+++ b/bartworks/repositories.gradle
@@ -0,0 +1,16 @@
+// Add any additional repositories for your dependencies here
+
+repositories {
+ ivy {
+ url 'https://files.vexatos.com/'
+ patternLayout {
+ artifact "[module]/[artifact]-[revision](-[classifier])(.[ext])"
+ }
+ content {
+ includeGroup("TGregworks")
+ }
+ metadataSources {
+ artifact()
+ }
+ }
+}
diff --git a/bartworks/settings.gradle b/bartworks/settings.gradle
new file mode 100644
index 0000000000..94c2daf35c
--- /dev/null
+++ b/bartworks/settings.gradle
@@ -0,0 +1,23 @@
+
+pluginManagement {
+ repositories {
+ maven {
+ // RetroFuturaGradle
+ name "GTNH Maven"
+ url "https://nexus.gtnewhorizons.com/repository/public/"
+ mavenContent {
+ includeGroup("com.gtnewhorizons")
+ includeGroupByRegex("com\\.gtnewhorizons\\..+")
+ }
+ }
+ gradlePluginPortal()
+ mavenCentral()
+ mavenLocal()
+ }
+}
+
+plugins {
+ id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
+}
+
+
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java
new file mode 100644
index 0000000000..68a88b39ce
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+public class API_ConfigValues {
+
+ // One-Side-Only
+ public static boolean debugLog = true;
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java
new file mode 100644
index 0000000000..2eee530a70
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.Gendustry;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import java.awt.Color;
+
+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.FluidState;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+import gregtech.api.fluid.GT_FluidFactory;
+import gregtech.api.util.GT_Utility;
+
+public final class BioObjectAdder {
+
+ /**
+ * @param color the color of the Culture
+ * @param name the name of the Culture
+ * @param plasmid the cultures plasmid, get it from createAndRegisterBioPlasmid
+ * @param dna the cultures dna, get it from createAndRegisterBioDNA
+ * @param breedable if the culture can be inserted into the BacterialVat
+ * @param rarity visual
+ * @return
+ */
+ 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);
+ new Exception(
+ "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * rarity inherits from dna
+ *
+ * @param color the color of the Culture
+ * @param name the name of the Culture
+ * @param plasmid the cultures plasmid, get it from createAndRegisterBioPlasmid
+ * @param dna the cultures dna, get it from createAndRegisterBioDNA
+ * @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) {
+ if (BioCulture.BIO_CULTURE_ARRAY_LIST.size() > 1)
+ return BioCulture.createAndRegisterBioCulture(color, name, plasmid, dna, breedable);
+ new Exception(
+ "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * unspecific Biodata that can be converted into DNA and Plasmid with the propper methodes
+ *
+ * @param aName the name of the Biodata
+ * @param rarity visual only
+ * @param chance the chanche to extract this BioData
+ * @param tier the tier of this BioData 0=HV, 1=EV etc.
+ * @return
+ */
+ public static BioData createAndRegisterBioData(String aName, EnumRarity rarity, int chance, int tier) {
+ if (BioData.BIO_DATA_ARRAY_LIST.size() > 1)
+ return BioData.createAndRegisterBioData(aName, rarity, chance, tier);
+ new Exception("Too Early to register a BioData! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * Default Constructor for HV Tier DNA with 75% extraction rate
+ *
+ * @param aName Name of the DNA String
+ * @param rarity visual
+ * @return
+ */
+ public static BioDNA createAndRegisterBioDNA(String aName, EnumRarity rarity) {
+ if (BioData.BIO_DATA_ARRAY_LIST.size() > 1) return BioDNA.createAndRegisterBioDNA(aName, rarity);
+ new Exception("Too Early to register a BioData! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * Default Constructor for HV Tier Plasmid with 75% extraction rate
+ *
+ * @param aName Name of the Plasmid
+ * @param rarity visual
+ * @return
+ */
+ public static BioPlasmid createAndRegisterBioPlasmid(String aName, EnumRarity rarity) {
+ if (BioData.BIO_DATA_ARRAY_LIST.size() > 1) return BioPlasmid.createAndRegisterBioPlasmid(aName, rarity);
+ new Exception("Too Early to register a BioData! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * @param aName Name of the DNA String
+ * @param rarity visual
+ * @param chance chanche of extracting
+ * @param tier tier needed to extract 0=HV, 1=EV etc.
+ * @return
+ */
+ public static BioDNA createAndRegisterBioDNA(String aName, EnumRarity rarity, int chance, int tier) {
+ if (BioData.BIO_DATA_ARRAY_LIST.size() > 1) return BioDNA.createAndRegisterBioDNA(aName, rarity, chance, tier);
+ new Exception("Too Early to register a BioData! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * @param aName Name of the Plasmid
+ * @param rarity visual
+ * @param chance chanche of extracting
+ * @param tier tier needed to extract 0=HV, 1=EV etc.
+ * @return
+ */
+ public static BioPlasmid createAndRegisterBioPlasmid(String aName, EnumRarity rarity, int chance, int tier) {
+ if (BioData.BIO_DATA_ARRAY_LIST.size() > 1)
+ return BioPlasmid.createAndRegisterBioPlasmid(aName, rarity, chance, tier);
+ new Exception("Too Early to register a BioData! You MUST run this either after:bartworks OR in the init Phase!")
+ .printStackTrace();
+ return null;
+ }
+
+ /**
+ * @param voltageTier (i.e. 6 for LuV, 7 for ZPM, only intresting for LuV+)
+ * @return the propper Bacteria Tier (at least 0)
+ */
+ public static int getBacteriaTierFromVoltageTier(int voltageTier) {
+ return Math.max(voltageTier - 6, 0);
+ }
+
+ /**
+ * 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 = Gendustry.isModLoaded() ? FluidRegistry.getFluidStack("liquiddna", 100)
+ : Materials.Biomass.getFluid(100L);
+ for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) {
+ if (B.getFluidNotSet()) {
+ B.setFluid(
+ GT_FluidFactory.builder(
+ B.getName()
+ .replace(" ", "")
+ .toLowerCase() + "fluid")
+ .withTextureName("molten.autogenerated")
+ .withColorRGBA(
+ new short[] { (short) B.getColor()
+ .getRed(),
+ (short) B.getColor()
+ .getBlue(),
+ (short) B.getColor()
+ .getGreen() })
+ .withStateAndTemperature(FluidState.LIQUID, 300)
+ .buildAndRegister()
+ .asFluid());
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(10))
+ .fluidInputs(new FluidStack(B.getFluid(), 1000))
+ .fluidOutputs(dnaFluid)
+ .duration(25 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(centrifugeRecipes);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java
new file mode 100644
index 0000000000..ba1308c427
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public final class BioObjectGetter {
+
+ public static BioCulture getBioCulture(String aName) {
+ return BioCulture.getBioCulture(aName);
+ }
+
+ public static NBTTagCompound getNBTTagFromCulture(BioCulture bioCulture) {
+ return BioCulture.getNBTTagFromCulture(bioCulture);
+ }
+
+ public static NBTTagCompound getNBTTagFromBioPlasmid(BioPlasmid bioPlasmid) {
+ return BioObjectGetter.getNBTTagFromBioData(BioObjectGetter.convertBioPlasmidToData(bioPlasmid));
+ }
+
+ public static NBTTagCompound getNBTTagFromBioDNA(BioDNA bioDNA) {
+ return BioObjectGetter.getNBTTagFromBioData(BioObjectGetter.convertBioDNAtoData(bioDNA));
+ }
+
+ public static NBTTagCompound getNBTTagFromBioData(BioData bioData) {
+ return BioData.getNBTTagFromBioData(bioData);
+ }
+
+ public static BioDNA convertDataToDNA(BioData bioData) {
+ return BioDNA.convertDataToDNA(bioData);
+ }
+
+ public static BioPlasmid convertDataToPlasmid(BioData bioData) {
+ return BioPlasmid.convertDataToPlasmid(bioData);
+ }
+
+ public static BioData convertBioPlasmidToData(BioPlasmid bioPlasmid) {
+ return BioData.convertBioPlasmidToBioData(bioPlasmid);
+ }
+
+ public static BioData convertDataToDNA(BioDNA bioData) {
+ return BioData.convertBioDNAToBioData(bioData);
+ }
+
+ public static BioData convertBioDNAtoData(BioDNA bioDNA) {
+ return BioData.convertBioDNAToBioData(bioDNA);
+ }
+
+ public static BioPlasmid convertBioDNAtoBioPlasmid(BioDNA bioDNA) {
+ return BioObjectGetter.convertDataToPlasmid(BioObjectGetter.convertBioDNAtoData(bioDNA));
+ }
+
+ public static BioDNA convertBioPlasmidtoBioDNA(BioPlasmid bioPlasmid) {
+ return BioObjectGetter.convertDataToDNA(BioObjectGetter.convertBioPlasmidToData(bioPlasmid));
+ }
+
+ // UNSAFE needs to be reworked!
+
+ public static Collection<ItemStack> getAllPetriDishes() {
+ return BioItemList.getAllPetriDishes();
+ }
+
+ public static Collection<ItemStack> getAllDNASampleFlasks() {
+ return BioItemList.getAllDNASampleFlasks();
+ }
+
+ public static Collection<ItemStack> getAllPlasmidCells() {
+ return BioItemList.getAllPlasmidCells();
+ }
+
+ public static ItemStack getDNASampleFlask(BioDNA dna) {
+ return BioItemList.getDNASampleFlask(dna);
+ }
+
+ public static ItemStack getPetriDish(BioCulture culture) {
+ return BioItemList.getPetriDish(culture);
+ }
+
+ public static ItemStack getPlasmidCell(BioPlasmid plasmid) {
+ return BioItemList.getPlasmidCell(plasmid);
+ }
+
+ /**
+ * 1 - DetergentPowder 2 - Agarose 3 - IncubationModule 4 - Plasma Membrane
+ *
+ * @param selection
+ * @return the selected Item
+ */
+ public static ItemStack getOther(int selection) {
+ return BioItemList.getOther(selection);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java
new file mode 100644
index 0000000000..6ab854c308
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+
+public final class BioRecipeAdder {
+
+ public static final int STANDART = 0;
+ 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,
+ int aSpecialValue) {
+ return BWRecipes.instance.addBioLabRecipe(
+ aInputs,
+ aOutput,
+ aSpecialItems,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSpecialValue);
+ }
+
+ /**
+ * Adds a Incubation Recipe for the BioLab.
+ *
+ * @param aInput any item that will be added with a petri dish
+ * @param aOutput must be a BioCulture
+ * @param aChances
+ * @param aFluidInputs
+ * @param aDuration
+ * @param aEUt use BW_Util.getMachineVoltageFromTier(tier) to get optimal EU/t
+ * @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);
+ }
+
+ /**
+ * @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
+ * @param aDuration
+ * @param aEUt
+ * @param Sv Manual Sv entry i.e. for custom items
+ * @param glasTier the glass tier
+ * @param aSpecialValue Space or Cleanroom, Not yet implemented
+ * @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) {
+ return BWRecipes.instance.addBacterialVatRecipe(
+ 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 aCulture the bio culture
+ * @param aFluidInputs may not be null
+ * @param aFluidOutputs may not be null
+ * @param aDuration
+ * @param aEUt
+ * @param material may be null. used for auto Sv calculation
+ * @param glasTier the glass tier
+ * @param aSpecialValue Space or Cleanroom, Not yet implemented
+ * @param exactSv if the recipe needs EXACTLY the Sv or can use less...
+ * @return
+ */
+ @Deprecated
+ 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,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ material,
+ glasTier,
+ aSpecialValue,
+ exactSv);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java
new file mode 100644
index 0000000000..b53638a77a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.IndustrialCraft2;
+
+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;
+
+public final class BioVatLogicAdder {
+
+ public static class RadioHatch {
+
+ public static void runBasicItemIntegration() {
+ giveItemStackRadioHatchAbilites(ItemList.ThoriumCell_1.get(1), Materials.Thorium, 3);
+ giveItemStackRadioHatchAbilites(ItemList.ThoriumCell_2.get(1), Materials.Thorium, 6);
+ giveItemStackRadioHatchAbilites(ItemList.ThoriumCell_4.get(1), Materials.Thorium, 12);
+
+ giveItemStackRadioHatchAbilites(ItemList.NaquadahCell_1.get(1), Materials.Naquadah, 3);
+ giveItemStackRadioHatchAbilites(ItemList.NaquadahCell_2.get(1), Materials.Naquadah, 6);
+ giveItemStackRadioHatchAbilites(ItemList.NaquadahCell_4.get(1), Materials.Naquadah, 12);
+
+ giveItemStackRadioHatchAbilites(ItemList.Moxcell_1.get(1), Materials.Plutonium, 3);
+ giveItemStackRadioHatchAbilites(ItemList.Moxcell_2.get(1), Materials.Plutonium, 6);
+ giveItemStackRadioHatchAbilites(ItemList.Moxcell_4.get(1), Materials.Plutonium, 12);
+
+ giveItemStackRadioHatchAbilites(ItemList.Uraniumcell_1.get(1), Materials.Uranium, 3);
+ giveItemStackRadioHatchAbilites(ItemList.Uraniumcell_2.get(1), Materials.Uranium, 6);
+ giveItemStackRadioHatchAbilites(ItemList.Uraniumcell_4.get(1), Materials.Uranium, 12);
+
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.TiberiumCell_1.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 3);
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.TiberiumCell_2.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 6);
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.TiberiumCell_4.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 12);
+
+ giveItemStackRadioHatchAbilites(BW_NonMeta_MaterialItems.TheCoreCell.get(1), Materials.Naquadah, 96);
+
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Thorium_1.get(1), Materials.Thorium, 3, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Thorium_2.get(1), Materials.Thorium, 6, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Thorium_4.get(1), Materials.Thorium, 12, 10);
+
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Naquadah_1.get(1), Materials.Naquadah, 3, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Naquadah_2.get(1), Materials.Naquadah, 6, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_Naquadah_4.get(1), Materials.Naquadah, 12, 10);
+
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXSimpledepleted", 1),
+ Materials.Plutonium,
+ 3,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXDualdepleted", 1),
+ Materials.Plutonium,
+ 6,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXQuaddepleted", 1),
+ Materials.Plutonium,
+ 12,
+ 10);
+
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumSimpledepleted", 1),
+ Materials.Uranium,
+ 3,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumDualdepleted", 1),
+ Materials.Uranium,
+ 6,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumQuaddepleted", 1),
+ Materials.Uranium,
+ 12,
+ 10);
+
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 3,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 6,
+ 10);
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1),
+ WerkstoffLoader.Tiberium.getBridgeMaterial(),
+ 12,
+ 10);
+
+ giveItemStackRadioHatchAbilites(
+ BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1),
+ Materials.Naquadah,
+ 96,
+ 10);
+
+ giveItemStackRadioHatchAbilites(ItemList.MNqCell_1.get(1), Materials.Naquadria, 3);
+ giveItemStackRadioHatchAbilites(ItemList.MNqCell_2.get(1), Materials.Naquadria, 6);
+ giveItemStackRadioHatchAbilites(ItemList.MNqCell_4.get(1), Materials.Naquadria, 12);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_MNq_1.get(1), Materials.Naquadria, 3, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_MNq_2.get(1), Materials.Naquadria, 6, 10);
+ giveItemStackRadioHatchAbilites(ItemList.Depleted_MNq_4.get(1), Materials.Naquadria, 12, 10);
+ }
+
+ private static final HashSet<BioVatLogicAdder.MaterialSvPair> MaSv = new HashSet<>();
+ private static final HashMap<ItemStack, Integer> IsSv = new HashMap<>();
+ private static final HashMap<ItemStack, Integer> IsKg = new HashMap<>();
+ private static final HashMap<ItemStack, short[]> IsColor = new HashMap<>();
+
+ public static HashSet<BioVatLogicAdder.MaterialSvPair> getMaSv() {
+ return RadioHatch.MaSv;
+ }
+
+ public static HashMap<ItemStack, Integer> getIsKg() {
+ return IsKg;
+ }
+
+ public static HashMap<ItemStack, Integer> getIsSv() {
+ return RadioHatch.IsSv;
+ }
+
+ public static HashMap<ItemStack, short[]> getIsColor() {
+ return IsColor;
+ }
+
+ public static void setOverrideSvForMaterial(Materials m, int sv) {
+ MaSv.add(new BioVatLogicAdder.MaterialSvPair(m, sv));
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, int sv) {
+ IsSv.put(stack, sv);
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, Materials materials) {
+ IsSv.put(stack, BW_Util.calculateSv(materials));
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, int sv, int kg) {
+ IsSv.put(stack, sv);
+ IsKg.put(stack, kg);
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, Materials materials, int kg) {
+ giveItemStackRadioHatchAbilites(stack, BW_Util.calculateSv(materials), kg);
+ IsColor.put(stack, materials.getRGBA());
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, Materials materials, int kg, int divider) {
+ giveItemStackRadioHatchAbilites(stack, BW_Util.calculateSv(materials) / divider, kg);
+ IsColor.put(stack, materials.getRGBA());
+ }
+
+ public static void giveItemStackRadioHatchAbilites(ItemStack stack, int sv, int kg, short[] color) {
+ giveItemStackRadioHatchAbilites(stack, sv, kg);
+ IsColor.put(stack, color);
+ }
+
+ public static int MaxSV = 150;
+
+ public static int getMaxSv() {
+ int ret = MaxSV;
+ for (MaterialSvPair pair : RadioHatch.getMaSv()) {
+ if (pair.getSievert() > ret) ret = pair.getSievert();
+ }
+ for (ItemStack is : RadioHatch.IsSv.keySet()) {
+ if (RadioHatch.IsSv.get(is) > ret) ret = RadioHatch.IsSv.get(is);
+ }
+ return ret;
+ }
+ }
+
+ public static class BioVatGlass {
+
+ private static final HashMap<BlockMetaPair, Byte> glasses = new HashMap<>();
+
+ /**
+ * @param sModname The modid owning the block
+ * @param sUnlocBlockName The name of the block itself
+ * @param meta The meta of the block
+ * @param tier the glasses Tier = Voltage tier (MIN 3)
+ * @return if the block was found in the Block registry
+ */
+ public static boolean addCustomGlass(String sModname, String sUnlocBlockName, int meta, int tier) {
+ 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();
+ block = null;
+ return ret;
+ }
+
+ /**
+ * @param block the block to add
+ * @param meta the meta of the block (0-15)
+ * @param tier the glasses Tier = Voltage tier (MIN 3)
+ */
+ public static void addCustomGlass(@Nonnull Block block, @Nonnegative int meta, @Nonnegative int tier) {
+ BioVatGlass.glasses.put(new BlockMetaPair(block, (byte) meta), (byte) tier);
+ }
+
+ /**
+ * @param block the block to add
+ * @param tier the glasses Tier = Voltage tier (MIN 3)
+ */
+ public static void addCustomGlass(@Nonnull Block block, @Nonnegative int tier) {
+ BioVatGlass.glasses.put(new BlockMetaPair(block, (byte) 0), (byte) tier);
+ }
+
+ /**
+ * @param blockBytePair the block to add and its meta as a javafx.util Pair
+ * @param tier the glasses Tier = Voltage tier (MIN 3)
+ */
+ public static void addCustomGlass(@Nonnull BlockMetaPair blockBytePair, @Nonnegative byte tier) {
+ BioVatGlass.glasses.put(blockBytePair, tier);
+ }
+
+ public static HashMap<BlockMetaPair, Byte> getGlassMap() {
+ return BioVatGlass.glasses;
+ }
+ }
+
+ public static class MaterialSvPair {
+
+ final Materials materials;
+ final Integer sievert;
+
+ public MaterialSvPair(Materials materials, Integer sievert) {
+ this.materials = materials;
+ this.sievert = sievert;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ BioVatLogicAdder.MaterialSvPair that = (BioVatLogicAdder.MaterialSvPair) o;
+ return Objects.equals(this.getMaterials(), that.getMaterials())
+ && Objects.equals(this.getSievert(), that.getSievert());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.getMaterials(), this.getSievert());
+ }
+
+ public Materials getMaterials() {
+ return this.materials;
+ }
+
+ public Integer getSievert() {
+ return this.sievert;
+ }
+ }
+
+ public static class BlockMetaPair {
+
+ final Block block;
+ final Byte aByte;
+
+ public BlockMetaPair(Block block, Byte aByte) {
+ this.block = block;
+ this.aByte = aByte;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ BioVatLogicAdder.BlockMetaPair that = (BioVatLogicAdder.BlockMetaPair) o;
+ return Objects.equals(this.getBlock(), that.getBlock()) && Objects.equals(this.getaByte(), that.getaByte());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.getBlock(), this.getaByte());
+ }
+
+ public Block getBlock() {
+ return this.block;
+ }
+
+ public Byte getaByte() {
+ return this.aByte;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java
new file mode 100644
index 0000000000..eb4c2a0405
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java
@@ -0,0 +1,211 @@
+package com.github.bartimaeusnek.bartworks.API;
+
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAdder;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered;
+import static gregtech.api.enums.Mods.BartWorks;
+
+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.
+ */
+public class BorosilicateGlass {
+
+ private static Block block, block2;
+ private static List<Pair<Block, Integer>> representatives;
+ private static SetMultimap<Byte, Pair<Block, Integer>> allLevels;
+ private static final Table<Block, Integer, Byte> allLevelsReverse = HashBasedTable.create();
+
+ private static boolean isValidTier(int tier) {
+ return tier > 0 && tier <= Byte.MAX_VALUE;
+ }
+
+ private static Block getGlassBlock() {
+ if (block == null) {
+ block = GameRegistry.findBlock(BartWorks.ID, "BW_GlasBlocks");
+ }
+ return block;
+ }
+
+ private static Block getGlassBlock2() {
+ if (block2 == null) {
+ block2 = GameRegistry.findBlock(BartWorks.ID, "BW_GlasBlocks2");
+ }
+ return block2;
+ }
+
+ 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);
+ }
+
+ private static SetMultimap<Byte, Pair<Block, Integer>> getAllLevels() {
+ if (allLevels == null) {
+ SetMultimap<Byte, Pair<Block, Integer>> ret = LinkedHashMultimap.create();
+ Block block = getGlassBlock();
+ doRegister((byte) 3, block, 0, ret);
+ doRegister((byte) 4, block, 1, ret);
+ doRegister((byte) 5, block, 12, ret);
+ doRegister((byte) 5, block, 2, ret);
+ doRegister((byte) 6, block, 3, ret);
+ doRegister((byte) 7, block, 4, ret);
+ doRegister((byte) 8, block, 5, ret);
+ for (int i = 6; i < 12; i++) {
+ doRegister((byte) 3, block, i, ret);
+ }
+ doRegister((byte) 9, block, 13, ret);
+ doRegister((byte) 10, block, 14, ret);
+ doRegister((byte) 11, block, 15, ret);
+ block = getGlassBlock2();
+ doRegister((byte) 12, block, 0, ret);
+ allLevels = ret;
+ }
+ return allLevels;
+ }
+
+ private static List<Pair<Block, Integer>> getRepresentatives() {
+ if (representatives == null) {
+ SetMultimap<Byte, Pair<Block, Integer>> allLevels = getAllLevels();
+ ArrayList<Pair<Block, Integer>> ret = new ArrayList<>();
+ for (Byte level : new PriorityQueue<>(allLevels.keySet())) {
+ ret.add(
+ allLevels.get(level)
+ .iterator()
+ .next());
+ }
+ representatives = ret;
+ }
+ return representatives;
+ }
+
+ private static Byte checkWithinBound(byte val, byte lo, byte hi) {
+ return val > hi || val < lo ? null : val;
+ }
+
+ /**
+ * Register a new block as valid borosilicate glass with given tier (even if it doesn't contain boron at all)
+ *
+ * Does not support matching by more complex stuff like tile entity!
+ *
+ * Can only be called at INIT stage.
+ */
+ public static void registerGlass(Block block, int meta, byte tier) {
+ if (Loader.instance()
+ .hasReachedState(LoaderState.POSTINITIALIZATION)) throw new IllegalStateException("register too late!");
+ if (!Loader.instance()
+ .hasReachedState(LoaderState.INITIALIZATION)) throw new IllegalStateException("register too early!");
+ if (!isValidTier(tier)) throw new IllegalArgumentException("not a valid tier: " + tier);
+ doRegister(tier, block, meta, getAllLevels());
+ }
+
+ /**
+ * Check if there is at least one type of boroglass in that tier.
+ */
+ public static boolean hasGlassInTier(int tier) {
+ return getAllLevels().containsKey((byte) tier);
+ }
+
+ /**
+ * 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.
+ */
+ public static <T> IStructureElement<T> ofBoroGlass(int tier) {
+ if (!hasGlassInTier(tier)) throw new IllegalArgumentException();
+ return lazy(t -> {
+ Pair<Block, Integer> pair = getRepresentatives().get(tier - 3);
+ return ofBlockAdder((t1, block1, meta) -> getTier(block1, meta) == tier, pair.getKey(), pair.getValue());
+ });
+ }
+
+ /**
+ * 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.
+ */
+ public static <T> IStructureElement<T> ofBoroGlassAnyTier() {
+ return lazy(t -> ofBlockAnyMeta(getGlassBlock()));
+ }
+
+ /**
+ * 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.
+ *
+ * @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) {
+ 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.
+ *
+ * @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) {
+ 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));
+ }
+
+ /**
+ * 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
+ */
+ public static byte getTier(Block block, int meta) {
+ Byte ret = allLevelsReverse.get(block, meta);
+ return ret == null ? -1 : ret;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java
new file mode 100644
index 0000000000..4a85029994
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+public interface INoiseGen {
+
+ double getNoise(int x, int z);
+
+ double[][] getNoiseForRegion(int xStart, int zStart, int xEnd, int zEnd);
+
+ void setOctaves(int octaves);
+
+ void setFrequency(double freq);
+
+ void setSeed(long seed);
+
+ void setAmplitude(double amplitude);
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
new file mode 100644
index 0000000000..9d2e2d7829
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import net.minecraft.item.ItemStack;
+
+public interface IRadMaterial {
+
+ /**
+ * @return the amount of Radiation (0-150, commonly, higher values are possible but not recommended!)
+ */
+ int getRadiationLevel(ItemStack aStack);
+
+ /**
+ * @return 1 for stick, 2 for long rods, 3 for fuel rods
+ */
+ byte getAmountOfMaterial(ItemStack aStack);
+
+ /**
+ * @return the color of the material for display purposes
+ */
+ short[] getColorForGUI(ItemStack aStack);
+
+ /**
+ * @return the name of the material for display purposes
+ */
+ String getNameForGUI(ItemStack aStack);
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java
new file mode 100644
index 0000000000..d74263115b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+public interface ITileAddsInformation {
+
+ String[] getInfoData();
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java
new file mode 100644
index 0000000000..1f75115752
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import net.minecraft.inventory.ISidedInventory;
+
+public interface ITileDropsContent extends ISidedInventory {
+
+ default int[] getDropSlots() {
+ return new int[] { 0 };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java
new file mode 100644
index 0000000000..698c28fbf7
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+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];
+
+ @SideOnly(Side.CLIENT)
+ default IIcon getTextureForSide(ForgeDirection side, int meta) {
+ return texture[side.ordinal()];
+ }
+
+ @SideOnly(Side.CLIENT)
+ default IIcon getTextureForSide(int side, int meta) {
+ return this.getTextureForSide(ForgeDirection.values()[side], meta);
+ }
+
+ @SideOnly(Side.CLIENT)
+ void registerBlockIcons(IIconRegister par1IconRegister);
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java
new file mode 100644
index 0000000000..88ae5bf5c0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/SideReference.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+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 class Side {
+
+ public static final boolean Server = FMLCommonHandler.instance()
+ .getSide()
+ .isServer();
+ public static final boolean Client = FMLCommonHandler.instance()
+ .getSide()
+ .isClient();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java
new file mode 100644
index 0000000000..b83ce7d128
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/VoidMinerDropAdder.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import com.github.bartimaeusnek.crossmod.galacticgreg.VoidMinerUtility;
+
+import gregtech.api.interfaces.ISubTagContainer;
+
+public class VoidMinerDropAdder {
+
+ public static void addDropsToDim(int dimID, ISubTagContainer material, float chance) {
+ VoidMinerUtility.addMaterialToDimensionList(dimID, material, chance);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
new file mode 100644
index 0000000000..01c172382f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+
+public final class WerkstoffAPI {
+
+ @SuppressWarnings("rawtypes")
+ static Class w;
+
+ static {
+ try {
+ w = Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader");
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static Werkstoff getWerkstoff(String aName) throws NoSuchFieldException, IllegalAccessException {
+ return (Werkstoff) w.getField(aName)
+ .get(null);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java
new file mode 100644
index 0000000000..2cd29281f4
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import java.util.HashSet;
+
+public final class WerkstoffAdderRegistry {
+
+ private static final HashSet<Runnable> toRun = new HashSet<>();
+
+ private WerkstoffAdderRegistry() {}
+
+ public static void addWerkstoffAdder(Runnable adder) {
+ toRun.add(adder);
+ }
+
+ public static void run() {
+ for (Runnable r : toRun) r.run();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
new file mode 100644
index 0000000000..620e9d65af
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
@@ -0,0 +1,61 @@
+package com.github.bartimaeusnek.bartworks.API.modularUI;
+
+import static com.github.bartimaeusnek.bartworks.MainMod.MOD_ID;
+
+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 SLOT_BROWN = AdaptableUITexture.of(MOD_ID, "GUI/slot/brown", 18, 18, 1);
+
+ public static final UITexture OVERLAY_SLOT_DISH = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/dish");
+ public static final UITexture OVERLAY_SLOT_DNA_FLASK = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/dna_flask");
+ public static final UITexture OVERLAY_SLOT_MODULE = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/module");
+ public static final UITexture OVERLAY_SLOT_ROD = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/rod");
+ 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_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_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_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 OVERLAY_BUTTON_ASSEMBLER_MODE = UITexture
+ .fullImage(MOD_ID, "GUI/overlay_button/assembler_mode");
+ public static final UITexture OVERLAY_BUTTON_LINE_MODE = UITexture
+ .fullImage(MOD_ID, "GUI/overlay_button/line_mode");
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java
new file mode 100644
index 0000000000..4bef7a0cad
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/package-info.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 = Mods.Names.BART_WORKS, apiVersion = API_REFERENCE.VERSION, provides = "bartworks API")
+package com.github.bartimaeusnek.bartworks.API;
+
+import cpw.mods.fml.common.API;
+import gregtech.api.enums.Mods;
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BWNBTDependantCraftingRecipe.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BWNBTDependantCraftingRecipe.java
new file mode 100644
index 0000000000..dfcf94115a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BWNBTDependantCraftingRecipe.java
@@ -0,0 +1,76 @@
+package com.github.bartimaeusnek.bartworks.API.recipe;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+import net.minecraft.inventory.InventoryCrafting;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.world.World;
+
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
+public class BWNBTDependantCraftingRecipe implements IRecipe {
+
+ ItemStack result;
+ Map<Character, ItemStack> charToStackMap = new HashMap<>(9, 1);
+ String[] shape;
+
+ @SuppressWarnings({ "SuspiciousSystemArraycopy" })
+ public BWNBTDependantCraftingRecipe(ItemStack result, Object... recipe) {
+ this.result = result;
+ this.shape = new String[3];
+ System.arraycopy(recipe, 0, this.shape, 0, 3);
+ this.charToStackMap.put(' ', null);
+ for (int i = 3; i < recipe.length; i += 2) {
+ this.charToStackMap.put((char) recipe[i], ((ItemStack) recipe[i + 1]).copy());
+ }
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof BWNBTDependantCraftingRecipe that)) return false;
+
+ if (!Objects.equals(this.result, that.result) || !Objects.equals(this.charToStackMap, that.charToStackMap))
+ return false;
+ // Probably incorrect - comparing Object[] arrays with Arrays.equals
+ return Arrays.equals(this.shape, that.shape);
+ }
+
+ @Override
+ public int hashCode() {
+ int result1 = this.result != null ? this.result.hashCode() : 0;
+ result1 = 31 * result1 + (this.charToStackMap != null ? this.charToStackMap.hashCode() : 0);
+ return 31 * result1 + Arrays.hashCode(this.shape);
+ }
+
+ @Override
+ public boolean matches(InventoryCrafting p_77569_1_, World p_77569_2_) {
+ for (int x = 0; x < 3; x++) {
+ for (int y = 0; y < 3; y++) {
+ ItemStack toCheck = p_77569_1_.getStackInRowAndColumn(y, x);
+ ItemStack ref = this.charToStackMap.get(this.shape[x].toCharArray()[y]);
+ if (!BW_Util.areStacksEqualOrNull(toCheck, ref)) return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public ItemStack getCraftingResult(InventoryCrafting p_77572_1_) {
+ return this.result.copy();
+ }
+
+ @Override
+ public int getRecipeSize() {
+ return 10;
+ }
+
+ @Override
+ public ItemStack getRecipeOutput() {
+ return this.result;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BacterialVatFrontend.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BacterialVatFrontend.java
new file mode 100644
index 0000000000..01cf2ecd32
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BacterialVatFrontend.java
@@ -0,0 +1,92 @@
+package com.github.bartimaeusnek.bartworks.API.recipe;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
+import com.gtnewhorizons.modularui.api.math.Alignment;
+
+import gregtech.api.recipe.BasicUIPropertiesBuilder;
+import gregtech.api.recipe.NEIRecipePropertiesBuilder;
+import gregtech.api.recipe.RecipeMapFrontend;
+import gregtech.api.util.MethodsReturnNonnullByDefault;
+import gregtech.nei.GT_NEI_DefaultHandler;
+import gregtech.nei.RecipeDisplayInfo;
+import gregtech.nei.formatter.INEISpecialInfoFormatter;
+
+@ParametersAreNonnullByDefault
+@MethodsReturnNonnullByDefault
+public class BacterialVatFrontend extends RecipeMapFrontend {
+
+ public BacterialVatFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder,
+ NEIRecipePropertiesBuilder neiPropertiesBuilder) {
+ super(
+ uiPropertiesBuilder,
+ neiPropertiesBuilder.neiSpecialInfoFormatter(new BacterialVatSpecialValueFormatter()));
+ }
+
+ @Override
+ protected List<String> handleNEIItemInputTooltip(List<String> currentTip,
+ GT_NEI_DefaultHandler.FixedPositionedStack pStack) {
+ if (pStack.isFluid()) {
+ currentTip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("nei.biovat.input.tooltip"));
+ return currentTip;
+ }
+ return super.handleNEIItemInputTooltip(currentTip, pStack);
+ }
+
+ @Override
+ protected List<String> handleNEIItemOutputTooltip(List<String> currentTip,
+ GT_NEI_DefaultHandler.FixedPositionedStack pStack) {
+ if (pStack.isFluid()) {
+ currentTip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("nei.biovat.output.tooltip"));
+ return currentTip;
+ }
+ return super.handleNEIItemOutputTooltip(currentTip, pStack);
+ }
+
+ @Override
+ protected void drawNEIOverlayForInput(GT_NEI_DefaultHandler.FixedPositionedStack stack) {
+ drawFluidOverlay(stack);
+ }
+
+ @Override
+ protected void drawNEIOverlayForOutput(GT_NEI_DefaultHandler.FixedPositionedStack stack) {
+ drawFluidOverlay(stack);
+ }
+
+ private void drawFluidOverlay(GT_NEI_DefaultHandler.FixedPositionedStack stack) {
+ if (stack.isFluid()) {
+ drawNEIOverlayText(
+ "+",
+ stack,
+ colorOverride.getTextColorOrDefault("nei_overlay_yellow", 0xFDD835),
+ 0.5f,
+ true,
+ Alignment.TopRight);
+ return;
+ }
+ super.drawNEIOverlayForOutput(stack);
+ }
+
+ private static class BacterialVatSpecialValueFormatter implements INEISpecialInfoFormatter {
+
+ @Override
+ public List<String> format(RecipeDisplayInfo recipeInfo) {
+ int[] tSpecialA = GT_TileEntity_BioVat.specialValueUnpack(recipeInfo.recipe.mSpecialValue);
+ String glassTier = StatCollector.translateToLocalFormatted("nei.biovat.0.name", tSpecialA[0]);
+ String sievert;
+ if (tSpecialA[2] == 1) {
+ sievert = StatCollector.translateToLocalFormatted("nei.biovat.1.name", tSpecialA[3]);
+ } else {
+ sievert = StatCollector.translateToLocalFormatted("nei.biovat.2.name", tSpecialA[3]);
+ }
+ return Arrays.asList(glassTier, sievert);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BartWorksRecipeMaps.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BartWorksRecipeMaps.java
new file mode 100644
index 0000000000..281184893c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/BartWorksRecipeMaps.java
@@ -0,0 +1,91 @@
+package com.github.bartimaeusnek.bartworks.API.recipe;
+
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
+
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMapBackend;
+import gregtech.api.recipe.RecipeMapBuilder;
+import gregtech.api.recipe.maps.FuelBackend;
+import gregtech.nei.formatter.FuelSpecialValueFormatter;
+
+public class BartWorksRecipeMaps {
+
+ public static final RecipeMap<RecipeMapBackend> bioLabRecipes = RecipeMapBuilder.of("bw.recipe.biolab")
+ .maxIO(6, 2, 1, 0)
+ .minInputs(1, 1)
+ .useSpecialSlot()
+ .slotOverlays((index, isFluid, isOutput, isSpecial) -> {
+ if (isSpecial) {
+ return BW_UITextures.OVERLAY_SLOT_MODULE;
+ }
+ if (isFluid) {
+ return GT_UITextures.OVERLAY_SLOT_VIAL_2;
+ }
+ if (!isOutput) {
+ switch (index) {
+ case 0:
+ return BW_UITextures.OVERLAY_SLOT_DISH;
+ case 1:
+ return BW_UITextures.OVERLAY_SLOT_DNA_FLASK;
+ case 2:
+ return GT_UITextures.OVERLAY_SLOT_CIRCUIT;
+ case 3:
+ return GT_UITextures.OVERLAY_SLOT_MOLECULAR_1;
+ case 4:
+ return GT_UITextures.OVERLAY_SLOT_MOLECULAR_2;
+ case 5:
+ return GT_UITextures.OVERLAY_SLOT_DATA_ORB;
+ }
+ }
+ return null;
+ })
+ .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
+ .logo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .logoSize(47, 21)
+ .logoPos(125, 3)
+ .disableRegisterNEI()
+ .build();
+ public static final RecipeMap<RecipeMapBackend> bacterialVatRecipes = RecipeMapBuilder.of("bw.recipe.BacteriaVat")
+ .maxIO(6, 2, 1, 1)
+ .minInputs(0, 1)
+ .useSpecialSlot()
+ .specialSlotSensitive()
+ .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
+ .frontend(BacterialVatFrontend::new)
+ .disableRegisterNEI()
+ .build();
+ public static final RecipeMap<FuelBackend> acidGenFuels = RecipeMapBuilder.of("bw.fuels.acidgens", FuelBackend::new)
+ .maxIO(1, 1, 0, 0)
+ .neiSpecialInfoFormatter(FuelSpecialValueFormatter.INSTANCE)
+ .build();
+ public static final RecipeMap<RecipeMapBackend> circuitAssemblyLineRecipes = RecipeMapBuilder.of("bw.recipe.cal")
+ .maxIO(6, 1, 1, 0)
+ .minInputs(1, 1)
+ .useSpecialSlot()
+ .specialSlotSensitive()
+ .progressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER)
+ .build();
+ public static final RecipeMap<RecipeMapBackend> radioHatchRecipes = RecipeMapBuilder.of("bw.recipe.radhatch")
+ .maxIO(1, 0, 0, 0)
+ .minInputs(1, 0)
+ .slotOverlays((index, isFluid, isOutput, isSpecial) -> BW_UITextures.OVERLAY_SLOT_ROD)
+ .logo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .logoSize(47, 21)
+ .logoPos(118, 55)
+ .dontUseProgressBar()
+ .addSpecialTexture(74, 20, 29, 27, BW_UITextures.PICTURE_RADIATION)
+ .frontend(RadioHatchFrontend::new)
+ .build();
+ public static final RecipeMap<RecipeMapBackend> electricImplosionCompressorRecipes = RecipeMapBuilder
+ .of("gt.recipe.electricimplosioncompressor")
+ .maxIO(6, 2, 1, 1)
+ .slotOverlays(
+ (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_IMPLOSION
+ : null)
+ .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS)
+ .build();
+ public static final RecipeMap<RecipeMapBackend> htgrFakeRecipes = RecipeMapBuilder.of("bw.recipe.htgr")
+ .maxIO(1, 1, 0, 0)
+ .build();
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/DynamicGTRecipe.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/DynamicGTRecipe.java
new file mode 100644
index 0000000000..d409d3ab26
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/DynamicGTRecipe.java
@@ -0,0 +1,34 @@
+package com.github.bartimaeusnek.bartworks.API.recipe;
+
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+
+import gregtech.api.util.GT_Recipe;
+
+public 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) {
+ super(
+ aOptimize,
+ aInputs,
+ aOutputs,
+ aSpecialItems,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSpecialValue);
+ if (originalRecipe != null) {
+ this.owners = new ArrayList<>(originalRecipe.owners);
+ this.stackTraces = new ArrayList<>(originalRecipe.stackTraces);
+ this.setOwner(MainMod.MOD_ID);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/RadioHatchFrontend.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/RadioHatchFrontend.java
new file mode 100644
index 0000000000..a6cf4b180e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/API/recipe/RadioHatchFrontend.java
@@ -0,0 +1,45 @@
+package com.github.bartimaeusnek.bartworks.API.recipe;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
+import net.minecraft.util.StatCollector;
+
+import gregtech.api.recipe.BasicUIPropertiesBuilder;
+import gregtech.api.recipe.NEIRecipePropertiesBuilder;
+import gregtech.api.recipe.RecipeMapFrontend;
+import gregtech.api.util.MethodsReturnNonnullByDefault;
+import gregtech.nei.RecipeDisplayInfo;
+import gregtech.nei.formatter.INEISpecialInfoFormatter;
+
+@ParametersAreNonnullByDefault
+@MethodsReturnNonnullByDefault
+public class RadioHatchFrontend extends RecipeMapFrontend {
+
+ public RadioHatchFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder,
+ NEIRecipePropertiesBuilder neiPropertiesBuilder) {
+ super(uiPropertiesBuilder, neiPropertiesBuilder.neiSpecialInfoFormatter(new RadioHatchSpecialInfoFormatter()));
+ }
+
+ @Override
+ protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) {}
+
+ @Override
+ protected void drawDurationInfo(RecipeDisplayInfo recipeInfo) {}
+
+ private static class RadioHatchSpecialInfoFormatter implements INEISpecialInfoFormatter {
+
+ @Override
+ public List<String> format(RecipeDisplayInfo recipeInfo) {
+ int radioLevel = recipeInfo.recipe.mEUt;
+ int amount = recipeInfo.recipe.mDuration;
+ long time = recipeInfo.recipe.mSpecialValue;
+ return Arrays.asList(
+ StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", radioLevel),
+ StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", amount),
+ StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.2", time * amount / 20.0));
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java
new file mode 100644
index 0000000000..725a0135a4
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/ASMUtils.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.ASM;
+
+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 {
+
+ public static String matchAny(String toCompare, String... args) {
+ for (String arg : args) {
+ if (toCompare.equalsIgnoreCase(arg)) return arg;
+ }
+ return "";
+ }
+
+ /**
+ * Call this Method twice, one time for the Descriptor and one time for the Name.
+ */
+ public static boolean isCorrectMethod(MethodNode methodNode, String... args) {
+ for (String arg : args) {
+ if (methodNode.name.equalsIgnoreCase(arg) || methodNode.desc.equalsIgnoreCase(arg)) return true;
+ }
+ return false;
+ }
+
+ public static boolean writeClassToDisk(byte[] towrite, String Classname, String Path) {
+ try {
+ if (Path.charAt(Path.length() - 1) == '/' || Path.charAt(Path.length() - 1) == '\\')
+ Path = Path.substring(0, Path.length() - 1);
+ OutputStream os = new FileOutputStream(new File(Path + '/' + Classname + ".class"));
+ os.write(towrite);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java
new file mode 100644
index 0000000000..54598f9478
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.ExtraUtilities;
+import static gregtech.api.enums.Mods.GTPlusPlus;
+import static gregtech.api.enums.Mods.RWG;
+import static gregtech.api.enums.Mods.Thaumcraft;
+
+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;
+
+public class BWCore extends DummyModContainer {
+
+ public static final String BWCORE_NAME = "BartWorks ASM Core";
+ public static final Logger BWCORE_LOG = LogManager.getLogger(BWCore.BWCORE_NAME);
+
+ public BWCore() {
+ super(new ModMetadata());
+ ModMetadata metadata = this.getMetadata();
+ metadata.modId = "BWCore";
+ metadata.name = BWCore.BWCORE_NAME;
+ metadata.version = "0.0.1";
+ metadata.authorList.add("bartimaeusnek");
+ metadata.dependants = this.getDependants();
+ metadata.parent = MainMod.MOD_ID;
+ }
+
+ @Subscribe
+ public void preInit(FMLPreInitializationEvent event) {
+ shouldTransform[0] = ConfigHandler.enabledPatches[0];
+ shouldTransform[1] = ConfigHandler.enabledPatches[1];
+ shouldTransform[2] = ConfigHandler.enabledPatches[2];
+ shouldTransform[3] = ConfigHandler.enabledPatches[3];
+ BWCore.BWCORE_LOG.info("Extra Utilities found and ASM Patch enabled? " + shouldTransform[0]);
+ BWCore.BWCORE_LOG.info("Thaumcraft found and ASM Patch enabled? " + shouldTransform[2]);
+ }
+
+ @Override
+ public List<ArtifactVersion> getDependants() {
+ List<ArtifactVersion> ret = new ArrayList<>();
+ ret.add(new DefaultArtifactVersion(ExtraUtilities.ID, true));
+ ret.add(new DefaultArtifactVersion(Thaumcraft.ID, true));
+ ret.add(new DefaultArtifactVersion(GTPlusPlus.ID, true));
+ ret.add(new DefaultArtifactVersion(RWG.ID, true));
+ ret.add(new DefaultArtifactVersion(MainMod.MOD_ID, true));
+ ret.add(new DefaultArtifactVersion(BartWorksCrossmod.MOD_ID, true));
+ return ret;
+ }
+
+ @Override
+ public boolean registerBus(EventBus bus, LoadController controller) {
+ bus.register(this);
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java
new file mode 100644
index 0000000000..f7fde1167d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCorePlugin.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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")
+@IFMLLoadingPlugin.Name(BWCorePlugin.BWCORE_PLUGIN_NAME)
+public class BWCorePlugin implements IFMLLoadingPlugin {
+
+ public static final String BWCORE_PLUGIN_NAME = "BartWorks ASM Core Plugin";
+
+ public static File minecraftDir;
+
+ public BWCorePlugin() {
+ // Injection Code taken from CodeChickenLib
+ if (BWCorePlugin.minecraftDir != null) return; // get called twice, once for IFMLCallHook
+ BWCorePlugin.minecraftDir = (File) FMLInjectionData.data()[6];
+ // do all the configuration already now...
+ new ConfigHandler(new Configuration(new File(new File(BWCorePlugin.minecraftDir, "config"), "bartworks.cfg")));
+ BWCoreTransformer.shouldTransform[2] = false;
+ }
+
+ @Override
+ public String[] getASMTransformerClass() {
+ return new String[] { BWCoreTransformer.class.getName() };
+ }
+
+ @Override
+ public String getModContainerClass() {
+ return BWCore.class.getName();
+ }
+
+ @Override
+ public String getSetupClass() {
+ return null;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public void injectData(Map<String, Object> data) {
+ if (data.get("runtimeDeobfuscationEnabled") != null) {
+ BWCoreTransformer.obfs = (boolean) data.get("runtimeDeobfuscationEnabled");
+ }
+ if (data.get("coremodList") != null) {
+ for (Object o : (ArrayList) data.get("coremodList")) {
+ if (o.toString()
+ .contains("MicdoodlePlugin")) {
+ BWCoreTransformer.shouldTransform[2] = ConfigHandler.enabledPatches[2];
+ break;
+ }
+ }
+ }
+ }
+
+ @Override
+ public String getAccessTransformerClass() {
+ return null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java
new file mode 100644
index 0000000000..38a5a70d27
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreStaticReplacementMethodes.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+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);
+
+ public static void clearRecentlyUsedRecipes() {
+ // the easiest way to ensure the cache is flushed without causing synchronization overhead
+ // is to just replace the whole ThreadLocal instance.
+ RECENTLYUSEDRECIPES = ThreadLocal.withInitial(AccessPriorityList::new);
+ }
+
+ public static ItemStack findCachedMatchingRecipe(InventoryCrafting inventoryCrafting, World world) {
+ int i = 0;
+ ItemStack itemstack = null;
+ ItemStack itemstack1 = null;
+ int j;
+
+ for (j = 0; j < inventoryCrafting.getSizeInventory(); ++j) {
+ ItemStack itemstack2 = inventoryCrafting.getStackInSlot(j);
+
+ if (itemstack2 != null) {
+ if (i == 0) itemstack = itemstack2;
+
+ if (i == 1) itemstack1 = itemstack2;
+
+ ++i;
+ }
+ }
+
+ if (i == 2 && itemstack.getItem() == itemstack1.getItem()
+ && itemstack.stackSize == 1
+ && itemstack1.stackSize == 1
+ && itemstack.getItem()
+ .isRepairable()) {
+ Item item = itemstack.getItem();
+ int j1 = item.getMaxDamage() - itemstack.getItemDamageForDisplay();
+ int k = item.getMaxDamage() - itemstack1.getItemDamageForDisplay();
+ int l = j1 + k + item.getMaxDamage() * 5 / 100;
+ int i1 = item.getMaxDamage() - l;
+
+ if (i1 < 0) i1 = 0;
+
+ return new ItemStack(itemstack.getItem(), 1, i1);
+
+ }
+ IRecipe iPossibleRecipe = null;
+ AccessPriorityList<IRecipe> cache = RECENTLYUSEDRECIPES.get();
+ Iterator<AccessPriorityListNode<IRecipe>> it = cache.nodeIterator();
+
+ while (it.hasNext()) {
+ AccessPriorityListNode<IRecipe> recipeNode = it.next();
+ iPossibleRecipe = recipeNode.getELEMENT();
+
+ if (!iPossibleRecipe.matches(inventoryCrafting, world)) continue;
+
+ cache.addPrioToNode(recipeNode);
+ return iPossibleRecipe.getCraftingResult(inventoryCrafting);
+ }
+
+ HashSet<IRecipe> recipeSet = new NonNullWrappedHashSet<>();
+ List<IRecipe> recipeList = CraftingManager.getInstance()
+ .getRecipeList();
+
+ for (IRecipe r : recipeList) {
+ if (r.matches(inventoryCrafting, world)) recipeSet.add(r);
+ }
+
+ Object[] arr = recipeSet.toArray();
+
+ if (arr.length == 0) return null;
+
+ IRecipe recipe = (IRecipe) arr[0];
+ ItemStack stack = recipe.getCraftingResult(inventoryCrafting);
+
+ if (arr.length != 1) return stack;
+
+ if (stack != null) cache.addLast(recipe);
+
+ return stack;
+ }
+
+ private BWCoreStaticReplacementMethodes() {}
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java
new file mode 100644
index 0000000000..02835e39c2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 org.objectweb.asm.Opcodes.ACC_PUBLIC;
+import static org.objectweb.asm.Opcodes.ACONST_NULL;
+import static org.objectweb.asm.Opcodes.ALOAD;
+import static org.objectweb.asm.Opcodes.ARETURN;
+import static org.objectweb.asm.Opcodes.GETFIELD;
+import static org.objectweb.asm.Opcodes.ICONST_0;
+import static org.objectweb.asm.Opcodes.IFNE;
+import static org.objectweb.asm.Opcodes.INVOKESTATIC;
+import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
+import static org.objectweb.asm.Opcodes.IRETURN;
+import static org.objectweb.asm.Opcodes.POP;
+
+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.AbstractInsnNode;
+import org.objectweb.asm.tree.ClassNode;
+import org.objectweb.asm.tree.FieldInsnNode;
+import org.objectweb.asm.tree.InsnList;
+import org.objectweb.asm.tree.InsnNode;
+import org.objectweb.asm.tree.JumpInsnNode;
+import org.objectweb.asm.tree.LabelNode;
+import org.objectweb.asm.tree.MethodInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+import org.objectweb.asm.tree.VarInsnNode;
+
+public class BWCoreTransformer implements IClassTransformer {
+
+ public static final String[] DESCRIPTIONFORCONFIG = { "REMOVING RAIN FROM LAST MILLENNIUM (EXU)",
+ "REMOVING CREATURES FROM LAST MILLENNIUM (EXU)", "PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION",
+ "PATCHING CRAFTING MANAGER FOR CACHING RECIPES" };
+ public static final String[] CLASSESBEINGTRANSFORMED = {
+ "com.rwtema.extrautils.worldgen.endoftime.WorldProviderEndOfTime",
+ "com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime", "thaumcraft.common.tiles.TileWandPedestal",
+ "net.minecraft.item.crafting.CraftingManager" };
+ static boolean obfs;
+
+ public static boolean[] shouldTransform = new boolean[BWCoreTransformer.CLASSESBEINGTRANSFORMED.length];
+
+ /**
+ * Made by DarkShaddow44
+ */
+ private static MethodNode transformThaumcraftWandPedestal(MethodNode method) {
+ InsnList nu = new InsnList();
+ for (int j = 0; j < method.instructions.size(); j++) {
+ AbstractInsnNode instruction = method.instructions.get(j);
+ nu.add(instruction);
+ if (instruction.getOpcode() == INVOKEVIRTUAL) {
+ MethodInsnNode invokevirtual = (MethodInsnNode) instruction;
+ if ("addVis".equals(invokevirtual.name)) {
+ AbstractInsnNode beginning = method.instructions.get(j - 7);
+ LabelNode label = new LabelNode();
+ nu.insertBefore(beginning, new VarInsnNode(ALOAD, 0));
+ nu.insertBefore(
+ beginning,
+ new FieldInsnNode(
+ GETFIELD,
+ "thaumcraft/common/tiles/TileWandPedestal",
+ obfs ? "field_145850_b" : "worldObj",
+ "Lnet/minecraft/world/World;"));
+ nu.insertBefore(
+ beginning,
+ new FieldInsnNode(
+ 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);
+ j++; // Skip actual Pop
+ }
+ }
+ }
+ method.instructions = nu;
+ return method;
+ }
+
+ 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!");
+ return basicClass;
+ }
+
+ if (id < BWCoreTransformer.CLASSESBEINGTRANSFORMED.length) {
+ BWCore.BWCORE_LOG.info(BWCoreTransformer.DESCRIPTIONFORCONFIG[id]);
+ ClassReader classReader = new ClassReader(basicClass);
+ ClassNode classNode = new ClassNode();
+ classReader.accept(classNode, ClassReader.SKIP_FRAMES);
+ List<MethodNode> methods = classNode.methods;
+ scase: switch (id) {
+ case 0: {
+ BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ String name_deObfs = "canDoRainSnowIce";
+
+ String dsc_deObfs = "(Lnet/minecraft/world/chunk/Chunk;)Z";
+ for (int i = 0; i < methods.size(); i++) {
+ if (methods.get(i).name.equalsIgnoreCase(name_deObfs)) {
+ BWCore.BWCORE_LOG.info("Found " + name_deObfs + "! Removing!");
+ methods.remove(i);
+ break;
+ }
+ }
+ BWCore.BWCORE_LOG.info("Creating new " + name_deObfs + "!");
+ MethodNode nu = new MethodNode(ACC_PUBLIC, name_deObfs, dsc_deObfs, null, new String[0]);
+ InsnList insnList = new InsnList();
+ insnList.add(new InsnNode(ICONST_0));
+ insnList.add(new InsnNode(IRETURN));
+ nu.instructions = insnList;
+ nu.maxLocals = 1;
+ nu.maxStack = 1;
+ methods.add(nu);
+ break;
+ }
+ case 1: {
+ BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ String name_deObfs = "getPossibleCreatures";
+ String name_src = "func_73155_a";
+ String name_Obfs = "a";
+ String dsc_deObfs = "(Lnet/minecraft/entity/EnumCreatureType;III)Ljava/util/List;";
+ String dsc_Obfs = "(Lsx;III)Ljava/util/List;";
+
+ for (int i = 0; i < methods.size(); i++) {
+ if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs, name_Obfs, name_src)
+ && ASMUtils.isCorrectMethod(methods.get(i), dsc_deObfs, dsc_Obfs)) {
+ BWCore.BWCORE_LOG.info("Found " + name_deObfs + "! Patching!");
+ MethodNode toPatch = methods.get(i);
+ InsnList insnList = new InsnList();
+ insnList.add(new InsnNode(ACONST_NULL));
+ insnList.add(new InsnNode(ARETURN));
+ toPatch.instructions = insnList;
+ toPatch.maxStack = 1;
+ toPatch.maxLocals = 5;
+ methods.set(i, toPatch);
+ break scase;
+ }
+ }
+ }
+ case 2: {
+ BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ String name_deObfs = "updateEntity";
+ String name_src = "func_145845_h";
+ String name_Obfs = "h";
+ String dsc_universal = "()V";
+
+ for (int i = 0; i < methods.size(); i++) {
+ if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs, name_Obfs, name_src)
+ && ASMUtils.isCorrectMethod(methods.get(i), dsc_universal, dsc_universal)) {
+ BWCore.BWCORE_LOG.info("Found " + name_deObfs + "! Patching!");
+ methods.set(i, BWCoreTransformer.transformThaumcraftWandPedestal(methods.get(i)));
+ break scase;
+ }
+ }
+ }
+ case 3: {
+ BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ String name_deObfs = "findMatchingRecipe";
+ String name_Obfs = "a";
+ String name_src = "func_82787_a";
+ for (MethodNode toPatch : methods) {
+ if (ASMUtils.isCorrectMethod(toPatch, name_deObfs, name_Obfs, name_src)) {
+ 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 InsnNode(ARETURN));
+ toPatch.localVariables.clear();
+ toPatch.maxStack = 2;
+ toPatch.maxLocals = 3;
+ break scase;
+ }
+ }
+ }
+
+ default: {
+ BWCore.BWCORE_LOG.info("Could not find: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ return basicClass;
+ }
+ }
+
+ classNode.methods = methods;
+ ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
+ classNode.accept(classWriter);
+ byte[] ret = classWriter.toByteArray();
+ if (Arrays.hashCode(basicClass) == Arrays.hashCode(ret))
+ BWCore.BWCORE_LOG.warn("Could not patch: " + BWCoreTransformer.CLASSESBEINGTRANSFORMED[id]);
+ return ret;
+ }
+ return basicClass;
+ }
+
+ @Override
+ public byte[] transform(String name, String transformedName, byte[] basicClass) {
+ for (int i = 0; i < BWCoreTransformer.CLASSESBEINGTRANSFORMED.length; i++) {
+ if (name.equalsIgnoreCase(BWCoreTransformer.CLASSESBEINGTRANSFORMED[i])
+ || transformedName.equalsIgnoreCase(BWCoreTransformer.CLASSESBEINGTRANSFORMED[i]))
+ return BWCoreTransformer.transform(i, basicClass);
+ }
+ return basicClass;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
new file mode 100644
index 0000000000..c104d09f3a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks;
+
+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
+ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+ return null;
+ }
+
+ @Override
+ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+ if (!SideReference.Side.Client) return this.getServerGuiElement(ID, player, world, x, y, z);
+ return null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
new file mode 100644
index 0000000000..818b67d6fc
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -0,0 +1,239 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.common.loaders.BioRecipeLoader.runOnServerStarted;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.removeIC2Recipes;
+import static gregtech.api.enums.GT_Values.VN;
+import static gregtech.api.enums.Mods.BartWorks;
+import static gregtech.api.enums.Mods.GTPlusPlus;
+
+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.API_ConfigValues;
+import com.github.bartimaeusnek.bartworks.API.API_REFERENCE;
+import com.github.bartimaeusnek.bartworks.API.BioObjectAdder;
+import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.github.bartimaeusnek.bartworks.client.ClientEventHandler.TooltipEventHandler;
+import com.github.bartimaeusnek.bartworks.client.creativetabs.BioTab;
+import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab;
+import com.github.bartimaeusnek.bartworks.client.creativetabs.bartworksTab;
+import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.loaders.ArtificialMicaLine;
+import com.github.bartimaeusnek.bartworks.common.loaders.BeforeGTPreload;
+import com.github.bartimaeusnek.bartworks.common.loaders.BioCultureLoader;
+import com.github.bartimaeusnek.bartworks.common.loaders.BioLabLoader;
+import com.github.bartimaeusnek.bartworks.common.loaders.GTNHBlocks;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.common.loaders.LocalisationLoader;
+import com.github.bartimaeusnek.bartworks.common.loaders.RadioHatchMaterialLoader;
+import com.github.bartimaeusnek.bartworks.common.loaders.RecipeLoader;
+import com.github.bartimaeusnek.bartworks.common.loaders.RegisterServerCommands;
+import com.github.bartimaeusnek.bartworks.common.loaders.StaticRecipeChangeLoaders;
+import com.github.bartimaeusnek.bartworks.common.net.BW_Network;
+import com.github.bartimaeusnek.bartworks.server.EventHandler.ServerEventHandler;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitPartLoader;
+import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.PlatinumSludgeOverHaul;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+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.ResultWrongSievert;
+import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
+import com.github.bartimaeusnek.crossmod.galacticgreg.VoidMinerUtility;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartedEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.IGuiHandler;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Mods;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.util.GT_OreDictUnificator;
+
+@Mod(modid = MainMod.MOD_ID, name = MainMod.NAME, version = API_REFERENCE.VERSION, dependencies = """
+ required-after:IC2;\
+ required-after:gregtech;\
+ after:berriespp;\
+ after:tectech;\
+ after:GalacticraftMars;\
+ after:GalacticraftCore;\
+ after:Forestry;\
+ after:ProjRed|Illumination;\
+ after:RandomThings;\
+ before:miscutils;""")
+public final class MainMod {
+
+ public static final String NAME = "BartWorks";
+ public static final String MOD_ID = Mods.Names.BART_WORKS;
+ public static final String APIVERSION = "11";
+ public static final Logger LOGGER = LogManager.getLogger(MainMod.NAME);
+ public static final CreativeTabs GT2 = new GT2Tab("GT2C");
+ public static final CreativeTabs BIO_TAB = new BioTab("BioTab");
+ public static final CreativeTabs BWT = new bartworksTab(BartWorks.ID);
+ public static final IGuiHandler GH = new GuiHandler();
+
+ @Mod.Instance(MainMod.MOD_ID)
+ public static MainMod instance;
+
+ public static BW_Network BW_Network_instance = new BW_Network();
+
+ public MainMod() {
+ GregTech_API.sBeforeGTPreload.add(new BeforeGTPreload());
+ }
+
+ @Mod.EventHandler
+ public void preInit(FMLPreInitializationEvent preinit) {
+ if (GTPlusPlus.isModLoaded()) {
+ MainMod.LOGGER.info("Found GT++, continuing");
+ }
+
+ if (API_ConfigValues.debugLog) {
+ try {
+ DebugLog.initDebugLog(preinit);
+ } catch (IOException e) {
+ MainMod.LOGGER.catching(e);
+ }
+ }
+
+ WerkstoffLoader.setUp();
+
+ if (ConfigHandler.BioLab) {
+ BioCultureLoader.run();
+ }
+
+ Werkstoff.init();
+ GregTech_API.sAfterGTPostload.add(new CircuitPartLoader());
+ if (SideReference.Side.Client) {
+ GregTech_API.sBeforeGTLoad.add(new PrefixTextureLinker());
+ }
+
+ }
+
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent init) {
+ if (SideReference.Side.Client && ConfigHandler.tooltips)
+ MinecraftForge.EVENT_BUS.register(new TooltipEventHandler());
+ ServerEventHandler serverEventHandler = new ServerEventHandler();
+ if (SideReference.Side.Server) {
+ MinecraftForge.EVENT_BUS.register(serverEventHandler);
+ }
+ FMLCommonHandler.instance()
+ .bus()
+ .register(serverEventHandler);
+ if (ConfigHandler.BioLab) {
+ BioLabLoader.run();
+ }
+
+ WerkstoffLoader.runInit();
+
+ ItemRegistry.run();
+ }
+
+ @Mod.EventHandler
+ public void postInit(FMLPostInitializationEvent postinit) {
+
+ RecipeLoader.run();
+
+ NetworkRegistry.INSTANCE.registerGuiHandler(MainMod.instance, MainMod.GH);
+ if (ConfigHandler.BioLab) {
+ GTNHBlocks.run();
+ 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()));
+ }
+ }
+ ArtificialMicaLine.runArtificialMicaRecipe();
+ BioObjectAdder.regenerateBioFluids();
+
+ WerkstoffLoader.run();
+ LocalisationLoader.localiseAll();
+
+ CheckRecipeResultRegistry.register(new ResultWrongSievert(0, ResultWrongSievert.NeededSievertType.EXACTLY));
+
+ RadioHatchMaterialLoader.run();
+ }
+
+ @Mod.EventHandler
+ public void onServerStarting(FMLServerStartingEvent event) {
+ RegisterServerCommands.registerAll(event);
+ }
+
+ @Mod.EventHandler
+ public void onServerStarted(FMLServerStartedEvent event) {
+ MainMod.runOnPlayerJoined(ConfigHandler.classicMode, ConfigHandler.disableExtraGassesForEBF);
+ }
+
+ @Mod.EventHandler
+ public void onModLoadingComplete(FMLLoadCompleteEvent event) {
+ removeIC2Recipes();
+ StaticRecipeChangeLoaders.addElectricImplosionCompressorRecipes();
+ PlatinumSludgeOverHaul.replacePureElements();
+
+ runOnServerStarted();
+ StaticRecipeChangeLoaders.unificationRecipeEnforcer();
+ VoidMinerUtility.generateDropMaps();
+ }
+
+ private static boolean recipesAdded;
+
+ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGasRecipes) {
+ OreDictHandler.adaptCacheForWorld();
+ CircuitImprintLoader.run();
+ BioVatLogicAdder.RadioHatch.runBasicItemIntegration();
+ if (!recipesAdded) {
+ if (!disableExtraGasRecipes) StaticRecipeChangeLoaders.addEBFGasRecipes();
+
+ if (classicMode) DownTierLoader.run();
+
+ // StaticRecipeChangeLoaders.patchEBFMapForCircuitUnification();
+
+ recipesAdded = true;
+ }
+
+ StaticRecipeChangeLoaders.fixEnergyRequirements();
+ // StaticRecipeChangeLoaders.synchroniseCircuitUseMulti();
+
+ // Accept recipe map changes into Buffers
+ RecipeMap.ALL_RECIPE_MAPS.values()
+ .forEach(
+ map -> map.getBackend()
+ .reInit());
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java
new file mode 100644
index 0000000000..969398df47
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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) {
+ Pair<Integer, Short> p = new Pair<>(Item.getIdFromItem(itemStack.getItem()), (short) itemStack.getItemDamage());
+ if (TooltipCache.cache.containsKey(p) || tooltip.isEmpty()) {
+ return false;
+ }
+ StringBuilder sb = new StringBuilder();
+ for (String s : tooltip) {
+ sb.append(s);
+ sb.append(System.lineSeparator());
+ }
+ char[] rettype = sb.toString()
+ .toCharArray();
+ return TooltipCache.cache.put(p, rettype) == rettype;
+ }
+
+ static List<String> getTooltip(ItemStack itemStack) {
+ Pair<Integer, Short> p = new Pair<>(Item.getIdFromItem(itemStack.getItem()), (short) itemStack.getItemDamage());
+ char[] toTest = TooltipCache.cache.get(p);
+ if (toTest == null) {
+ return new ArrayList<>();
+ }
+ return Arrays.asList(new String(toTest).split(System.lineSeparator()));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java
new file mode 100644
index 0000000000..9f7fb64e4b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
+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;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+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;
+
+@SideOnly(Side.CLIENT)
+public class TooltipEventHandler {
+
+ @SideOnly(Side.CLIENT)
+ @SubscribeEvent(priority = EventPriority.HIGHEST)
+ public void getTooltip(ItemTooltipEvent event) {
+
+ if (event == null || event.itemStack == null || event.itemStack.getItem() == null) return;
+
+ if (TooltipCache.getTooltip(event.itemStack)
+ .isEmpty()) {
+ ItemStack tmp = event.itemStack.copy();
+ 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)) {
+ for (Pair<Integer, Short> pair : OreDictHandler.getNonBWCache()) {
+ if (pair.equals(abstractedStack)) {
+ GameRegistry.UniqueIdentifier UI = GameRegistry.findUniqueIdentifierFor(tmp.getItem());
+ if (UI == null)
+ UI = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(tmp.getItem()));
+ if (UI != null) {
+ for (ModContainer modContainer : Loader.instance()
+ .getModList()) {
+ if (MainMod.MOD_ID.equals(UI.modId) || BartWorksCrossmod.MOD_ID.equals(UI.modId)
+ || "BWCore".equals(UI.modId)) break;
+ if (UI.modId.equals(modContainer.getModId())) {
+ 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!");
+ }
+ }
+ }
+
+ Block BLOCK = Block.getBlockFromItem(event.itemStack.getItem());
+ if (BLOCK != null && BLOCK != Blocks.air) {
+ if (BLOCK instanceof BW_Blocks) {
+ TooltipCache.put(event.itemStack, tooAdd);
+ return;
+ }
+ 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);
+ } 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);
+ }
+ }
+
+ TooltipCache.put(event.itemStack, tooAdd);
+ event.toolTip.addAll(tooAdd);
+ } else {
+ event.toolTip.addAll(TooltipCache.getTooltip(event.itemStack));
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java
new file mode 100644
index 0000000000..8d3d457e06
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.client.creativetabs;
+
+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) {
+ super(lable);
+ }
+
+ @Override
+ public Item getTabIconItem() {
+ return BioItemList.getPetriDish(null)
+ .getItem();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
new file mode 100644
index 0000000000..5a42164597
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.client.creativetabs;
+
+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) {
+ super(lable);
+ }
+
+ @Override
+ public Item getTabIconItem() {
+ return ItemRegistry.TAB;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
new file mode 100644
index 0000000000..53be7436ce
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.client.creativetabs;
+
+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) {
+ super(lable);
+ }
+
+ @Override
+ public Item getTabIconItem() {
+ return ItemRegistry.ROCKCUTTER_HV;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
new file mode 100644
index 0000000000..e2bb68b290
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+@SideOnly(Side.CLIENT)
+public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator {
+
+ public ContainerWindKineticGenerator container;
+ public String name;
+
+ public BW_GUIContainer_RotorBlock(ContainerWindKineticGenerator container1) {
+ super(container1);
+ this.container = container1;
+ this.name = StatCollector.translateToLocal("tile.BWRotorBlock.0.name");
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
+ 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);
+ } else if (this.container.base.checkrotor() && !this.container.base.guiisminWindStrength()) {
+ this.fontRendererObj.drawString(
+ 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()) {
+ GuiTooltipHelper.drawAreaTooltip(
+ mouseX - this.guiLeft,
+ mouseY - this.guiTop,
+ StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload"),
+ 44,
+ 27,
+ 79,
+ 52);
+ }
+ }
+ } else {
+ this.fontRendererObj
+ .drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"), 27, 52, 2157374);
+ }
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
+ GL11.glColor3f(0.5f, 0.25f, 0.07f);
+ 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;
+ this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.container.base.guiisoverload() && this.container.base.checkrotor()) {
+ this.drawTexturedModalRect(j + 44, k + 20, 176, 0, 30, 26);
+ this.drawTexturedModalRect(j + 102, k + 20, 176, 0, 30, 26);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java
new file mode 100644
index 0000000000..6bf5fd3fe1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_EICPistonVisualizer.java
@@ -0,0 +1,112 @@
+package com.github.bartimaeusnek.bartworks.client.renderer;
+
+import net.minecraft.block.Block;
+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.apache.commons.lang3.tuple.Pair;
+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 {
+
+ public BW_EICPistonVisualizer(World world, int x, int y, int z, int age) {
+ super(world, x, y, z);
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.particleMaxAge = age;
+ }
+
+ @Override
+ public void onUpdate() {
+ if (this.particleAge++ >= this.particleMaxAge) this.setDead();
+ }
+
+ @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_) {
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glDepthMask(false);
+
+ RenderBlocks.getInstance().blockAccess = this.worldObj;
+ RenderBlocks.getInstance()
+ .setRenderFromInside(false);
+
+ // Look at nearby block for correct tiered block to use
+ Pair<Block, Integer> tieredBlock;
+ if (this.worldObj != null) {
+ int nX = (int) this.posX;
+ int nY = (int) this.posY + 1;
+ int nZ = (int) this.posZ;
+ Block neighborBlock = this.worldObj.getBlock(nX, nY, nZ);
+ int neighborMeta = this.worldObj.getBlockMetadata(nX, nY, nZ);
+ tieredBlock = Pair.of(neighborBlock, neighborMeta);
+ } else {
+ tieredBlock = Pair.of(GregTech_API.sBlockMetal5, 2);
+ }
+
+ IIcon icon = tieredBlock.getKey()
+ .getIcon(0, tieredBlock.getValue());
+
+ double x = this.posX + 1;
+ double z = this.posZ;
+
+ double f11 = x - interpPosX;
+ double f12 = this.posY - interpPosY;
+ double f13 = z - interpPosZ;
+ tessellator.setTranslation(f11 - x, f12 - this.posY, f13 - z);
+ RenderBlocks.getInstance()
+ .renderBlockUsingTexture(tieredBlock.getKey(), (int) x, (int) this.posY, (int) z, icon);
+
+ x = this.posX - 1;
+ z = this.posZ;
+
+ f11 = x - interpPosX;
+ f13 = z - interpPosZ;
+ tessellator.setTranslation(f11 - x, f12 - this.posY, f13 - z);
+ RenderBlocks.getInstance()
+ .renderBlockUsingTexture(tieredBlock.getKey(), (int) x, (int) this.posY, (int) z, icon);
+
+ x = this.posX;
+ z = this.posZ + 1;
+
+ f11 = x - interpPosX;
+ f13 = z - interpPosZ;
+ tessellator.setTranslation(f11 - x, f12 - this.posY, f13 - z);
+ RenderBlocks.getInstance()
+ .renderBlockUsingTexture(tieredBlock.getKey(), (int) x, (int) this.posY, (int) z, icon);
+
+ x = this.posX;
+ z = this.posZ - 1;
+
+ f11 = x - interpPosX;
+ f13 = z - interpPosZ;
+ tessellator.setTranslation(f11 - x, f12 - this.posY, f13 - z);
+ RenderBlocks.getInstance()
+ .renderBlockUsingTexture(tieredBlock.getKey(), (int) x, (int) this.posY, (int) z, icon);
+
+ tessellator.setTranslation(0d, 0d, 0d);
+
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ GL11.glDepthMask(true);
+ }
+
+ @Override
+ public int getFXLayer() {
+ return 1;
+ }
+
+ @Override
+ public boolean shouldRenderInPass(int pass) {
+ return pass == 2;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java
new file mode 100644
index 0000000000..4c27a2a3f9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.client.Minecraft;
+import net.minecraft.client.renderer.ItemRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderItem;
+import net.minecraft.client.renderer.texture.TextureMap;
+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);
+ }
+ }
+
+ @Override
+ public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) {
+ if (!GT_Utility.isStackInvalid(aStack) && aStack.getItemDamage() >= 0) {
+ return aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON
+ || aType == IItemRenderer.ItemRenderType.INVENTORY
+ || aType == IItemRenderer.ItemRenderType.EQUIPPED
+ || aType == IItemRenderer.ItemRenderType.ENTITY;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack,
+ IItemRenderer.ItemRendererHelper aHelper) {
+ if (GT_Utility.isStackInvalid(aStack)) {
+ return false;
+ }
+ return aType == IItemRenderer.ItemRenderType.ENTITY;
+ }
+
+ @Override
+ public void renderItem(IItemRenderer.ItemRenderType type, ItemStack aStack, Object... data) {
+ if (!GT_Utility.isStackInvalid(aStack)) {
+ short aMetaData = (short) aStack.getItemDamage();
+ if (aMetaData >= 0) {
+ BW_Meta_Items.BW_GT_MetaGen_Item_Hook aItem = (BW_Meta_Items.BW_GT_MetaGen_Item_Hook) aStack.getItem();
+ GL11.glEnable(3042);
+ if (type == IItemRenderer.ItemRenderType.ENTITY) {
+ if (RenderItem.renderInFrame) {
+ GL11.glScalef(0.85F, 0.85F, 0.85F);
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ }
+ GL11.glTranslated(-0.5D, -0.42D, 0.0D);
+ }
+
+ GL11.glColor3f(1.0F, 1.0F, 1.0F);
+ IIcon tIcon = (IIcon) BW_Util.get2DCoordFrom1DArray(aMetaData, 0, 2, aItem.mIconList);
+
+ Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
+ GL11.glBlendFunc(770, 771);
+ if (IItemRenderer.ItemRenderType.INVENTORY.equals(type)) {
+ if (aMetaData < CircuitImprintLoader.reverseIDs)
+ GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
+ else {
+ for (int i = 0; i < 4; i++) {
+ GT_RenderUtil.renderItemIcon(
+ tIcon,
+ 0.0D + i * 2D,
+ 0.0D + i * 2D,
+ 10.0D + i * 2D,
+ 10.0D + i * 2D,
+ 0.001D,
+ 0.0F,
+ 0.0F,
+ -1.0F);
+ }
+ }
+ } else if (aMetaData < CircuitImprintLoader.reverseIDs) ItemRenderer.renderItemIn2D(
+ Tessellator.instance,
+ tIcon.getMaxU(),
+ tIcon.getMinV(),
+ tIcon.getMinU(),
+ tIcon.getMaxV(),
+ tIcon.getIconWidth(),
+ tIcon.getIconHeight(),
+ 0.0625F);
+
+ IIcon tOverlay = (IIcon) BW_Util.get2DCoordFrom1DArray(aMetaData, 1, 2, aItem.mIconList);
+ GL11.glColor3f(1.0F, 1.0F, 1.0F);
+ if (tOverlay != null) {
+ Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
+ GL11.glBlendFunc(770, 771);
+ if (IItemRenderer.ItemRenderType.INVENTORY.equals(type)) {
+ GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F);
+ } else {
+ ItemRenderer.renderItemIn2D(
+ Tessellator.instance,
+ tOverlay.getMaxU(),
+ tOverlay.getMinV(),
+ tOverlay.getMinU(),
+ tOverlay.getMaxV(),
+ tOverlay.getIconWidth(),
+ tOverlay.getIconHeight(),
+ 0.0625F);
+ }
+ }
+ }
+
+ GL11.glDisable(3042);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java
new file mode 100644
index 0000000000..a082a44d31
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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 {
+
+ IIcon packed;
+
+ public BW_GT_Vanilla_Texture(Block block, ForgeDirection side) {
+ this.packed = block.getBlockTextureFromSide(side.flag);
+ }
+
+ public BW_GT_Vanilla_Texture(Block block, int side) {
+ this.packed = block.getBlockTextureFromSide(side);
+ }
+
+ public BW_GT_Vanilla_Texture(IIcon packed) {
+ this.packed = packed;
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return this.packed;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return null;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return new ResourceLocation(this.packed.getIconName());
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java
new file mode 100644
index 0000000000..7bb04e0c39
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.renderNegativeXFacing;
+import static gregtech.common.render.GT_Renderer_Block.renderNegativeYFacing;
+import static gregtech.common.render.GT_Renderer_Block.renderNegativeZFacing;
+import static gregtech.common.render.GT_Renderer_Block.renderPositiveXFacing;
+import static gregtech.common.render.GT_Renderer_Block.renderPositiveYFacing;
+import static gregtech.common.render.GT_Renderer_Block.renderPositiveZFacing;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.util.ForgeDirection;
+
+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 com.gtnewhorizons.angelica.api.ThreadSafeISBRH;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import gregtech.GT_Mod;
+
+@ThreadSafeISBRH(perThread = true)
+public class BW_Renderer_Block_Ores implements ISimpleBlockRenderingHandler {
+
+ public static BW_Renderer_Block_Ores INSTANCE;
+ public static int renderID;
+ public static final float blockMin = 0.0F;
+ public static final float blockMax = 1.0F;
+
+ public static void register() {
+ renderID = RenderingRegistry.getNextAvailableRenderId();
+ INSTANCE = new BW_Renderer_Block_Ores();
+ RenderingRegistry.registerBlockHandler(INSTANCE);
+ }
+
+ @Override
+ public void renderInventoryBlock(Block aBlock, int aMeta, int modelId, RenderBlocks aRenderer) {
+ BW_MetaGenerated_Block_TE tTileEntity = ((BW_MetaGenerated_Blocks) aBlock).getProperTileEntityForRendering();
+ tTileEntity.mMetaData = (short) aMeta;
+ aRenderer.enableAO = false;
+ aRenderer.useInventoryTint = true;
+ aBlock.setBlockBoundsForItemRender();
+ aRenderer.setRenderBoundsFromBlock(aBlock);
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ renderNegativeYFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.DOWN),
+ true);
+ renderPositiveYFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.UP),
+ true);
+ renderNegativeZFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.NORTH),
+ true);
+ renderPositiveZFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.SOUTH),
+ true);
+ renderNegativeXFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.WEST),
+ true);
+ renderPositiveXFacing(
+ null,
+ aRenderer,
+ aBlock,
+ 0,
+ 0,
+ 0,
+ tTileEntity.getTexture(aBlock, ForgeDirection.EAST),
+ true);
+ aRenderer.setRenderBoundsFromBlock(aBlock);
+ aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax);
+ GL11.glTranslatef(0.5F, 0.5F, 0.5F);
+ aRenderer.useInventoryTint = false;
+ }
+
+ // spotless:off
+ @Override
+ public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int modelId, RenderBlocks aRenderer) {
+ BW_MetaGenerated_Blocks tBlock = (BW_MetaGenerated_Blocks) aBlock;
+ if(tBlock == null) return false;
+
+ BW_MetaGenerated_Block_TE fakeTileEntity = tBlock.getProperTileEntityForRendering(); // meh
+ if(fakeTileEntity == null) return false;
+
+ BW_MetaGenerated_Block_TE actualTileEntity = (BW_MetaGenerated_Block_TE) aWorld.getTileEntity(aX, aY, aZ);
+ if(actualTileEntity == null) return false;
+
+ fakeTileEntity.mMetaData = actualTileEntity.mMetaData;
+ aRenderer.useInventoryTint = false;
+ aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax);
+ aRenderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion;
+ aRenderer.setRenderBoundsFromBlock(aBlock);
+ renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.DOWN), true);
+ renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.UP), true);
+ renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.NORTH), true);
+ renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.SOUTH), true);
+ renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.WEST), true);
+ renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, fakeTileEntity.getTexture(aBlock, ForgeDirection.EAST), true);
+ return true;
+ }
+ // spotless:on
+
+ @Override
+ public boolean shouldRender3DInInventory(int modelId) {
+ return true;
+ }
+
+ @Override
+ public int getRenderId() {
+ return renderID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java
new file mode 100644
index 0000000000..ce87e4a68a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.gtnewhorizons.angelica.api.ThreadSafeISBRH;
+
+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;
+
+@SideOnly(Side.CLIENT)
+@ThreadSafeISBRH(perThread = false)
+public class RendererGlasBlock implements ISimpleBlockRenderingHandler {
+
+ public static int renderID;
+ public static RendererGlasBlock INSTANCE;
+
+ public static void register() {
+ renderID = RenderingRegistry.getNextAvailableRenderId();
+ INSTANCE = new RendererGlasBlock();
+ RenderingRegistry.registerBlockHandler(INSTANCE);
+ }
+
+ @Override
+ public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
+ Tessellator tessellator = Tessellator.instance;
+ block.setBlockBoundsForItemRender();
+ renderer.setRenderBoundsFromBlock(block);
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(0.0F, -1.0F, 0.0F);
+ renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
+ tessellator.draw();
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(0.0F, 1.0F, 0.0F);
+ renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
+ tessellator.draw();
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(0.0F, 0.0F, -1.0F);
+ renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
+ tessellator.draw();
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(0.0F, 0.0F, 1.0F);
+ renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
+ tessellator.draw();
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(-1.0F, 0.0F, 0.0F);
+ renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
+ tessellator.draw();
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(1.0F, 0.0F, 0.0F);
+ renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
+ tessellator.draw();
+ GL11.glTranslatef(0.5F, 0.5F, 0.5F);
+ }
+
+ // spotless:off
+ @Override
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
+ if (block instanceof BW_GlasBlocks) {
+ renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses, x, y, z);
+ renderer.renderStandardBlockWithColorMultiplier(block, x, y, z,
+ ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f,
+ ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f,
+ ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f);
+ }
+ if (block instanceof BW_GlasBlocks2) {
+ renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses2, x, y, z);
+ renderer.renderStandardBlockWithColorMultiplier(block, x, y, z,
+ ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f,
+ ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f,
+ ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f);
+ }
+ return true;
+ }
+ // spotless:on
+
+ @Override
+ public boolean shouldRender3DInInventory(int modelId) {
+ return true;
+ }
+
+ @Override
+ public int getRenderId() {
+ return RendererGlasBlock.renderID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
new file mode 100644
index 0000000000..7a12074e02
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Minecraft;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.MathHelper;
+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 com.gtnewhorizons.angelica.api.ThreadSafeISBRH;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+@SideOnly(Side.CLIENT)
+@ThreadSafeISBRH(perThread = false)
+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;
+ private static final float LIGHT_XZ_POS = 0.6f;
+ private static final float THREE_QUARTERS_FILLED = 0.875f;
+ private static final double RENDER_OFFSET = 0.0010000000474974513;
+
+ public static RendererSwitchingColorFluid instance;
+
+ public static void register() {
+ instance = new RendererSwitchingColorFluid();
+ }
+
+ private float getFluidHeightAverage(float[] flow) {
+ float total = 0.0f;
+ int count = 0;
+ float end = 0.0f;
+ for (float aFlow : flow) {
+ if (aFlow >= RendererSwitchingColorFluid.THREE_QUARTERS_FILLED
+ && end != RendererSwitchingColorFluid.LIGHT_Y_POS) {
+ end = aFlow;
+ }
+ if (aFlow >= 0.0f) {
+ total += aFlow;
+ ++count;
+ }
+ }
+ if (end == 0.0f && count != 0) {
+ end = total / count;
+ }
+ return end;
+ }
+
+ private float getFluidHeightForRender(IBlockAccess world, int x, int y, int z, BlockFluidBase block) {
+
+ if (world.getBlock(x, y, z) == block) {
+ Block vOrigin = world.getBlock(x, y + 1, z);
+ if (vOrigin.getMaterial()
+ .isLiquid() || vOrigin instanceof IFluidBlock) {
+ return RendererSwitchingColorFluid.LIGHT_Y_POS;
+ }
+ if (world.getBlockMetadata(x, y, z) == block.getMaxRenderHeightMeta()) {
+ return RendererSwitchingColorFluid.THREE_QUARTERS_FILLED;
+ }
+ }
+ return !world.getBlock(x, y, z)
+ .getMaterial()
+ .isSolid() && world.getBlock(x, y + 1, z) == block ? RendererSwitchingColorFluid.LIGHT_Y_POS
+ : block.getQuantaPercentage(world, x, y, z) * RendererSwitchingColorFluid.THREE_QUARTERS_FILLED;
+ }
+
+ 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) {
+ 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);
+ Integer rgb = GT_TileEntity_BioVat.staticColorMap.get(blockat);
+
+ int r, g, b;
+
+ if (rgb != null) {
+ r = rgb >> 16 & 0xFF;
+ g = rgb >> 8 & 0xFF;
+ b = rgb & 0xFF;
+ } else {
+ r = 0;
+ g = 0;
+ b = 255;
+ }
+ float red = r / 255f, green = g / 255f, blue = b / 255f;
+
+ BlockFluidBase blockFluidBase = (BlockFluidBase) block;
+ 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) };
+ if (!renderTop && !renderBottom && !renderSides[0] && !renderSides[1] && !renderSides[2] && !renderSides[3]) {
+ return false;
+ }
+ boolean rendered = false;
+ float fluidHeightForRender = this.getFluidHeightForRender(iBlockAccess, x, y, z, blockFluidBase);
+ double heightNW, heightSW, heightSE, heightNE;
+
+ if (fluidHeightForRender != RendererSwitchingColorFluid.LIGHT_Y_POS) {
+ float fluidHeightForRender1 = this.getFluidHeightForRender(iBlockAccess, x - 1, y, z - 1, blockFluidBase);
+ float fluidHeightForRender2 = this.getFluidHeightForRender(iBlockAccess, x - 1, y, z, blockFluidBase);
+ float fluidHeightForRender3 = this.getFluidHeightForRender(iBlockAccess, x - 1, y, z + 1, blockFluidBase);
+ float fluidHeightForRender4 = this.getFluidHeightForRender(iBlockAccess, x, y, z - 1, blockFluidBase);
+ float fluidHeightForRender5 = this.getFluidHeightForRender(iBlockAccess, x, y, z + 1, blockFluidBase);
+ 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 });
+ } else {
+ heightNW = fluidHeightForRender;
+ heightSW = fluidHeightForRender;
+ heightSE = fluidHeightForRender;
+ heightNE = fluidHeightForRender;
+ }
+
+ if (renderer.renderAllFaces || renderTop) {
+ rendered = true;
+ IIcon iconStill = this.getNullCheckedIiconOrFallbackTexture();
+ float flowDir = (float) BlockFluidBase.getFlowDirection(iBlockAccess, x, y, z);
+
+ heightNW -= RendererSwitchingColorFluid.RENDER_OFFSET;
+ heightSW -= RendererSwitchingColorFluid.RENDER_OFFSET;
+ heightSE -= RendererSwitchingColorFluid.RENDER_OFFSET;
+ heightNE -= RendererSwitchingColorFluid.RENDER_OFFSET;
+
+ double dInterpolatedU, dInterpolatedV, dInterpolatedU2, dInterpolatedV2, dInterpolatedU3, dInterpolatedV3,
+ dInterpolatedU4, dInterpolatedV4;
+
+ if (flowDir < -999.0f) {
+ dInterpolatedU = iconStill.getInterpolatedU(0.0);
+ dInterpolatedV = iconStill.getInterpolatedV(0.0);
+ dInterpolatedU2 = dInterpolatedU;
+ dInterpolatedV2 = iconStill.getInterpolatedV(16.0);
+ dInterpolatedU3 = iconStill.getInterpolatedU(16.0);
+ dInterpolatedV3 = dInterpolatedV2;
+ dInterpolatedU4 = dInterpolatedU3;
+ dInterpolatedV4 = dInterpolatedV;
+ } else {
+ float xFlow = MathHelper.sin(flowDir) * 0.25f, zFlow = MathHelper.cos(flowDir) * 0.25f;
+ dInterpolatedU = iconStill.getInterpolatedU(8.0f + (-zFlow - xFlow) * 16.0f);
+ dInterpolatedV = iconStill.getInterpolatedV(8.0f + (-zFlow + xFlow) * 16.0f);
+ dInterpolatedU2 = iconStill.getInterpolatedU(8.0f + (-zFlow + xFlow) * 16.0f);
+ dInterpolatedV2 = iconStill.getInterpolatedV(8.0f + (zFlow + xFlow) * 16.0f);
+ dInterpolatedU3 = iconStill.getInterpolatedU(8.0f + (zFlow + xFlow) * 16.0f);
+ dInterpolatedV3 = iconStill.getInterpolatedV(8.0f + (zFlow - xFlow) * 16.0f);
+ dInterpolatedU4 = iconStill.getInterpolatedU(8.0f + (zFlow - xFlow) * 16.0f);
+ dInterpolatedV4 = iconStill.getInterpolatedV(8.0f + (-zFlow - xFlow) * 16.0f);
+ }
+
+ tessellator.setBrightness(block.getMixedBrightnessForBlock(iBlockAccess, x, y, z));
+ tessellator.setColorOpaque_F(
+ RendererSwitchingColorFluid.LIGHT_Y_POS * red,
+ RendererSwitchingColorFluid.LIGHT_Y_POS * green,
+ RendererSwitchingColorFluid.LIGHT_Y_POS * blue);
+
+ tessellator.addVertexWithUV(x, y + heightNW, z, dInterpolatedU, dInterpolatedV);
+ tessellator.addVertexWithUV(x, y + heightSW, z + 1, dInterpolatedU2, dInterpolatedV2);
+ tessellator.addVertexWithUV(x + 1, y + heightSE, z + 1, dInterpolatedU3, dInterpolatedV3);
+ tessellator.addVertexWithUV(x + 1, y + heightNE, z, dInterpolatedU4, dInterpolatedV4);
+ tessellator.addVertexWithUV(x, y + heightNW, z, dInterpolatedU, dInterpolatedV);
+ tessellator.addVertexWithUV(x + 1, y + heightNE, z, dInterpolatedU4, dInterpolatedV4);
+ tessellator.addVertexWithUV(x + 1, y + heightSE, z + 1, dInterpolatedU3, dInterpolatedV3);
+ tessellator.addVertexWithUV(x, y + heightSW, z + 1, dInterpolatedU2, dInterpolatedV2);
+ }
+
+ if (renderer.renderAllFaces || renderBottom) {
+ rendered = true;
+ tessellator.setBrightness(block.getMixedBrightnessForBlock(iBlockAccess, x, y - 1, z));
+ tessellator.setColorOpaque_F(
+ RendererSwitchingColorFluid.LIGHT_Y_NEG * red,
+ RendererSwitchingColorFluid.LIGHT_Y_NEG * green,
+ RendererSwitchingColorFluid.LIGHT_Y_NEG * blue);
+ renderer.renderFaceYNeg(
+ block,
+ x,
+ y + RendererSwitchingColorFluid.RENDER_OFFSET,
+ z,
+ this.getNullCheckedIiconOrFallbackTexture());
+ }
+
+ for (int side = 0; side < 4; ++side) {
+ int x2 = x, z2 = z;
+
+ switch (side) {
+ case 0:
+ --z2;
+ break;
+ case 1:
+ ++z2;
+ break;
+ case 2:
+ --x2;
+ break;
+ case 3:
+ ++x2;
+ break;
+ default:
+ break;
+ }
+
+ IIcon iconFlow = this.getNullCheckedIiconOrFallbackTexture();
+
+ if (renderer.renderAllFaces || renderSides[side]) {
+ rendered = true;
+ double dHeight1, dHeight2, dXcoord1, dXcoord2, dZcoord1, dZcoord2;
+ dZcoord2 = switch (side) {
+ case 0 -> {
+ dHeight1 = heightNW;
+ dHeight2 = heightNE;
+ dXcoord1 = x;
+ dXcoord2 = x + 1;
+ dZcoord1 = z + RendererSwitchingColorFluid.RENDER_OFFSET;
+ yield z + RendererSwitchingColorFluid.RENDER_OFFSET;
+ }
+ case 1 -> {
+ dHeight1 = heightSE;
+ dHeight2 = heightSW;
+ dXcoord1 = x + 1;
+ dXcoord2 = x;
+ dZcoord1 = z + 1 - RendererSwitchingColorFluid.RENDER_OFFSET;
+ yield z + 1 - RendererSwitchingColorFluid.RENDER_OFFSET;
+ }
+ case 2 -> {
+ dHeight1 = heightSW;
+ dHeight2 = heightNW;
+ dXcoord1 = x + RendererSwitchingColorFluid.RENDER_OFFSET;
+ dXcoord2 = x + RendererSwitchingColorFluid.RENDER_OFFSET;
+ dZcoord1 = z + 1;
+ yield z;
+ }
+ default -> {
+ dHeight1 = heightNE;
+ dHeight2 = heightSE;
+ dXcoord1 = x + 1 - RendererSwitchingColorFluid.RENDER_OFFSET;
+ dXcoord2 = x + 1 - RendererSwitchingColorFluid.RENDER_OFFSET;
+ dZcoord1 = z;
+ yield z + 1;
+ }
+ };
+ float u1Flow = iconFlow.getInterpolatedU(0.0);
+ float u2Flow = iconFlow.getInterpolatedU(8.0);
+ float v1Flow = iconFlow.getInterpolatedV((1.0 - dHeight1) * 16.0 * 0.5);
+ float v2Flow = iconFlow.getInterpolatedV((1.0 - dHeight2) * 16.0 * 0.5);
+ float v3Flow = iconFlow.getInterpolatedV(8.0);
+ tessellator.setBrightness(block.getMixedBrightnessForBlock(iBlockAccess, x2, y, z2));
+ float sideLighting;
+ if (side < 2) {
+ sideLighting = RendererSwitchingColorFluid.LIGHT_XZ_NEG;
+ } else {
+ sideLighting = RendererSwitchingColorFluid.LIGHT_XZ_POS;
+ }
+ tessellator.setColorOpaque_F(
+ RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * red,
+ RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * green,
+ RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * blue);
+
+ tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, u1Flow, v1Flow);
+ tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, u2Flow, v2Flow);
+ tessellator.addVertexWithUV(dXcoord2, y, dZcoord2, u2Flow, v3Flow);
+ tessellator.addVertexWithUV(dXcoord1, y, dZcoord1, u1Flow, v3Flow);
+ tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, u1Flow, v1Flow);
+ tessellator.addVertexWithUV(dXcoord1, y, dZcoord1, u1Flow, v3Flow);
+ tessellator.addVertexWithUV(dXcoord2, y, dZcoord2, u2Flow, v3Flow);
+ tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, u2Flow, v2Flow);
+ }
+ }
+ renderer.renderMinY = 0.0;
+ renderer.renderMaxY = 1.0;
+ return rendered;
+ }
+
+ public boolean shouldRender3DInInventory(int modelId) {
+ return false;
+ }
+
+ public int getRenderId() {
+ return FluidLoader.renderID;
+ }
+
+ private IIcon getNullCheckedIiconOrFallbackTexture() {
+ return FluidLoader.autogenIIcon != null ? FluidLoader.autogenIIcon
+ : ((TextureMap) Minecraft.getMinecraft()
+ .getTextureManager()
+ .getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java
new file mode 100644
index 0000000000..09df8f98f8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+
+@SideOnly(Side.CLIENT)
+public class PrefixTextureLinker implements Runnable {
+
+ public static Map<OrePrefixes, HashMap<TextureSet, Textures.ItemIcons.CustomIcon>> texMap = new HashMap<>();
+ public static Map<OrePrefixes, HashMap<TextureSet, IIconContainer>> texMapBlocks = new HashMap<>();
+ public static Map<TextureSet, Short> blockTexMap = new HashMap<>();
+
+ private static void fillBlockTexMap() {
+ blockTexMap.put(TextureSet.SET_QUARTZ, TextureSet.INDEX_block4);
+ Stream.of(OrePrefixes.blockCasing, OrePrefixes.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)
+ .forEach(prefixes -> {
+ HashMap<TextureSet, Textures.ItemIcons.CustomIcon> 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.ItemIcons.CustomIcon(
+ "materialicons/" + SET.getName()
+ .substring(4) + "/" + prefixes));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ });
+ texMap.put(prefixes, curr);
+ });
+ }
+
+ @Override
+ public void run() {
+ fillItemTexMap();
+ fillBlockTexMap();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
new file mode 100644
index 0000000000..1a00d16d85
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+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)
+ protected IIcon[] texture;
+
+ String[] textureNames;
+ protected String name;
+
+ public BW_Blocks(String name, String[] texture) {
+ super(Material.anvil);
+ this.setHardness(15.0F);
+ this.setResistance(30.0F);
+ this.name = name;
+ this.textureNames = texture;
+ this.setCreativeTab(MainMod.GT2);
+ GregTech_API.registerMachineBlock(this, -1);
+ }
+
+ public BW_Blocks(String name, String[] texture, CreativeTabs tabs) {
+ super(Material.anvil);
+ this.setHardness(15.0F);
+ this.setResistance(30.0F);
+ this.name = name;
+ this.textureNames = texture;
+ this.setCreativeTab(tabs);
+ GregTech_API.registerMachineBlock(this, -1);
+ }
+
+ public BW_Blocks(String name, String[] texture, CreativeTabs tabs, Material material) {
+ super(material);
+ this.setHardness(15.0F);
+ this.setResistance(30.0F);
+ this.name = name;
+ this.textureNames = texture;
+ this.setCreativeTab(tabs);
+ GregTech_API.registerMachineBlock(this, -1);
+ }
+
+ @Override
+ public int damageDropped(int meta) {
+ return meta;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
+ for (int i = 0; i < this.textureNames.length; i++) {
+ list.add(new ItemStack(item, 1, i));
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return meta < this.texture.length ? this.texture[meta] : this.texture[0];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ this.texture = new IIcon[this.textureNames.length];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
+ }
+ }
+
+ @Override
+ public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return this.name;
+ }
+
+ @Override
+ public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
+ return false;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java
new file mode 100644
index 0000000000..c60f63129a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+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)
+ private IIcon[] connectedTexture;
+
+ private final boolean connectedTex;
+ private boolean fake;
+ private short[][] color = new short[this.textureNames.length][3];
+
+ public BW_GlasBlocks(String name, String[] texture, CreativeTabs tabs) {
+ super(name, texture, tabs, Material.glass);
+ this.connectedTex = false;
+ }
+
+ 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;
+ this.fake = fake;
+ }
+
+ public short[] getColor(int meta) {
+ return meta < this.texture.length ? this.color[meta] : this.color[0];
+ }
+
+ @Override
+ public boolean isOpaqueCube() {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) {
+ if (worldClient.getBlock(xCoord, yCoord, zCoord) instanceof BW_GlasBlocks) return false;
+ return super.shouldSideBeRendered(worldClient, xCoord, yCoord, zCoord, aSide);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return meta < this.texture.length ? this.texture[meta] : this.texture[0];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ if (!this.connectedTex) {
+ this.texture = new IIcon[this.textureNames.length];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
+ }
+ return;
+ }
+ this.texture = new IIcon[this.textureNames.length];
+ this.connectedTexture = new IIcon[16];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ 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);
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) {
+ if (!this.connectedTex) return super.getIcon(worldClient, xCoord, yCoord, zCoord, aSide);
+
+ ForgeDirection dir = ForgeDirection.getOrientation(aSide);
+ byte sides = 0;
+ switch (dir) {
+ case UP:
+ case DOWN: {
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case EAST: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case WEST: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case NORTH: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case SOUTH: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case UNKNOWN:
+ default: {
+ break;
+ }
+ }
+ return this.connectedTexture[sides];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getRenderBlockPass() {
+ return 1;
+ }
+
+ @Override
+ public int getRenderType() {
+ if (!this.fake && SideReference.Side.Client) return RendererGlasBlock.renderID;
+ return 0;
+ }
+
+ @Override
+ public boolean renderAsNormalBlock() {
+ return false;
+ }
+
+ @Override
+ protected boolean canSilkHarvest() {
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java
new file mode 100644
index 0000000000..4ef12dc30b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks2.java
@@ -0,0 +1,180 @@
+package com.github.bartimaeusnek.bartworks.common.blocks;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+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;
+
+ private final boolean connectedTex;
+ private boolean fake;
+ private short[][] color = new short[this.textureNames.length][3];
+
+ public BW_GlasBlocks2(String name, String[] texture, CreativeTabs tabs) {
+ super(name, texture, tabs, Material.glass);
+ this.connectedTex = false;
+ }
+
+ 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;
+ this.fake = fake;
+ }
+
+ public short[] getColor(int meta) {
+ return meta < this.texture.length ? this.color[meta] : this.color[0];
+ }
+
+ @Override
+ public boolean isOpaqueCube() {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) {
+ if (worldClient.getBlock(xCoord, yCoord, zCoord) instanceof BW_GlasBlocks2) return false;
+ return super.shouldSideBeRendered(worldClient, xCoord, yCoord, zCoord, aSide);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return meta < this.texture.length ? this.texture[meta] : this.texture[0];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ if (!this.connectedTex) {
+ this.texture = new IIcon[this.textureNames.length];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
+ }
+ return;
+ }
+ this.texture = new IIcon[this.textureNames.length];
+ this.connectedTexture = new IIcon[16];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ 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);
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) {
+ if (!this.connectedTex) return super.getIcon(worldClient, xCoord, yCoord, zCoord, aSide);
+
+ ForgeDirection dir = ForgeDirection.getOrientation(aSide);
+ byte sides = 0;
+ switch (dir) {
+ case UP:
+ case DOWN: {
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case EAST: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case WEST: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord - 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord, yCoord, zCoord + 1) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case NORTH: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case SOUTH: {
+ if (worldClient.getBlock(xCoord, yCoord + 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0001);
+ if (worldClient.getBlock(xCoord, yCoord - 1, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0010);
+ if (worldClient.getBlock(xCoord - 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b0100);
+ if (worldClient.getBlock(xCoord + 1, yCoord, zCoord) instanceof BW_GlasBlocks2)
+ sides = (byte) (sides | 0b1000);
+ break;
+ }
+ case UNKNOWN:
+ default: {
+ break;
+ }
+ }
+ return this.connectedTexture[sides];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getRenderBlockPass() {
+ return 1;
+ }
+
+ @Override
+ public int getRenderType() {
+ if (!this.fake && SideReference.Side.Client) return RendererGlasBlock.renderID;
+ return 0;
+ }
+
+ @Override
+ public boolean renderAsNormalBlock() {
+ return false;
+ }
+
+ @Override
+ protected boolean canSilkHarvest() {
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
new file mode 100644
index 0000000000..fb8e163ad1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.MathHelper;
+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;
+
+ public BW_TileEntityContainer(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
+ super(p_i45386_1_);
+ this.tileEntity = tileEntity;
+ this.setHardness(15.0F);
+ this.setResistance(30.0F);
+ this.setCreativeTab(MainMod.BWT);
+ this.setBlockName(blockName);
+ this.setBlockTextureName(MainMod.MOD_ID + ":" + blockName);
+ }
+
+ @Override
+ public boolean onBlockActivated(World worldObj, int x, int y, int z, EntityPlayer player, int side, float subX,
+ float subY, float subZ) {
+ if (worldObj.isRemote) {
+ return false;
+ }
+ TileEntity tile = worldObj.getTileEntity(x, y, z);
+ if (tile instanceof BW_TileEntity_HeatedWaterPump) {
+ if (player.getHeldItem() != null && (player.getHeldItem()
+ .getItem()
+ .equals(Items.bucket)
+ || player.getHeldItem()
+ .getItem() instanceof IFluidContainerItem)
+ && ((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;
+ }
+ }
+ if (!player.isSneaking()) {
+ if (tile instanceof IHasGui) {
+ return worldObj.isRemote || IC2.platform.launchGui(player, (IHasGui) tile);
+ }
+ if (tile instanceof ITileWithModularUI) {
+ if (!worldObj.isRemote) {
+ UIInfos.TILE_MODULAR_UI.open(player, worldObj, x, y, z);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
+ TileEntity tile = world.getTileEntity(x, y, z);
+ if (tile instanceof IWrenchable tile2 && itemStack != null) {
+ int meta = itemStack.getItemDamage();
+ world.setBlockMetadataWithNotify(x, y, z, meta, 2);
+ if (entity != null) {
+ int face = MathHelper.floor_double(entity.rotationYaw * 4.0f / 360.0f + 0.5) & 0x3;
+ switch (face) {
+ case 0:
+ tile2.setFacing((short) 2);
+ break;
+ case 1:
+ tile2.setFacing((short) 5);
+ break;
+ case 2:
+ tile2.setFacing((short) 3);
+ break;
+ case 3:
+ tile2.setFacing((short) 4);
+ break;
+ }
+ }
+ }
+ }
+
+ @Override
+ public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
+ TileEntity t = world.getTileEntity(x, y, z);
+ 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)));
+ }
+ }
+ super.breakBlock(world, x, y, z, block, meta);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ if (!ITileHasDifferentTextureSides.class.isAssignableFrom(this.tileEntity)) return super.getIcon(side, meta);
+ try {
+ return ((ITileHasDifferentTextureSides) this.tileEntity.getConstructor()
+ .newInstance()).getTextureForSide(side, meta);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return super.getIcon(side, meta);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ if (ITileHasDifferentTextureSides.class.isAssignableFrom(this.tileEntity)) {
+ try {
+ ((ITileHasDifferentTextureSides) this.tileEntity.getConstructor()
+ .newInstance()).registerBlockIcons(par1IconRegister);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else super.registerBlockIcons(par1IconRegister);
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta) {
+ try {
+ return this.tileEntity.getConstructor()
+ .newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
+ return false;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public String[] getInfoData() {
+ if (ITileAddsInformation.class.isAssignableFrom(this.tileEntity)) {
+ try {
+ return ((ITileAddsInformation) this.tileEntity.getConstructor()
+ .newInstance()).getInfoData();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return new String[0];
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java
new file mode 100644
index 0000000000..0d1d9fd20b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_MachineBlock.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.blocks;
+
+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) {
+ super(p_i45386_1_, tileEntity, blockName);
+ GregTech_API.registerMachineBlock(this, -1);
+ }
+
+ @Override
+ public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
new file mode 100644
index 0000000000..852d8370ad
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.List;
+
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+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;
+ protected final String name;
+ protected final Class<? extends TileEntity>[] tileEntityArray;
+
+ @SideOnly(Side.CLIENT)
+ protected IIcon[] texture;
+
+ 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);
+ this.tileEntityArray = tileEntity;
+ this.name = blockName;
+ this.textureNames = textureNames;
+ this.setCreativeTab(tabs);
+ this.setBlockName(blockName);
+ this.setBlockTextureName(MainMod.MOD_ID + ":" + blockName);
+ }
+
+ @Override
+ public boolean onBlockActivated(World worldObj, int x, int y, int z, EntityPlayer player, int side, float subX,
+ float subY, float subZ) {
+ if (worldObj.isRemote) {
+ return true;
+ }
+ if (!player.isSneaking()) {
+ TileEntity tile = worldObj.getTileEntity(x, y, z);
+ if (tile instanceof IHasGui) {
+ return worldObj.isRemote || IC2.platform.launchGui(player, (IHasGui) tile);
+ }
+ if (tile instanceof ITileWithModularUI && !worldObj.isRemote) {
+ UIInfos.TILE_MODULAR_UI.open(player, worldObj, x, y, z);
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
+ TileEntity tile = world.getTileEntity(x, y, z);
+ if (tile instanceof IWrenchable tile2 && itemStack != null) {
+ int meta = itemStack.getItemDamage();
+ world.setBlockMetadataWithNotify(x, y, z, meta, 2);
+ if (entity != null) {
+ int face = MathHelper.floor_double(entity.rotationYaw * 4.0f / 360.0f + 0.5) & 0x3;
+ switch (face) {
+ case 0:
+ tile2.setFacing((short) 2);
+ break;
+ case 1:
+ tile2.setFacing((short) 5);
+ break;
+ case 2:
+ tile2.setFacing((short) 3);
+ break;
+ case 3:
+ tile2.setFacing((short) 4);
+ break;
+ }
+ }
+ }
+ }
+
+ @Override
+ public int damageDropped(int meta) {
+ return meta;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
+ for (int i = 0; i < this.textureNames.length; i++) {
+ list.add(new ItemStack(item, 1, i));
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return meta < this.texture.length ? this.texture[meta] : this.texture[0];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister par1IconRegister) {
+ this.texture = new IIcon[this.textureNames.length];
+ for (int i = 0; i < this.textureNames.length; i++) {
+ this.texture[i] = par1IconRegister.registerIcon(this.textureNames[i]);
+ }
+ }
+
+ @Override
+ public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
+ return false;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta) {
+ try {
+ return this.tileEntityArray[meta].getConstructor()
+ .newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java
new file mode 100644
index 0000000000..a5ad7625f9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraft.block.ITileEntityProvider;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+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() {
+ super(FluidLoader.ff, Material.water);
+ this.setBlockName("BioFluidBlock");
+ // this.setCreativeTab(MainMod.BioTab);
+ this.textureName = "gregtech:fluids/fluid.molten.autogenerated";
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister reg) {
+ FluidLoader.autogenIIcon = this.blockIcon = reg.registerIcon(this.getTextureName());
+ }
+
+ @Override
+ public int getQuantaValue(IBlockAccess world, int x, int y, int z) {
+ return 0;
+ }
+
+ @Override
+ public boolean canCollideCheck(int meta, boolean fullHit) {
+ return false;
+ }
+
+ @Override
+ public int getMaxRenderHeightMeta() {
+ return 0;
+ }
+
+ @Override
+ public int getRenderType() {
+ return FluidLoader.renderID;
+ }
+
+ @Override
+ public FluidStack drain(World world, int x, int y, int z, boolean doDrain) {
+ return null;
+ }
+
+ @Override
+ public boolean canDrain(World world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(IBlockAccess worldIn, int x, int y, int z, int side) {
+ return FluidLoader.autogenIIcon;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return FluidLoader.autogenIIcon;
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta) {
+ return new BWTileEntityDimIDBridge();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java
new file mode 100644
index 0000000000..0434a5d974
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "bwcfg <NameOfVariable> <newValue>";
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public void processCommand(ICommandSender sender, String[] args) {
+ try {
+ Field f = ConfigHandler.class.getField(args[0]);
+ Class c = f.getType();
+ if (c.equals(int.class)) {
+ int l;
+ try {
+ l = Integer.parseInt(args[1]);
+ } catch (NumberFormatException e) {
+ sender.addChatMessage(new ChatComponentText("you need to enter a number!"));
+ return;
+ }
+ f.setInt(null, l);
+ } else if (c.equals(long.class)) {
+ long l;
+ try {
+ l = Long.parseLong(args[1]);
+ } catch (NumberFormatException e) {
+ sender.addChatMessage(new ChatComponentText("you need to enter a number!"));
+ return;
+ }
+ f.setLong(null, l);
+ } else if (c.equals(boolean.class)) {
+ if ("true".equalsIgnoreCase(args[1]) || "1".equalsIgnoreCase(args[1])) f.setBoolean(null, true);
+ else if ("false".equalsIgnoreCase(args[1]) || "0".equalsIgnoreCase(args[1])) f.setBoolean(null, false);
+ else {
+ sender.addChatMessage(new ChatComponentText("booleans need to be set to true or false"));
+ }
+ }
+ sender.addChatMessage(new ChatComponentText("Set " + args[0] + " to " + args[1]));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java
new file mode 100644
index 0000000000..7afe07beb0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ClearCraftingCache.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.commands;
+
+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";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "bwclr";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ BWCoreStaticReplacementMethodes.clearRecentlyUsedRecipes();
+ sender.addChatMessage(new ChatComponentText("Recipe Cache cleared "));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java
new file mode 100644
index 0000000000..341044c498
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/GetWorkingDirectory.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.commands;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.ChatComponentText;
+
+public class GetWorkingDirectory extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "bwgwd";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "bwgwd";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ sender.addChatMessage(new ChatComponentText(Minecraft.getMinecraft().mcDataDir.getAbsolutePath()));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java
new file mode 100644
index 0000000000..dcd7caee97
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+
+public class PrintRecipeListToFile extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "prltf";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "prltf <FilePath>";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ File file = new File(args[0]);
+ try {
+
+ BufferedWriter fw = new BufferedWriter(new FileWriter(file));
+ CraftingManager.getInstance()
+ .getRecipeList()
+ .forEach(e -> {
+ try {
+ fw.write(
+ e.toString() + " = "
+ + e.getRecipeOutput()
+ .getDisplayName()
+ + "\n");
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ });
+ fw.flush();
+ fw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java
new file mode 100644
index 0000000000..5b76d6a163
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/RunGC.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.commands;
+
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.ChatComponentText;
+
+public class RunGC extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "bwgc";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "bwgc";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ Runtime.getRuntime()
+ .gc();
+ sender.addChatMessage(new ChatComponentText("Ran GC!"));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java
new file mode 100644
index 0000000000..5b37a98e7e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.commands;
+
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+
+import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins;
+
+public class SummonRuin extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "SummonRuin";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "SummonRuin <x> <z>";
+ }
+
+ @Override
+ public void processCommand(ICommandSender iCommandSender, String[] args) {
+ try {
+ new MapGenRuins.RuinsBase().generate(
+ iCommandSender.getEntityWorld(),
+ iCommandSender.getEntityWorld().rand,
+ Integer.parseInt(args[0]),
+ 256,
+ Integer.parseInt(args[1]));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
new file mode 100644
index 0000000000..7c5a515b86
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
@@ -0,0 +1,334 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+ public static Configuration c;
+
+ public static int IDOffset = 12600;
+ public static int megaMachinesMax = 256;
+ public static int mbWaterperSec = 150;
+ public static int ross128BID = -64;
+ public static int ross128BAID = -63;
+ public static int ross128btier = 3;
+ public static int ross128batier = 3;
+ public static int landerType = 3;
+ public static int ross128bRuinChance = 512;
+ public static int creativeScannerID;
+ public static int bioVatMaxParallelBonus = 1000;
+ public static int cutoffTier = 5;
+ public static int[][][] metasForTiers;
+
+ public static long energyPerCell = 1000000L;
+
+ public static boolean newStuff = true;
+ public static boolean BioLab = true;
+ public static boolean Ross128Enabled = true;
+
+ public static boolean disableExtraGassesForEBF;
+ public static boolean disableMagicalForest;
+ public static boolean DEHPDirectSteam;
+ public static boolean teslastaff;
+ public static boolean classicMode;
+
+ public static boolean GTppLogDisabler;
+ public static boolean tooltips = true;
+ public static boolean sharedItemStackTooltip = true;
+ public static boolean[] enabledPatches;
+
+ public static byte maxTierRoss;
+
+ public static boolean disableBoltedBlocksCasing = false;
+ public static boolean disableReboltedBlocksCasing = false;
+
+ public static int pollutionHeatedWaterPumpSecond = 5;
+ public static int basePollutionMBFSecond = 400;
+
+ public static Set<String> voidMinerBlacklist = Collections.unmodifiableSet(new HashSet<>());
+
+ 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_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 = { "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.creativeScannerID = ConfigHandler.c
+ .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);
+
+ 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.teslastaff = ConfigHandler.c
+ .get(
+ "System",
+ "Enable Teslastaff",
+ false,
+ "Enables the Teslastaff, an Item used to destroy Electric Armors")
+ .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.cutoffTier == -1 ? VOLTAGE_NAMES.length : ConfigHandler.cutoffTier;
+ ConfigHandler.disableExtraGassesForEBF = ConfigHandler.c
+ .get(
+ "System",
+ "Disable Extra Gases for EBF",
+ false,
+ "This switch disables extra gas recipes for the EBF, i.e. Xenon instead of Nitrogen")
+ .getBoolean(false);
+ 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.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")
+ .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.bioVatMaxParallelBonus = ConfigHandler.c
+ .get(
+ "Multiblocks",
+ "BioVat Maximum Bonus on Recipes",
+ 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.disablePistonInEIC = ConfigHandler.c
+ .get(
+ "Multiblocks",
+ "Disable Electric Implosion Compressor piston",
+ false,
+ "This switch completely disables piston animation in Electric Implosion Compressor multiblock")
+ .getBoolean(false);
+
+ ConfigHandler.pollutionHeatedWaterPumpSecond = ConfigHandler.c
+ .get(
+ "Pollution",
+ "Pollution produced per second by the water pump",
+ 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")
+ .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")
+ .set(12600);
+ }
+
+ ConfigHandler.GTppLogDisabler = ConfigHandler.c
+ .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);
+
+ for (int i = 0; i < BWCoreTransformer.CLASSESBEINGTRANSFORMED.length; i++)
+ BWCoreTransformer.shouldTransform[i] = ConfigHandler.c
+ .get(
+ "ASM fixes",
+ BWCoreTransformer.DESCRIPTIONFORCONFIG[i] + " in class: "
+ + BWCoreTransformer.CLASSESBEINGTRANSFORMED[i],
+ true)
+ .getBoolean(true);
+
+ ConfigHandler.enabledPatches = new boolean[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);
+ 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);
+ ConfigHandler.ross128batier = ConfigHandler.c
+ .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);
+ ConfigHandler.Ross128Enabled = ConfigHandler.c
+ .get(
+ "CrossMod Interactions",
+ "Galacticraft - Activate Ross128 System",
+ 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.disableMagicalForest = ConfigHandler.c
+ .get(
+ "CrossMod Interactions",
+ "Disable Magical Forest - Ross128b",
+ false,
+ "True disables the magical Forest Biome on Ross for more performance during World generation.")
+ .getBoolean(false);
+
+ ConfigHandler.maxTierRoss = (byte) ConfigHandler.c
+ .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();
+ }
+
+ ConfigHandler.setUpComments();
+
+ if (ConfigHandler.c.hasChanged()) ConfigHandler.c.save();
+ }
+
+ private static void setUpComments() {
+ ConfigHandler.c.addCustomCategoryComment("ASM fixes", "Disable ASM fixes here.");
+ ConfigHandler.c.addCustomCategoryComment("Singleblocks", "Singleblock Options can be set here.");
+ ConfigHandler.c.addCustomCategoryComment("Multiblocks", "Multiblock Options can be set here.");
+ ConfigHandler.c.addCustomCategoryComment("System", "Different System Settings can be set here.");
+ ConfigHandler.c.addCustomCategoryComment(
+ "CrossMod Interactions",
+ "CrossMod Interaction Settings can be set here. For Underground Fluid settings change the Gregtech.cfg!");
+ ConfigHandler.c.addCustomCategoryComment("Ross Ruin Metas", "Ruin Metas and Tiers can be set here.");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java
new file mode 100644
index 0000000000..f512e778bc
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Arrays;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.ITileEntityProvider;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+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!");
+
+ public BW_ItemBlocks(Block par1) {
+ super(par1);
+ this.setMaxDamage(0);
+ this.setHasSubtypes(true);
+ this.setCreativeTab(MainMod.GT2);
+ }
+
+ @Override
+ public int getMetadata(int aMeta) {
+ return aMeta;
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack aStack) {
+ return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> 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]);
+ }
+ if (this.field_150939_a instanceof ITileAddsInformation) {
+ aList.addAll(Arrays.asList(((ITileAddsInformation) this.field_150939_a).getInfoData()));
+ }
+ aList.add(this.mNoMobsToolTip);
+ if (!(this.field_150939_a instanceof ITileEntityProvider)) aList.add(this.mNoTileEntityToolTip);
+
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return this.field_150939_a.getIcon(0, stack.getItemDamage());
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
+ return this.getIcon(stack, renderPass);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) {
+ return this.field_150939_a.getIcon(0, p_77618_2_);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
new file mode 100644
index 0000000000..0b589bf53a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Item;
+import net.minecraft.item.ItemStack;
+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() {
+ this.maxStackSize = 1;
+ this.setMaxDamage(15);
+ this.setCreativeTab(MainMod.BWT);
+ this.hasSubtypes = false;
+ this.setUnlocalizedName("BW_SimpleWindMeter");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister register) {
+ this.itemIcon = register.registerIcon(MainMod.MOD_ID + ":BW_SimpleWindMeter");
+ }
+
+ @Override
+ public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List<String> 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(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
+ if (entityPlayer.worldObj.isRemote || world == null
+ || WorldData.get(world) == null
+ || 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")
+ : windStrength < 50f ? StatCollector.translateToLocal("tooltip.windmeter.6.name")
+ : StatCollector.translateToLocal("tooltip.windmeter.7.name");
+ entityPlayer.addChatMessage(
+ new ChatComponentText(StatCollector.translateToLocal("tooltip.windmeter.8.name") + " " + windS + "."));
+ itemStack.damageItem(1, entityPlayer);
+ return itemStack;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
new file mode 100644
index 0000000000..f58ae8d6e7
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 ic2.api.item.IKineticRotor.GearboxType.WATER;
+import static ic2.api.item.IKineticRotor.GearboxType.WIND;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.texture.IIconRegister;
+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.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];
+ private final float eff;
+ private final IKineticRotor.GearboxType type;
+ private final ResourceLocation tex;
+ private final String itemTex;
+ private final int speed;
+ private final float mRotor;
+ 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) {
+ this.DiaMinMax[0] = diameter;
+ this.DiaMinMax[1] = min;
+ this.DiaMinMax[2] = max;
+ this.eff = eff;
+ this.mRotor = mRotor;
+ this.speed = speed;
+ this.type = type;
+ this.tex = tex;
+ this.setMaxDamage(30000);
+ this.maxDamageEx = durability;
+ this.setUnlocalizedName(Name);
+ this.setCreativeTab(MainMod.BWT);
+ this.itemTex = itemTex;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.itemIcon = iconRegister.registerIcon(MainMod.MOD_ID + ":" + this.itemTex);
+ }
+
+ @Override
+ public void addInformation(ItemStack itemStack, EntityPlayer player, List<String> info, boolean b) {
+ 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;
+ } else if (Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator) {
+ 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.2.name") + " " + this.eff);
+ info.add(StatCollector.translateToLocal("tooltip.rotor.3.name") + " " + this.speed);
+ info.add(StatCollector.translateToLocal("tooltip.rotor.4.name") + " " + this.mRotor);
+ if (type != null) {
+ info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type)));
+ }
+ info.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public int getDiameter(ItemStack itemStack) {
+ return this.DiaMinMax[0];
+ }
+
+ @Override
+ public ResourceLocation getRotorRenderTexture(ItemStack itemStack) {
+ return this.tex;
+ }
+
+ @Override
+ public float getEfficiency(ItemStack itemStack) {
+ return this.eff;
+ }
+
+ @Override
+ public int getMinWindStrength(ItemStack itemStack) {
+ return this.DiaMinMax[1];
+ }
+
+ @Override
+ public int getMaxWindStrength(ItemStack itemStack) {
+ return this.DiaMinMax[2];
+ }
+
+ @Override
+ public boolean isAcceptedType(ItemStack itemStack, IKineticRotor.GearboxType gearboxType) {
+ return gearboxType.equals(this.type);
+ }
+
+ public int getSpeed() {
+ return this.speed;
+ }
+
+ public float getmRotor() {
+ return this.mRotor;
+ }
+
+ public void setDamageForStack(ItemStack stack, int advDmg) {
+ NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
+ nbtData.setInteger("DmgEx", advDmg);
+ if (this.maxDamageEx > 0) {
+ double p = (double) advDmg / (double) this.maxDamageEx;
+ int newDmg = (int) (stack.getMaxDamage() * p);
+ if (newDmg >= stack.getMaxDamage()) {
+ newDmg = stack.getMaxDamage() - 1;
+ }
+ stack.setItemDamage(newDmg);
+ this.dura = newDmg;
+ }
+ }
+
+ public int getDamageOfStack(ItemStack stack) {
+ NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
+ this.dura = nbtData.getInteger("DmgEx");
+ return this.dura;
+ }
+
+ public int getMaxDamageEx() {
+ return this.maxDamageEx;
+ }
+
+ public void damageItemStack(ItemStack stack, int Dmg) {
+ this.setDamageForStack(stack, this.getDamageOfStack(stack) + Dmg);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
new file mode 100644
index 0000000000..f0c746dd64
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.math.Pos2d;
+import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+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;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.gui.modularui.GT_UIInfos;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.items.GT_Generic_Item;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+
+public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem, IItemWithModularUI {
+
+ private static final int COST_PER_USE = 100;
+
+ public Circuit_Programmer() {
+ super("BWCircuitProgrammer", "Circuit Programmer", "Programs Integrated Circuits");
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.setHasSubtypes(false);
+ this.setCreativeTab(MainMod.BWT);
+ GregTech_API.registerCircuitProgrammer(
+ s -> s.getItem() instanceof Circuit_Programmer && ElectricItem.manager.canUse(s, COST_PER_USE),
+ (s, p) -> {
+ ElectricItem.manager.use(s, COST_PER_USE, p);
+ return s;
+ });
+ }
+
+ @Override
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> 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")));
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
+ if (ElectricItem.manager.use(aStack, COST_PER_USE, aPlayer)) {
+ GT_UIInfos.openPlayerHeldItemUI(aPlayer);
+ }
+ return aStack;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List<ItemStack> itemList) {
+ ItemStack itemStack = new ItemStack(this, 1);
+ if (this.getChargedItem(itemStack) == this) {
+ ItemStack charged = new ItemStack(this, 1);
+ ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false);
+ itemList.add(charged);
+ }
+ if (this.getEmptyItem(itemStack) == this) {
+ itemList.add(new ItemStack(this, 1, this.getMaxDamage()));
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister aIconRegister) {
+ this.mIcon = aIconRegister.registerIcon("bartworks:CircuitProgrammer");
+ }
+
+ @Override
+ public int getTier(ItemStack var1) {
+ return 1;
+ }
+
+ @Override
+ public boolean canProvideEnergy(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public Item getChargedItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public Item getEmptyItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public double getMaxCharge(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public double getTransferLimit(ItemStack itemStack) {
+ return GT_Values.V[1];
+ }
+
+ private static final String NBT_KEY_HAS_CHIP = "HasChip";
+ private static final String NBT_KEY_CHIP_CONFIG = "ChipConfig";
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext, ItemStack heldStack) {
+ ModularWindow.Builder builder = ModularWindow.builder(256, 166);
+ builder.setBackground(BW_UITextures.BACKGROUND_CIRCUIT_PROGRAMMER);
+ 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 (Circuit_Programmer.this.isLVCircuit(stack)) {
+ stack = Circuit_Programmer.this.createRealCircuit(0);
+ }
+ ((IItemHandlerModifiable) this.getItemHandler()).setStackInSlot(this.getSlotIndex(), stack);
+ this.onSlotChanged();
+ }
+ });
+
+ ItemStack initialStack = null;
+ NBTTagCompound tag = heldStack.getTagCompound();
+ if (tag != null && tag.getBoolean(NBT_KEY_HAS_CHIP)) {
+ initialStack = this.createRealCircuit(tag.getByte(NBT_KEY_CHIP_CONFIG));
+ }
+ 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 -> this.isProgrammedCircuit(stack) || this.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()
+ && this.isProgrammedCircuit(
+ circuitSlotWidget.getMcSlot()
+ .getStack())) {
+ circuitSlotWidget.getMcSlot()
+ .putStack(this.createRealCircuit(index + 1));
+ }
+ })
+ .setPos(32 + i % 12 * 18, 21 + i / 12 * 18)
+ .setSize(18, 18));
+ }
+
+ return builder.build();
+ }
+
+ private ItemStack createRealCircuit(int config) {
+ return ItemList.Circuit_Integrated.getWithDamage(1, config);
+ }
+
+ private boolean isProgrammedCircuit(ItemStack stack) {
+ return stack.getItem()
+ .equals(
+ GT_Utility.getIntegratedCircuit(0)
+ .getItem());
+ }
+
+ private boolean isLVCircuit(ItemStack stack) {
+ return BW_Util.checkStackAndPrefix(stack)
+ && OrePrefixes.circuit.equals(GT_OreDictUnificator.getAssociation(stack).mPrefix)
+ && GT_OreDictUnificator.getAssociation(stack).mMaterial.mMaterial.equals(Materials.Basic);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
new file mode 100644
index 0000000000..37ecfc61d2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+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;
+
+public class GT_Destructopack_Item extends GT_Generic_Item implements IItemWithModularUI {
+
+ public GT_Destructopack_Item() {
+ super("GT2Destructopack", "Destructopack", "Mobile Trash Bin");
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.setHasSubtypes(false);
+ this.setCreativeTab(MainMod.GT2);
+ }
+
+ @Override
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
+ super.addInformation(aStack, aPlayer, aList, aF3_H);
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
+ GT_UIInfos.openPlayerHeldItemUI(aPlayer);
+ return aStack;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister aIconRegister) {
+ this.mIcon = aIconRegister.registerIcon("bartworks:gt.GT2Destructopack");
+ }
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext, ItemStack heldStack) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 166);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.bindPlayerInventory(buildContext.getPlayer());
+
+ builder.widget(new SlotWidget(new BaseSlot(new ItemStackHandler(), 0) {
+
+ @Override
+ public void putStack(ItemStack stack) {
+ this.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/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java
new file mode 100644
index 0000000000..3a132dde22
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemTool;
+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 final int mCharge;
+ private final int mTransfer;
+ public int mTier;
+
+ @SideOnly(Side.CLIENT)
+ private IIcon icon;
+
+ private final int multi;
+
+ public GT_Rockcutter_Item(int aTier) {
+ super(2 * aTier, Item.ToolMaterial.EMERALD, GT_Rockcutter_Item.mineableBlocks);
+ this.mTier = aTier;
+ this.multi = (int) Math.pow(10, this.mTier - 1);
+ GT_Rockcutter_Item.mineableBlocks = new HashSet<>();
+ this.maxStackSize = 1;
+ this.mCharge = 10000 * this.multi;
+ this.mTransfer = (int) GT_Values.V[this.mTier];
+ this.efficiencyOnProperMaterial = 2.0f * this.mTier;
+ this.setCreativeTab(MainMod.GT2);
+ this.setMaxDamage(27 + 10 * this.multi);
+ this.setNoRepair();
+ this.setUnlocalizedName("GT_Rockcutter_Item_" + GT_Values.VN[this.mTier]);
+ }
+
+ @Override
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
+ aList.add(StatCollector.translateToLocal("tooltip.bw.tier.name") + " " + GT_Values.VN[this.mTier]);
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public void onUpdate(ItemStack aStack, World worldIn, Entity entityIn, int p_77663_4_, boolean p_77663_5_) {
+ if (!ElectricItem.manager.canUse(aStack, 500 * this.multi)) {
+ if (aStack.isItemEnchanted()) {
+ aStack.getTagCompound()
+ .removeTag("ench");
+ }
+ } else if (!aStack.isItemEnchanted()) {
+ aStack.addEnchantment(Enchantment.silkTouch, 3);
+ }
+ }
+
+ @Override
+ 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;
+ }
+
+ @Override
+ 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);
+ } else {
+ ElectricItem.manager.discharge(var1, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, false);
+ }
+ return true;
+ }
+
+ @Override
+ public boolean canHarvestBlock(Block par1Block, ItemStack itemStack) {
+ 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)
+ || par1Block.getMaterial()
+ .equals(Material.ground)
+ || par1Block.getMaterial()
+ .equals(Material.rock)
+ || mineableBlocks.contains(par1Block);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List<ItemStack> itemList) {
+ ItemStack itemStack = new ItemStack(this, 1);
+ if (this.getChargedItem(itemStack) == this) {
+ ItemStack charged = new ItemStack(this, 1);
+ ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false);
+ itemList.add(charged);
+ }
+ if (this.getEmptyItem(itemStack) == this) {
+ itemList.add(new ItemStack(this, 1, this.getMaxDamage()));
+ }
+ }
+
+ @Override
+ public boolean canProvideEnergy(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public Item getChargedItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public Item getEmptyItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public double getMaxCharge(ItemStack itemStack) {
+ return this.mCharge;
+ }
+
+ @Override
+ public int getTier(ItemStack itemStack) {
+ return this.mTier;
+ }
+
+ @Override
+ public double getTransferLimit(ItemStack itemStack) {
+ return this.mTransfer;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.icon = iconRegister.registerIcon("bartworks:GT_Rockcutter");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamage(int par1) {
+ return this.icon;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java
new file mode 100644
index 0000000000..6728a791e4
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.Set;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+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;
+ public int mTier;
+
+ @SideOnly(Side.CLIENT)
+ private IIcon icon;
+
+ public GT_Teslastaff_Item() {
+ super(0, Item.ToolMaterial.GOLD, GT_Teslastaff_Item.effective);
+ this.setCreativeTab(MainMod.GT2);
+ this.setNoRepair();
+ this.mCharge = 10000000D;
+ this.mTransfer = 8192D;
+ this.mTier = 4;
+ this.setMaxStackSize(1);
+ this.setMaxDamage(27);
+ this.setUnlocalizedName("GT_Teslastaff_Item");
+ }
+
+ @Override
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
+ aList.add(StatCollector.translateToLocal("tooltip.teslastaff.0.name"));
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public boolean hitEntity(ItemStack aStack, EntityLivingBase aTarget, EntityLivingBase aPlayer) {
+ if (aTarget instanceof EntityLiving tTarget && ElectricItem.manager.canUse(aStack, 9000000)) {
+ ElectricItem.manager.use(aStack, 9000000, aPlayer);
+ for (int i = 1; i < 5; ++i) {
+ if (tTarget.getEquipmentInSlot(i) != null && tTarget.getEquipmentInSlot(i)
+ .getItem() instanceof IElectricItem) {
+ tTarget.setCurrentItemOrArmor(i, null);
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List<ItemStack> itemList) {
+ ItemStack itemStack = new ItemStack(this, 1);
+ if (this.getChargedItem(itemStack) == this) {
+ ItemStack charged = new ItemStack(this, 1);
+ ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false);
+ itemList.add(charged);
+ }
+ if (this.getEmptyItem(itemStack) == this) {
+ itemList.add(new ItemStack(this, 1, this.getMaxDamage()));
+ }
+ }
+
+ @Override
+ public boolean canProvideEnergy(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public Item getChargedItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public Item getEmptyItem(ItemStack itemStack) {
+ return this;
+ }
+
+ @Override
+ public double getMaxCharge(ItemStack itemStack) {
+ return this.mCharge;
+ }
+
+ @Override
+ public boolean isRepairable() {
+ return false;
+ }
+
+ @Override
+ public int getTier(ItemStack itemStack) {
+ return this.mTier;
+ }
+
+ @Override
+ public double getTransferLimit(ItemStack itemStack) {
+ return this.mTransfer;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.icon = iconRegister.registerIcon("bartworks:GT_Teslastaff");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamage(int par1) {
+ return this.icon;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java
new file mode 100644
index 0000000000..a4712dc36a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.items;
+
+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);
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack stack) {
+ return "labModule." + super.getUnlocalizedName(stack);
+ }
+
+ @Override
+ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List<String> aList, boolean p_77624_4_) {
+ aList.add(StatCollector.translateToLocal("tooltip.labmodule.0.name"));
+ super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
new file mode 100644
index 0000000000..cb5a65c13b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.getAllDNASampleFlasks;
+import static com.github.bartimaeusnek.bartworks.common.loaders.BioItemList.getAllPetriDishes;
+import static com.github.bartimaeusnek.bartworks.common.loaders.BioItemList.getAllPlasmidCells;
+
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumRarity;
+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) {
+ super(tex);
+ this.setCreativeTab(MainMod.BIO_TAB);
+ }
+
+ @Override
+ public EnumRarity getRarity(ItemStack itemStack) {
+
+ if (itemStack == null || itemStack.getTagCompound() == null) return EnumRarity.common;
+
+ return switch (itemStack.getItemDamage()) {
+ case 0 -> BW_Util.getRarityFromByte(
+ itemStack.getTagCompound()
+ .getCompoundTag("DNA")
+ .getByte("Rarity"));
+ case 1, 2 -> BW_Util.getRarityFromByte(
+ itemStack.getTagCompound()
+ .getByte("Rarity"));
+ default -> EnumRarity.common;
+ };
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int p_82790_2_) {
+ if (stack.getItemDamage() == 0 && stack.getTagCompound() != null
+ && stack.getTagCompound()
+ .getIntArray("Color") != null
+ && stack.getTagCompound()
+ .getIntArray("Color").length > 0) {
+ int[] rgb = stack.getTagCompound()
+ .getIntArray("Color");
+ return BW_ColorUtil.getColorFromRGBArray(rgb);
+ }
+ return super.getColorFromItemStack(stack, p_82790_2_);
+ }
+
+ @Override
+ public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List<String> list, boolean b) {
+ if (itemStack == null) return;
+
+ if (itemStack.getTagCompound() == null) {
+ switch (itemStack.getItemDamage()) {
+ case 0:
+ list.add(StatCollector.translateToLocal("tooltip.labparts.0.name"));
+ break;
+ case 1:
+ list.add(StatCollector.translateToLocal("tooltip.labparts.1.name"));
+ break;
+ case 2:
+ list.add(StatCollector.translateToLocal("tooltip.labparts.2.name"));
+ break;
+ case 3:
+ list.add(StatCollector.translateToLocal("tooltip.labparts.3.name"));
+ break;
+ case 4:
+ list.add(StatCollector.translateToLocal("tooltip.labparts.4.name"));
+ break;
+ default:
+ break;
+ }
+ super.addInformation(itemStack, entityPlayer, list, b);
+ return;
+ }
+
+ BioCulture culture = BioCulture.getBioCulture(
+ itemStack.getTagCompound()
+ .getString("Name"));
+
+ switch (itemStack.getItemDamage()) {
+ case 0:
+ 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() + ")" : ""));
+ break;
+ case 2:
+ list.add(
+ StatCollector.translateToLocal("tooltip.labparts.8.name") + " "
+ + itemStack.getTagCompound()
+ .getString("Name")
+ + (culture != null ? " (" + culture.getLocalisedName() + ")" : ""));
+ break;
+ default:
+ break;
+ }
+ super.addInformation(itemStack, entityPlayer, list, b);
+ }
+
+ @Override
+ public void getSubItems(Item item, CreativeTabs creativeTabs, List<ItemStack> list) {
+ list.addAll(getAllPetriDishes());
+ list.addAll(getAllDNASampleFlasks());
+ list.addAll(getAllPlasmidCells());
+ super.getSubItems(item, creativeTabs, list);
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack itemStack) {
+ if (itemStack.getItemDamage() == 0 && itemStack.getTagCompound() != null)
+ return "filled.item." + this.tex[itemStack.getItemDamage()].replace('/', '.');
+ return super.getUnlocalizedName(itemStack);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java
new file mode 100644
index 0000000000..e31e23d47c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.items;
+
+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;
+
+ public SimpleIconItem(String tex) {
+ this.tex = tex;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.itemIcon = iconRegister.registerIcon("bartworks:" + this.tex);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
new file mode 100644
index 0000000000..8d5b239a75
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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;
+
+ String[] tex;
+
+ public SimpleSubItemClass(String... tex) {
+ this.tex = tex;
+ this.hasSubtypes = true;
+ this.setCreativeTab(MainMod.BWT);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.itemIcon = new IIcon[this.tex.length];
+ for (int i = 0; i < this.tex.length; i++) {
+ this.itemIcon[i] = iconRegister.registerIcon(MainMod.MOD_ID + ":" + this.tex[i]);
+ }
+ }
+
+ @Override
+ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List<String> aList, boolean p_77624_4_) {
+ super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_);
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List<ItemStack> p_150895_3_) {
+ for (int i = 0; i < this.tex.length; i++) {
+ p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamage(int p_77617_1_) {
+ if (p_77617_1_ < this.tex.length) return this.itemIcon[p_77617_1_];
+ return this.itemIcon[0];
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack stack) {
+ if (stack.getItemDamage() < this.tex.length) return "item." + this.tex[stack.getItemDamage()].replace('/', '.');
+ return "WrongDamageItemDestroyIt";
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java
new file mode 100644
index 0000000000..6268342cce
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ArtificialMicaLine.java
@@ -0,0 +1,199 @@
+package com.github.bartimaeusnek.bartworks.common.loaders;
+
+import static gregtech.api.enums.Mods.NewHorizonsCoreMod;
+import static gregtech.api.recipe.RecipeMaps.benderRecipes;
+import static gregtech.api.recipe.RecipeMaps.blastFurnaceRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidExtractionRecipes;
+import static gregtech.api.recipe.RecipeMaps.mixerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT;
+import static gregtech.api.util.GT_RecipeConstants.UniversalChemical;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+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;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class ArtificialMicaLine {
+
+ public static void runArtificialMicaRecipe() {
+ // Mg + O = MgO
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Magnesium.getDust(1))
+ .itemOutputs(Materials.Magnesia.getDust(2))
+ .fluidInputs(Materials.Oxygen.getGas(1000))
+ .duration(2 * SECONDS)
+ .eut(8)
+ .addTo(UniversalChemical);
+ // Si + 6HF = H2SiF6 + 4H
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Silicon.getDust(1), Materials.Empty.getCells(4))
+ .itemOutputs(Materials.Hydrogen.getCells(4))
+ .fluidInputs(Materials.HydrofluoricAcid.getFluid(6000))
+ .fluidOutputs(WerkstoffLoader.HexafluorosilicicAcid.getFluidOrGas(1000))
+ .duration(20 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(UniversalChemical);
+ // K + Cl = KCl
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Potassium.getDust(1), GT_Utility.getIntegratedCircuit(2))
+ .itemOutputs(Materials.RockSalt.getDust(2))
+ .fluidInputs(Materials.Chlorine.getGas(1000))
+ .duration(20 * TICKS)
+ .eut(8)
+ .addTo(UniversalChemical);
+
+ // 2KCl + H2SiF6 = 2HCl + K2SiF6
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.RockSalt.getDust(4))
+ .itemOutputs(WerkstoffLoader.Potassiumfluorosilicate.get(OrePrefixes.dust, 9))
+ .fluidInputs(WerkstoffLoader.HexafluorosilicicAcid.getFluidOrGas(1000))
+ .fluidOutputs(Materials.HydrochloricAcid.getFluid(2000))
+ .duration(1 * SECONDS)
+ .eut(8)
+ .addTo(mixerRecipes);
+
+ // 2K + CO2 + O = K2CO3
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Potassium.getDust(2), Materials.CarbonDioxide.getCells(1))
+ .itemOutputs(WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 6), Materials.Empty.getCells(1))
+ .fluidInputs(Materials.Oxygen.getGas(1000))
+ .duration(2 * SECONDS)
+ .eut(8)
+ .addTo(UniversalChemical);
+ // K2O + CO2 = K2CO3
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Potash.getDust(3), Materials.CarbonDioxide.getCells(1))
+ .itemOutputs(WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 6), Materials.Empty.getCells(1))
+ .duration(2 * SECONDS)
+ .eut(8)
+ .addTo(UniversalChemical);
+
+ // 55Quartz Dust + 20K2SiF6 + 12Al2O3 + 4K2CO3 = 91Raw Fluorophlogopite Dust
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.QuartzSand.getDust(55),
+ WerkstoffLoader.Potassiumfluorosilicate.get(OrePrefixes.dust, 20),
+ WerkstoffLoader.Alumina.get(OrePrefixes.dust, 12),
+ WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 4),
+ GT_Utility.getIntegratedCircuit(4))
+ .itemOutputs(
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 27))
+ .duration(20 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(mixerRecipes);
+
+ // 55Quartzite/Nether Quartz Dust + 20K2SiF6 + 57Al2O3 + 4K2CO3 = 136Raw Fluorophlogopite Dust
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.Quartzite.getDust(55),
+ WerkstoffLoader.Potassiumfluorosilicate.get(OrePrefixes.dust, 20),
+ WerkstoffLoader.Alumina.get(OrePrefixes.dust, 57),
+ WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 4),
+ GT_Utility.getIntegratedCircuit(4))
+ .itemOutputs(
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 8))
+ .fluidInputs()
+ .fluidOutputs()
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.NetherQuartz.getDust(55),
+ WerkstoffLoader.Potassiumfluorosilicate.get(OrePrefixes.dust, 20),
+ WerkstoffLoader.Alumina.get(OrePrefixes.dust, 57),
+ WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 4),
+ GT_Utility.getIntegratedCircuit(4))
+ .itemOutputs(
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 8))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(mixerRecipes);
+
+ // 62Certus Quartz Dust + 10K2SiF6 + 12Al2O3 + 7K2CO3 = 91Raw Fluorophlogopite Dust
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.CertusQuartz.getDust(62),
+ WerkstoffLoader.Potassiumfluorosilicate.get(OrePrefixes.dust, 10),
+ WerkstoffLoader.Alumina.get(OrePrefixes.dust, 12),
+ WerkstoffLoader.PotassiumCarbonate.get(OrePrefixes.dust, 7),
+ GT_Utility.getIntegratedCircuit(4))
+ .itemOutputs(
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 64),
+ WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 27))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(mixerRecipes);
+
+ // MgO(s) = MgO(l)
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Magnesia.getDust(1))
+ .fluidOutputs(Materials.Magnesia.getMolten(144))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(fluidExtractionRecipes);
+
+ // 27Raw Fluorophlogopite Dust + 720MgO(l) = 4608Fluorophlogopite(l)
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.RawFluorophlogopite.get(OrePrefixes.dust, 27))
+ .itemOutputs(Materials.Glass.getDust(1))
+ .fluidInputs(BW_GT_MaterialReference.Magnesia.getMolten(720))
+ .fluidOutputs(WerkstoffLoader.HotFluorophlogopite.getFluidOrGas(4608))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .metadata(COIL_HEAT, 1700)
+ .addTo(blastFurnaceRecipes);
+
+ // 144Fluorophlogopite(l) = Fluorophlogopite
+ RecipeMaps.vacuumFreezerRecipes.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 (NewHorizonsCoreMod.isModLoaded()) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ WerkstoffLoader.Fluorophlogopite.get(OrePrefixes.plate, 1),
+ GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MicaInsulatorFoil", 4))
+ .duration(10 * TICKS)
+ .eut(600)
+ .addTo(benderRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
new file mode 100644
index 0000000000..88fab90aea
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.BartWorks;
+
+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;
+import cpw.mods.fml.common.ModContainer;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.SubTag;
+import ic2.core.Ic2Items;
+
+/**
+ * This class gets injected into GT via ASM! DO NOT CALL IT YOURSELF!
+ */
+public class BeforeGTPreload implements Runnable {
+
+ private static boolean didrun;
+
+ @Override
+ public void run() {
+ if (didrun) return;
+ // fixing BorosilicateGlass... -_-'
+ 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;
+ ModContainer gregtech = Loader.instance()
+ .activeModContainer();
+ boolean switchback = false;
+ LoadController modController = null;
+ if (!Loader.instance()
+ .activeModContainer()
+ .getModId()
+ .equals(BartWorks.ID)) {
+ Field fieldModController = FieldUtils.getDeclaredField(Loader.class, "modController", true);
+ try {
+ modController = (LoadController) fieldModController.get(Loader.instance());
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance()
+ .exitJava(-1, true);
+ }
+
+ assert modController != null;
+ for (ModContainer mod : modController.getActiveModList()) {
+ if (mod.getModId()
+ .equals(BartWorks.ID)) {
+ bartworks = mod;
+ }
+ if (bartworks != null) break;
+ }
+ if (bartworks == null || gregtech == null) FMLCommonHandler.instance()
+ .exitJava(-1, true);
+
+ try {
+ activeContainer.set(modController, bartworks);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance()
+ .exitJava(-1, true);
+ }
+ switchback = true;
+ }
+
+ Block[] bw_glasses;
+ try {
+ bw_glasses = (Block[]) Class.forName("com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry")
+ .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));
+ OreDictionary.registerOre("blockGlassHV", new ItemStack(bw_glasses[0], 1, 0));
+ OreDictionary.registerOre("blockGlassEV", Ic2Items.reinforcedGlass);
+ OreDictionary.registerOre("blockGlassEV", new ItemStack(bw_glasses[0], 1, 1));
+ OreDictionary.registerOre("blockGlassIV", new ItemStack(bw_glasses[0], 1, 12));
+ OreDictionary.registerOre("blockGlassIV", new ItemStack(bw_glasses[0], 1, 2));
+ OreDictionary.registerOre("blockGlassLuV", new ItemStack(bw_glasses[0], 1, 3));
+ OreDictionary.registerOre("blockGlassZPM", new ItemStack(bw_glasses[0], 1, 4));
+ OreDictionary.registerOre("blockGlassUV", new ItemStack(bw_glasses[0], 1, 5));
+ OreDictionary.registerOre("blockGlassUHV", new ItemStack(bw_glasses[0], 1, 13));
+ OreDictionary.registerOre("blockGlassUEV", new ItemStack(bw_glasses[0], 1, 14));
+ OreDictionary.registerOre("blockGlassUIV", new ItemStack(bw_glasses[0], 1, 15));
+ OreDictionary.registerOre("blockGlassUMV", new ItemStack(bw_glasses[1], 1, 0));
+ } catch (IllegalAccessException | NoSuchFieldException | ClassNotFoundException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance()
+ .exitJava(-1, true);
+ }
+ if (switchback) {
+ try {
+ activeContainer.set(modController, gregtech);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance()
+ .exitJava(-1, true);
+ }
+ }
+ BeforeGTPreload.didrun = true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
new file mode 100644
index 0000000000..5bf9ff8185
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Color;
+
+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;
+
+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 BioCulture CommonYeast;
+ public static BioCulture WhineYeast;
+ public static BioCulture BeerYeast;
+ public static BioCulture rottenFleshBacteria;
+ public static BioCulture eColi;
+ public static BioCulture anaerobicOil;
+ public static BioCulture generalPurposeFermentingBacteria;
+
+ public static void run() {
+ BioCultureLoader.CommonYeast = BioCulture.createAndRegisterBioCulture(
+ new Color(255, 248, 200),
+ "Saccharomyces cerevisiae",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DATA_YEAST),
+ BioDNA.convertDataToDNA(BioCultureLoader.BIO_DATA_YEAST),
+ true);
+ BioCultureLoader.WhineYeast = BioCulture.createAndRegisterBioCulture(
+ new Color(255, 248, 200),
+ "Saccharomyces cerevisiae var bayanus",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DNA_WHINE_YEAST),
+ BioCultureLoader.BIO_DNA_WHINE_YEAST,
+ EnumRarity.uncommon,
+ true);
+ BioCultureLoader.BeerYeast = BioCulture.createAndRegisterBioCulture(
+ new Color(255, 248, 200),
+ "Saccharomyces cerevisiae var cerevisiae",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DNA_BEER_YEAST),
+ BioCultureLoader.BIO_DNA_BEER_YEAST,
+ EnumRarity.uncommon,
+ true);
+ BioCultureLoader.rottenFleshBacteria = BioCulture.createAndRegisterBioCulture(
+ new Color(110, 40, 25),
+ "Escherichia cadaver",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DATA_BETA_LACMATASE),
+ BioDNA.convertDataToDNA(BioCultureLoader.BIO_DATA_BETA_LACMATASE),
+ false);
+ BioCultureLoader.eColi = BioCulture.createAndRegisterBioCulture(
+ new Color(149, 132, 75),
+ "Escherichia koli",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.eColiData),
+ BioDNA.convertDataToDNA(BioCultureLoader.eColiData),
+ true);
+ BioCultureLoader.anaerobicOil = BioCulture.createAndRegisterBioCulture(
+ new Color(0, 0, 0),
+ "Pseudomonas Veronii",
+ BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DNA_ANAEROBIC_OIL),
+ BioDNA.convertDataToDNA(BioCultureLoader.BIO_DATA_ANAEROBIC_OIL),
+ true);
+ BioCultureLoader.generalPurposeFermentingBacteria = BioCulture.createAndRegisterBioCulture(
+ new Color(127, 69, 26),
+ "Saccharomyces escherichia",
+ BioCultureLoader.CommonYeast.getPlasmid(),
+ BioCultureLoader.eColi.getdDNA(),
+ EnumRarity.epic,
+ true);
+
+ BioCultureLoader.CommonYeast.setLocalisedName("Common Yeast");
+ BioCultureLoader.WhineYeast.setLocalisedName("Whine Yeast");
+ BioCultureLoader.BeerYeast.setLocalisedName("Beer Yeast");
+ BioCultureLoader.rottenFleshBacteria.setLocalisedName("Rotten Flesh Bacteria");
+ BioCultureLoader.eColi.setLocalisedName("eColi Bacteria");
+ BioCultureLoader.anaerobicOil.setLocalisedName("Anaerobic Oil Bacteria");
+ BioCultureLoader.generalPurposeFermentingBacteria.setLocalisedName("General Purpose Fermenting Bacteria");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
new file mode 100644
index 0000000000..8b86d4cd93
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+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;
+
+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" });
+
+ public static void registerBioItems() {
+ GameRegistry.registerItem(BioItemList.mItemBioLabParts, "BioLabModules");
+ GameRegistry.registerItem(BioItemList.vanillaBioLabParts, "BioLabParts");
+ }
+
+ public static Collection<ItemStack> getAllPetriDishes() {
+ HashSet<ItemStack> ret = new HashSet<>();
+ for (BioCulture Culture : BioCulture.BIO_CULTURE_ARRAY_LIST) {
+ ret.add(BioItemList.getPetriDish(Culture));
+ }
+ return ret;
+ }
+
+ public static Collection<ItemStack> getAllDNASampleFlasks() {
+ HashSet<ItemStack> ret = new HashSet<>();
+ for (BioData dna : BioData.BIO_DATA_ARRAY_LIST) {
+ ret.add(BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(dna)));
+ }
+ return ret;
+ }
+
+ public static Collection<ItemStack> getAllPlasmidCells() {
+ HashSet<ItemStack> ret = new HashSet<>();
+ for (BioData dna : BioData.BIO_DATA_ARRAY_LIST) {
+ ret.add(BioItemList.getPlasmidCell(BioPlasmid.convertDataToPlasmid(dna)));
+ }
+ return ret;
+ }
+
+ public static ItemStack getPetriDish(BioCulture Culture) {
+ if (Culture == null) return new ItemStack(BioItemList.vanillaBioLabParts);
+ ItemStack ret = new ItemStack(BioItemList.vanillaBioLabParts);
+ ret.setTagCompound(BioCulture.getNBTTagFromCulture(Culture));
+ return ret;
+ }
+
+ public static ItemStack getDNASampleFlask(BioDNA dna) {
+ if (dna == null) return new ItemStack(BioItemList.vanillaBioLabParts, 1, 1);
+
+ ItemStack ret = new ItemStack(BioItemList.vanillaBioLabParts, 1, 1);
+ ret.setTagCompound(BioData.getNBTTagFromBioData(dna));
+ return ret;
+ }
+
+ public static ItemStack getPlasmidCell(BioPlasmid plasmid) {
+ if (plasmid == null) return new ItemStack(BioItemList.vanillaBioLabParts, 1, 2);
+ ItemStack ret = new ItemStack(BioItemList.vanillaBioLabParts, 1, 2);
+ ret.setTagCompound(BioData.getNBTTagFromBioData(plasmid));
+ return ret;
+ }
+
+ /**
+ * 1 - Detergent Powder 2 - Agarose 3 - Incubation Module 4 - Plasma Membrane others are null
+ *
+ * @param selection see above
+ * @return the selected Item
+ */
+ public static ItemStack getOther(int selection) {
+ if (selection < 1 || selection > 4) return null;
+
+ return new ItemStack(BioItemList.vanillaBioLabParts, 1, 2 + selection);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java
new file mode 100644
index 0000000000..28ad279e28
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioLabLoader.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.loaders;
+
+public class BioLabLoader {
+
+ public static void run() {
+ FluidLoader.run();
+ BioItemList.registerBioItems();
+ BioRecipeLoader.run();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java
new file mode 100644
index 0000000000..abed08eb5e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.CropsPlusPlus;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+
+public class BioRecipeLoader {
+
+ public static void run() {
+ registerWaterBasedBioLabIncubations();
+ registerBacterialVatRecipes();
+ }
+
+ public static void registerWaterBasedBioLabIncubations() {
+ 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 },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ new ItemStack(Items.fermented_spider_eye),
+ BioCultureLoader.eColi,
+ new int[] { 4500 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ ItemList.Food_Dough.get(1L),
+ BioCultureLoader.CommonYeast,
+ new int[] { 7500 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ ItemList.Food_Dough_Sugar.get(1L),
+ BioCultureLoader.WhineYeast,
+ new int[] { 2500 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ ItemList.Bottle_Wine.get(1L),
+ BioCultureLoader.WhineYeast,
+ new int[] { 3300 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ ItemList.Bottle_Beer.get(1L),
+ BioCultureLoader.BeerYeast,
+ new int[] { 2500 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ ItemList.Bottle_Dark_Beer.get(1L),
+ BioCultureLoader.BeerYeast,
+ new int[] { 3300 },
+ new FluidStack[] { fluidStack },
+ 500,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART);
+
+ BWRecipes.instance.addBioLabRecipeIncubation(
+ new ItemStack(Blocks.dirt),
+ BioCultureLoader.anaerobicOil,
+ new int[] { 100 },
+ new FluidStack[] { fluidStack },
+ 1500,
+ (int) TierEU.RECIPE_EV,
+ BW_Util.STANDART);
+ }
+ }
+
+ public static void registerWaterBasedBacterialVatRecipes() {
+ FluidStack[] easyFluids = { Materials.Water.getFluid(1000L),
+ FluidRegistry.getFluidStack("ic2distilledwater", 1000) };
+ for (FluidStack fluidStack : easyFluids) {
+ if (CropsPlusPlus.isModLoaded()) {
+ BWRecipes.instance.addBacterialVatRecipe(
+ new ItemStack[] { new ItemStack(Items.sugar, 64) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
+ BioCultureLoader.CommonYeast,
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.ghp", 1) },
+ 350,
+ (int) TierEU.RECIPE_EV);
+ }
+
+ BWRecipes.instance.addBacterialVatRecipe(
+ new ItemStack[] { ItemList.Crop_Drop_Grapes.get(16) },
+ new FluidStack[] { new FluidStack(fluidStack, 100) },
+ BioCultureLoader.WhineYeast,
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.wine", 12) },
+ 200,
+ (int) TierEU.RECIPE_MV);
+
+ 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) },
+ BioCultureLoader.BeerYeast,
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.beer", 5) },
+ 600,
+ (int) TierEU.RECIPE_LV);
+ BWRecipes.instance.addBacterialVatRecipe(
+ 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) },
+ 600,
+ (int) TierEU.RECIPE_LV);
+ }
+ }
+
+ public static void registerBacterialVatRecipes() {
+ registerWaterBasedBacterialVatRecipes();
+
+ BWRecipes.instance.addBacterialVatRecipe(
+ null,
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.grapejuice", 100) },
+ BioCultureLoader.WhineYeast,
+ new FluidStack[] { FluidRegistry.getFluidStack("potion.wine", 12) },
+ 400,
+ (int) TierEU.RECIPE_LV);
+
+ BWRecipes.instance.addBacterialVatRecipe(
+ null,
+ new FluidStack[] { Materials.FermentedBiomass.getFluid(10000) },
+ BioCultureLoader.anaerobicOil,
+ new FluidStack[] { new FluidStack(FluidLoader.fulvicAcid, 1000) },
+ 2748,
+ (int) TierEU.RECIPE_HV);
+ }
+
+ public static void runOnServerStarted() {
+ RecipeMaps.fermentingRecipes.getAllRecipes()
+ .forEach(
+ recipe -> BWRecipes.instance.addBacterialVatRecipe(
+ new ItemStack[] { null },
+ BioCultureLoader.generalPurposeFermentingBacteria,
+ recipe.mFluidInputs,
+ recipe.mFluidOutputs,
+ recipe.mDuration,
+ recipe.mEUt,
+ GT_Utility.getTier(recipe.mEUt)));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ElectricImplosionCompressorRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ElectricImplosionCompressorRecipes.java
new file mode 100644
index 0000000000..1a7e49aaa3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ElectricImplosionCompressorRecipes.java
@@ -0,0 +1,213 @@
+package com.github.bartimaeusnek.bartworks.common.loaders;
+
+import static gregtech.api.enums.GT_Values.M;
+import static gregtech.api.enums.Mods.Avaritia;
+import static gregtech.api.enums.Mods.EternalSingularity;
+import static gregtech.api.enums.Mods.GoodGenerator;
+import static gregtech.api.enums.Mods.OpenComputers;
+import static gregtech.api.enums.Mods.SuperSolarPanels;
+import static gregtech.api.enums.Mods.UniversalSingularities;
+import static gregtech.api.util.GT_ModHandler.getModItem;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.MaterialsUEVplus;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class ElectricImplosionCompressorRecipes implements Runnable {
+
+ private static void addElectricImplosionRecipe(final ItemStack[] inputItems, final FluidStack[] inputFluids,
+ final ItemStack[] outputItems, final FluidStack[] outputFluids, final int durationInTicks,
+ final int EUPerTick) {
+ BartWorksRecipeMaps.electricImplosionCompressorRecipes
+ .addRecipe(false, inputItems, outputItems, null, inputFluids, outputFluids, durationInTicks, EUPerTick, 1);
+ }
+
+ private static final ItemStack[] circuits = { ItemList.Circuit_ExoticProcessor.get(1),
+ ItemList.Circuit_OpticalAssembly.get(1), ItemList.Circuit_Biowaresupercomputer.get(1),
+ ItemList.Circuit_Wetwaremainframe.get(1) };
+
+ @Override
+ public void run() {
+ // Custom electric implosion compressor recipes. Cannot be overclocked.
+
+ if (EternalSingularity.isModLoaded()) {
+
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { GT_Values.NI },
+ new FluidStack[] { MaterialsUEVplus.SpaceTime.getMolten(72L) },
+ // OUT.
+ new ItemStack[] { getModItem(EternalSingularity.ID, "eternal_singularity", 1L) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 100 * 20,
+ (int) TierEU.RECIPE_UMV);
+
+ if (UniversalSingularities.isModLoaded())
+ // Raw Exposed Optical Chip
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { ItemList.Circuit_Silicon_Wafer7.get(1L),
+ // Fluxed Electrum Singularity.
+ getModItem(UniversalSingularities.ID, "universal.general.singularity", 1L, 20) },
+ new FluidStack[] { GT_Values.NF },
+ // OUT.
+ new ItemStack[] { ItemList.Circuit_Chip_Optical.get(16L) },
+ new FluidStack[] { GT_Values.NF },
+ 5 * 20,
+ (int) TierEU.RECIPE_UMV);
+
+ }
+
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityPlutoniumNugget", 5L) },
+ new FluidStack[] { Materials.Neutronium.getMolten(72L) },
+ // OUT.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityPlutonium", 1L) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1,
+ (int) TierEU.RECIPE_UEV);
+
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityUraniumNugget", 5L) },
+ new FluidStack[] { Materials.Neutronium.getMolten(72L) },
+ // OUT.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityUranium", 1L) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1,
+ (int) TierEU.RECIPE_UEV);
+
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityThoriumNugget", 5L) },
+ new FluidStack[] { Materials.Neutronium.getMolten(72L) },
+ // OUT.
+ new ItemStack[] { getModItem(GoodGenerator.ID, "highDensityThorium", 1L) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1,
+ (int) TierEU.RECIPE_UEV);
+
+ // Magneto material recipe for base fluid.
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.nanite, MaterialsUEVplus.WhiteDwarfMatter, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.nanite, MaterialsUEVplus.Universium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.nanite, MaterialsUEVplus.BlackDwarfMatter, 1L) },
+ new FluidStack[] { MaterialsUEVplus.RawStarMatter.getFluid(64 * 144L) },
+ // OUT.
+ new ItemStack[] { GT_Values.NI },
+ new FluidStack[] { MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter.getMolten(16 * 144L) },
+ // Recipe stats.
+ 20 * 4,
+ (int) TierEU.RECIPE_UXV);
+
+ // Infinity Catalyst
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfinityCatalyst, 64L), },
+ new FluidStack[] { GT_Values.NF },
+ // OUT.
+ new ItemStack[] { getModItem(Avaritia.ID, "Resource", 1L, 5) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1 * 1,
+ (int) TierEU.RECIPE_UIV);
+
+ if (UniversalSingularities.isModLoaded()) {
+ // Fluxed Singularity
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.block, Materials.ElectrumFlux, 16L), },
+ new FluidStack[] { GT_Values.NF },
+ // OUT.
+ new ItemStack[] { getModItem(UniversalSingularities.ID, "universal.general.singularity", 1L, 20) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1 * 1,
+ (int) TierEU.RECIPE_UIV);
+
+ // Iron Singularity
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { GT_Values.NI },
+ new FluidStack[] { Materials.Iron.getMolten(7296 * 9 * 144L) },
+ // OUT.
+ new ItemStack[] { getModItem(Avaritia.ID, "Singularity", 1L, 0) },
+ new FluidStack[] { GT_Values.NF },
+ // Recipe stats.
+ 1 * 1,
+ (int) TierEU.RECIPE_UIV);
+ }
+ // MHDCSM V2
+ addElectricImplosionRecipe(
+ // IN.
+ new ItemStack[] { MaterialsUEVplus.Eternity.getNanite(1), MaterialsUEVplus.Universium.getNanite(1) },
+ new FluidStack[] { MaterialsUEVplus.RawStarMatter.getFluid(128 * 144L) },
+ // OUT.
+ new ItemStack[] { GT_Values.NI },
+ new FluidStack[] { MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter.getMolten(32 * 144L) },
+ // Recipe stats.
+ 20 * 4,
+ (int) TierEU.RECIPE_MAX);
+
+ this.addMagnetohydrodynamicallyConstrainedStarMatterPartRecipes();
+ }
+
+ private void addMagnetohydrodynamicallyConstrainedStarMatterPartRecipes() {
+
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.frameGt, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.nugget, 9, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.ingot, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.plate, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.plateDense, 1, 3);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.stick, 2, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.round, 8, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.bolt, 8, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.screw, 8, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.ring, 4, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.foil, 8, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.itemCasing, 2, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.gearGtSmall, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.rotor, 1, 2);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.stickLong, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.springSmall, 2, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.spring, 1, 1);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.gearGt, 1, 2);
+ this.addWhiteDwarfMagnetoEICRecipe(OrePrefixes.wireFine, 8, 1);
+ }
+
+ private void addWhiteDwarfMagnetoEICRecipe(final OrePrefixes part, final int multiplier,
+ final int circuitMultiplier) {
+
+ final int partFraction = (int) (144 * part.mMaterialAmount / M);
+
+ for (ItemStack circuit : circuits) {
+ addElectricImplosionRecipe(
+ new ItemStack[] { circuit.splitStack(circuitMultiplier),
+ getModItem(SuperSolarPanels.ID, "solarsplitter", 1, 0),
+ getModItem(OpenComputers.ID, "hologram2", circuitMultiplier, 0),
+ GT_OreDictUnificator.get(part, MaterialsUEVplus.Eternity, multiplier), },
+ new FluidStack[] { MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter
+ .getMolten((long) partFraction * multiplier) },
+ new ItemStack[] { GT_OreDictUnificator
+ .get(part, MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter, multiplier) },
+ new FluidStack[] { GT_Values.NF },
+ (int) (multiplier * (20 * partFraction / 144.0)),
+ (int) TierEU.RECIPE_UXV);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
new file mode 100644
index 0000000000..809e52e6d1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.Gendustry;
+import static gregtech.api.enums.Mods.GregTech;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import java.awt.Color;
+
+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.SideReference;
+import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock;
+import com.github.bartimaeusnek.bartworks.client.renderer.RendererSwitchingColorFluid;
+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.GregTech_API;
+import gregtech.api.enums.FluidState;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+import gregtech.api.fluid.GT_FluidFactory;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.GT_MetaGenerated_Item_98;
+
+public class FluidLoader {
+
+ public static IIcon autogenIIcon;
+ public static Fluid ff;
+ public static int renderID;
+ public static Block bioFluidBlock;
+ public static Fluid[] BioLabFluidMaterials;
+ public static ItemStack[] BioLabFluidCells;
+
+ // OilProcessing chain
+ public static Fluid fulvicAcid, heatedfulvicAcid, Kerogen;
+
+ public static void run() {
+ renderID = RenderingRegistry.getNextAvailableRenderId();
+ ff = new Fluid("BWfakeFluid");
+ GregTech_API.sGTBlockIconload.add(
+ () -> ff.setIcons(
+ GregTech_API.sBlockIcons
+ .registerIcon(GregTech.getResourcePath("fluids", "fluid.molten.autogenerated"))));
+ fulvicAcid = createAndRegisterFluid("Fulvic Acid", new Color(20, 20, 20));
+ heatedfulvicAcid = createAndRegisterFluid("Heated Fulvic Acid", new Color(40, 20, 20), 720);
+ Kerogen = createAndRegisterFluid("Kerogen", new Color(85, 85, 85));
+ BioLabFluidMaterials = new Fluid[] { createAndRegisterFluid("FluorecentdDNA", new Color(125, 50, 170)),
+ createAndRegisterFluid("EnzymesSollution", new Color(240, 200, 125)),
+ createAndRegisterFluid("Penicillin", new Color(255, 255, 255)),
+ createAndRegisterFluid("Polymerase", new Color(110, 180, 110)) };
+
+ BioLabFluidCells = new ItemStack[BioLabFluidMaterials.length];
+
+ GT_MetaGenerated_Item_98.FluidCell[] fluidCells = { 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++) {
+ BioLabFluidCells[i] = fluidCells[i].get();
+ }
+
+ FluidStack dnaFluid = Gendustry.isModLoaded() ? FluidRegistry.getFluidStack("liquiddna", 100)
+ : Materials.Biomass.getFluid(100L);
+ for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) {
+ if (B.isBreedable()) {
+ B.setFluid(
+ GT_FluidFactory.builder(
+ B.getName()
+ .replace(" ", "")
+ .toLowerCase() + "fluid")
+ .withTextureName("molten.autogenerated")
+ .withColorRGBA(
+ new short[] { (short) B.getColor()
+ .getRed(),
+ (short) B.getColor()
+ .getBlue(),
+ (short) B.getColor()
+ .getGreen() })
+ .withLocalizedName(B.getLocalisedName() + " Fluid")
+ .withStateAndTemperature(FluidState.LIQUID, 300)
+ .buildAndRegister()
+ .asFluid());
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(10))
+ .fluidInputs(new FluidStack(B.getFluid(), 1000))
+ .fluidOutputs(dnaFluid)
+ .duration(25 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(centrifugeRecipes);
+ }
+ }
+
+ bioFluidBlock = new BioFluidBlock();
+ GameRegistry.registerBlock(bioFluidBlock, "coloredFluidBlock");
+ GameRegistry.registerTileEntity(BWTileEntityDimIDBridge.class, "bwTEDimIDBridge");
+ if (SideReference.Side.Client) {
+ RendererSwitchingColorFluid.register();
+ RendererGlasBlock.register();
+ }
+ }
+
+ public static Fluid createAndRegisterFluid(String Name, Color color) {
+ return GT_FluidFactory.builder(Name)
+ .withTextureName("molten.autogenerated")
+ .withColorRGBA(
+ new short[] { (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(),
+ (short) color.getAlpha() })
+ .withStateAndTemperature(FluidState.LIQUID, 300)
+ .buildAndRegister()
+ .asFluid();
+ }
+
+ public static Fluid createAndRegisterFluid(String Name, Color color, int temperature) {
+ return GT_FluidFactory.builder(Name)
+ .withTextureName("molten.autogenerated")
+ .withColorRGBA(
+ new short[] { (short) color.getRed(), (short) color.getGreen(), (short) color.getBlue(),
+ (short) color.getAlpha() })
+ .withStateAndTemperature(FluidState.LIQUID, temperature)
+ .buildAndRegister()
+ .asFluid();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java
new file mode 100644
index 0000000000..329d73023f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.BloodArsenal;
+import static gregtech.api.enums.Mods.Botania;
+import static gregtech.api.enums.Mods.Botany;
+import static gregtech.api.enums.Mods.Chisel;
+import static gregtech.api.enums.Mods.EnderIO;
+import static gregtech.api.enums.Mods.ExtraUtilities;
+import static gregtech.api.enums.Mods.GalaxySpace;
+import static gregtech.api.enums.Mods.HardcoreEnderExpansion;
+import static gregtech.api.enums.Mods.IndustrialCraft2;
+import static gregtech.api.enums.Mods.Minecraft;
+import static gregtech.api.enums.Mods.Natura;
+import static gregtech.api.enums.Mods.Railcraft;
+import static gregtech.api.enums.Mods.RandomThings;
+import static gregtech.api.enums.Mods.TecTech;
+import static gregtech.api.enums.Mods.TinkerConstruct;
+import static gregtech.api.enums.Mods.Witchery;
+import static gregtech.api.enums.Mods.ZTones;
+
+import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
+
+/**
+ * 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 {
+
+ public static void run() {
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Minecraft.ID, "stained_glass", i, 3);
+ }
+
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(IndustrialCraft2.ID, "blockAlloyGlass", 0, 4);
+
+ if (BloodArsenal.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(BloodArsenal.ID, "blood_stained_glass", 0, 3);
+ }
+ if (Botania.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Botania.ID, "manaGlass", 0, 4);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Botania.ID, "elfGlass", 0, 5);
+ }
+ if (Botany.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Botany.ID, "stained", 0, 3);
+ }
+
+ if (Chisel.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "glass2", 0, 3);
+
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "glass", i, 3);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "stained_glass_white", i, 3);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "stained_glass_yellow", i, 3);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "stained_glass_lightgray", i, 3);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "stained_glass_brown", i, 3);
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Chisel.ID, "stained_glass_forestry", i, 3);
+ }
+ }
+
+ if (EnderIO.isModLoaded()) {
+ for (int i = 0; i <= 5; ++i) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(EnderIO.ID, "blockFusedQuartz", i, 3);
+ }
+ }
+
+ if (ExtraUtilities.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(ExtraUtilities.ID, "decorativeBlock1", 9, 3);
+ for (int i = 0; i < 12; ++i) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(ExtraUtilities.ID, "decorativeBlock2", i, 3);
+ }
+
+ for (int i = 0; i < 6; ++i) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(ExtraUtilities.ID, "etherealglass", i, 3);
+
+ }
+ }
+
+ if (GalaxySpace.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(GalaxySpace.ID, "futureglass", 0, 3);
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(GalaxySpace.ID, "futureglasses", i, 3);
+ }
+ }
+
+ if (HardcoreEnderExpansion.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(HardcoreEnderExpansion.ID, "laboratory_glass", 0, 3);
+ }
+
+ if (IndustrialCraft2.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Minecraft.ID, "glass", 0, 3);
+ }
+
+ if (Natura.isModLoaded()) {
+ for (int i = 0; i <= 1; ++i) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Natura.ID, "NetherGlass", i, 3);
+ }
+ }
+
+ if (Railcraft.isModLoaded()) {
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Railcraft.ID, "glass", i, 3);
+ }
+ }
+
+ if (RandomThings.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(RandomThings.ID, "spectreGlass", 0, 3);
+ }
+
+ if (TinkerConstruct.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(TinkerConstruct.ID, "GlassBlock", 0, 3);
+
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(TinkerConstruct.ID, "GlassBlock.StainedClear", i, 3);
+ }
+ }
+
+ if (TecTech.isModLoaded()) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(TecTech.ID, "tile.quantumGlass", 0, 8);
+ }
+
+ if (Witchery.isModLoaded()) {
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(Witchery.ID, "shadedglass", i, 3);
+ }
+ }
+
+ if (ZTones.isModLoaded()) {
+ for (int i = 0; i < 16; i++) {
+ BioVatLogicAdder.BioVatGlass.addCustomGlass(ZTones.ID, "tile.glaxx", i, 3);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
new file mode 100644
index 0000000000..499686e6e0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -0,0 +1,453 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.MainMod.BWT;
+import static com.github.bartimaeusnek.bartworks.MainMod.GT2;
+import static gregtech.api.enums.Mods.GalactiGreg;
+import static gregtech.api.enums.Mods.TecTech;
+
+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.MainMod;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks2;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer_MachineBlock;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks;
+import com.github.bartimaeusnek.bartworks.common.items.BW_SimpleWindMeter;
+import com.github.bartimaeusnek.bartworks.common.items.BW_Stonage_Rotors;
+import com.github.bartimaeusnek.bartworks.common.items.Circuit_Programmer;
+import com.github.bartimaeusnek.bartworks.common.items.GT_Destructopack_Item;
+import com.github.bartimaeusnek.bartworks.common.items.GT_Rockcutter_Item;
+import com.github.bartimaeusnek.bartworks.common.items.GT_Teslastaff_Item;
+import com.github.bartimaeusnek.bartworks.common.items.SimpleIconItem;
+import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_ExperimentalFloodGate;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
+import com.github.bartimaeusnek.bartworks.common.tileentities.debug.CreativeScanner;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_CircuitAssemblyLine;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_DEHP;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ElectricImplosionCompressor;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaBlastFurnace;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaChemicalReactor;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaDistillTower;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaOilCracker;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaVacuumFreezer;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_AcidGenerator;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_CompressedFluidHatch;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_Diode;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_EnergyDistributor;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_GiantOutputHatch;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_HumongousInputHatch;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+import com.github.bartimaeusnek.crossmod.galacticgreg.GT_TileEntity_VoidMiners;
+import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.TT_MetaTileEntity_LowPowerLaserBox;
+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 fox.spiteful.avaritia.blocks.LudicrousBlocks;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import ic2.api.item.IKineticRotor;
+
+public class ItemRegistry {
+
+ public static final Item DESTRUCTOPACK = new GT_Destructopack_Item();
+ public static final Item TESLASTAFF = new GT_Teslastaff_Item();
+ public static final Item ROCKCUTTER_LV = new GT_Rockcutter_Item(1);
+ 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 Item LEATHER_ROTOR = new BW_Stonage_Rotors(
+ 7,
+ 0.15f,
+ 5,
+ 1.15f,
+ 1,
+ 50,
+ 10000000,
+ IKineticRotor.GearboxType.WIND,
+ new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorLeather.png"),
+ "BW_LeatherRotor",
+ "rotors/itemRotorLeather");
+ public static final Item WOOL_ROTOR = new BW_Stonage_Rotors(
+ 7,
+ 0.18f,
+ 3,
+ 1.35f,
+ 1,
+ 50,
+ 9000000,
+ IKineticRotor.GearboxType.WIND,
+ new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorWool.png"),
+ "BW_WoolRotor",
+ "rotors/itemRotorWool");
+ public static final Item PAPER_ROTOR = new BW_Stonage_Rotors(
+ 7,
+ 0.2f,
+ 12,
+ 0.9f,
+ 1,
+ 50,
+ 800000,
+ IKineticRotor.GearboxType.WIND,
+ new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorPaper.png"),
+ "BW_PaperRotor",
+ "rotors/itemRotorPaper");
+ public static final Item COMBINED_ROTOR = new BW_Stonage_Rotors(
+ 9,
+ 0.22f,
+ 7,
+ 1.05f,
+ 1,
+ 50,
+ 6000000,
+ IKineticRotor.GearboxType.WIND,
+ new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorCombined.png"),
+ "BW_CombinedRotor",
+ "rotors/itemRotorCombined");
+ public static final Item CRAFTING_PARTS = new SimpleSubItemClass(
+ "grindstone_top",
+ "grindstone_bottom",
+ "completed_grindstone",
+ "rotors/leatherParts",
+ "rotors/woolParts",
+ "rotors/paperParts",
+ "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 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 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 }, },
+ 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 } },
+ MainMod.BIO_TAB,
+ true,
+ false);
+
+ 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);
+ public static final Block bw_fake_glasses2 = new BW_GlasBlocks2(
+ "BW_GlasBlocks2",
+ 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",
+ // MainMod.MOD_ID+":DEHP_Casing",
+ // MainMod.MOD_ID+":DEHP_Casing_Base"
+ },
+ BWT), };
+
+ public static ItemStack[] diode2A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode4A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode8A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode12A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode16A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] energyDistributor = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] acidGens = new ItemStack[3];
+ public static ItemStack acidGensLV;
+ public static ItemStack[] megaMachines = new ItemStack[5];
+ public static ItemStack dehp;
+ public static ItemStack[] voidminer = new ItemStack[3];
+ public static ItemStack THTR;
+ public static ItemStack HTGR;
+ public static ItemStack eic;
+ public static ItemStack cal;
+ public static ItemStack compressedHatch;
+ public static ItemStack giantOutputHatch;
+ public static ItemStack humongousInputHatch;
+
+ public static ItemStack[][][] TecTechLaserAdditions = new ItemStack[3][4][4];
+ public static ItemStack TecTechPipeEnergyLowPower;
+
+ public static void run() {
+ GameRegistry.registerBlock(ItemRegistry.bw_fake_glasses, "BW_FakeGlasBlock");
+ GameRegistry.registerBlock(ItemRegistry.bw_fake_glasses2, "BW_FakeGlasBlocks2");
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings");
+ GameRegistry.registerItem(ItemRegistry.LEATHER_ROTOR, "BW_LeatherRotor");
+ GameRegistry.registerItem(ItemRegistry.WOOL_ROTOR, "BW_WoolRotor");
+ GameRegistry.registerItem(ItemRegistry.PAPER_ROTOR, "BW_PaperRotor");
+ GameRegistry.registerItem(ItemRegistry.COMBINED_ROTOR, "BW_CombinedRotor");
+ GameRegistry.registerItem(ItemRegistry.CRAFTING_PARTS, "craftingParts");
+ GameRegistry.registerTileEntity(BW_RotorBlock.class, "BWRotorBlockTE");
+ GameRegistry.registerBlock(ItemRegistry.ROTORBLOCK, BW_ItemBlocks.class, "BWRotorBlock");
+ GameRegistry.registerTileEntity(BW_TileEntity_HeatedWaterPump.class, "BWHeatedWaterPumpTE");
+ GameRegistry.registerBlock(ItemRegistry.PUMPBLOCK, BW_ItemBlocks.class, "BWHeatedWaterPumpBlock");
+ GameRegistry.registerItem(ItemRegistry.PUMPPARTS, "BWPumpParts");
+ GameRegistry.registerItem(ItemRegistry.WINDMETER, "BW_SimpleWindMeter");
+ GameRegistry.registerTileEntity(BW_TileEntity_ExperimentalFloodGate.class, "BWExpReversePump");
+ GameRegistry.registerBlock(ItemRegistry.EXPPUMP, BW_ItemBlocks.class, "BWExpReversePumpBlock");
+
+ // GT2 stuff
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[0], BW_ItemBlocks.class, "BW_ItemBlocks");
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[1], BW_ItemBlocks.class, "GT_LESU_CASING");
+ if (ConfigHandler.teslastaff)
+ GameRegistry.registerItem(ItemRegistry.TESLASTAFF, ItemRegistry.TESLASTAFF.getUnlocalizedName());
+
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_LV, ItemRegistry.ROCKCUTTER_LV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_MV, ItemRegistry.ROCKCUTTER_MV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_HV, ItemRegistry.ROCKCUTTER_HV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.TAB, "tabIconGT2");
+
+ 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);
+
+ // 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);
+
+ // Also spacetime, transcendent metal, and universium
+ bitmask = GregTech_API.sMachineIDs.getOrDefault(GregTech_API.sBlockMetal9, 0) | 1 << 3 | 1 << 4 | 1 << 8;
+ GregTech_API.registerMachineBlock(GregTech_API.sBlockMetal9, bitmask);
+
+ // Also infinity
+ bitmask = GregTech_API.sMachineIDs.getOrDefault(LudicrousBlocks.resource_block, 0) | 1 << 1;
+ GregTech_API.registerMachineBlock(LudicrousBlocks.resource_block, bitmask);
+
+ ItemRegistry.THTR = new GT_TileEntity_THTR(
+ 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);
+ GT_TileEntity_HTGR.HTGRMaterials.registeraTHR_Materials();
+
+ // ID ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 15 + 49 IS TAKEN !!! (12792)
+
+ GT_OreDictUnificator
+ .add(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]));
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ }
+ 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);
+ }
+
+ 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);
+
+ ItemRegistry.dehp = new GT_TileEntity_DEHP(
+ 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);
+ ItemRegistry.megaMachines[1] = new GT_TileEntity_MegaVacuumFreezer(
+ 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);
+ ItemRegistry.compressedHatch = new GT_MetaTileEntity_CompressedFluidHatch(
+ 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);
+ ItemRegistry.humongousInputHatch = new GT_MetaTileEntity_HumongousInputHatch(
+ ConfigHandler.IDOffset + GT_Values.VN.length * 9 + 55,
+ "HumongousInputHatch",
+ "Humongous Input Hatch").getStackForm(1L);
+ ItemRegistry.megaMachines[2] = new GT_TileEntity_MegaDistillTower(
+ 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);
+ ItemRegistry.megaMachines[4] = new GT_TileEntity_MegaOilCracker(
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 639,
+ "MegaOilCracker",
+ "Mega Oil Cracker").getStackForm(1L);
+
+ if (GalactiGreg.isModLoaded()) {
+ ItemRegistry.voidminer[2] = new GT_TileEntity_VoidMiners.VMUV(
+ 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);
+ ItemRegistry.voidminer[0] = new GT_TileEntity_VoidMiners.VMLUV(
+ ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 13,
+ "VoidMiner1",
+ "Void Miner I").getStackForm(1L);
+ }
+ if (TecTech.isModLoaded()) {
+ TecTechPipeEnergyLowPower = new TT_MetaTileEntity_Pipe_Energy_LowPower(
+ 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++;
+ }
+ }
+ 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++;
+ }
+ }
+ 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++;
+ }
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java
new file mode 100644
index 0000000000..020f89e703
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LocalisationLoader.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.util.GT_LanguageManager;
+
+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");
+ }
+
+ private static void localiseAchivements() {
+ GT_LanguageManager
+ .addStringLocalization("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.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!");
+ GT_LanguageManager.addStringLocalization(
+ "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() {
+ localiseAchivements();
+ localiseTooltips();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java
new file mode 100644
index 0000000000..d141fe8b65
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RadioHatchMaterialLoader.java
@@ -0,0 +1,224 @@
+package com.github.bartimaeusnek.bartworks.common.loaders;
+
+import static gregtech.api.enums.Mods.IndustrialCraft2;
+
+import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems;
+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;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class RadioHatchMaterialLoader {
+
+ public static void run() {
+
+ for (Werkstoff material : Werkstoff.werkstoffHashSet) {
+ if (material != null && material.getStats()
+ .isRadioactive()) {
+ int level = (int) material.getStats()
+ .getProtons();
+ short[] rgba = material.getRGBA();
+ if (material.hasItemType(OrePrefixes.stick))
+ BWRecipes.instance.addRadHatch(material.get(OrePrefixes.stick), level, 1, rgba);
+ if (material.hasItemType(OrePrefixes.stickLong))
+ BWRecipes.instance.addRadHatch(material.get(OrePrefixes.stickLong), level, 2, rgba);
+ }
+ }
+
+ for (Materials material : Materials.getAll()) {
+ if (material == null || material.mElement == null) continue;
+ 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);
+ }
+ }
+
+ Materials[] spacialMaterial = { Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria };
+ int[] spacialValue = { 130, 140, 150 };
+
+ for (int i = 0; i < spacialMaterial.length; i++) {
+ if (GT_OreDictUnificator.get(OrePrefixes.stick, spacialMaterial[i], 1) != null)
+ BWRecipes.instance.addRadHatch(
+ GT_OreDictUnificator.get(OrePrefixes.stick, spacialMaterial[i], 1),
+ spacialValue[i],
+ 1,
+ spacialMaterial[i].mRGBa);
+ if (GT_OreDictUnificator.get(OrePrefixes.stickLong, spacialMaterial[i], 1) != null)
+ BWRecipes.instance.addRadHatch(
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, spacialMaterial[i], 1),
+ spacialValue[i],
+ 2,
+ spacialMaterial[i].mRGBa);
+ }
+
+ BWRecipes.instance.addRadHatch(
+ 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);
+ BWRecipes.instance.addRadHatch(
+ 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);
+ BWRecipes.instance.addRadHatch(
+ 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);
+
+ BWRecipes.instance.addRadHatch(
+ 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);
+ BWRecipes.instance.addRadHatch(
+ ItemList.Uraniumcell_4.get(1),
+ (int) Materials.Uranium.getProtons(),
+ 12,
+ Materials.Uranium.mRGBa);
+
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.TiberiumCell_1.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons(),
+ 3,
+ WerkstoffLoader.Tiberium.getRGBA());
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.TiberiumCell_2.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons(),
+ 6,
+ WerkstoffLoader.Tiberium.getRGBA());
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.TiberiumCell_4.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons(),
+ 12,
+ WerkstoffLoader.Tiberium.getRGBA());
+
+ BWRecipes.instance
+ .addRadHatch(BW_NonMeta_MaterialItems.TheCoreCell.get(1), 140, 96, Materials.NaquadahEnriched.mRGBa);
+
+ BWRecipes.instance.addRadHatch(
+ ItemList.Depleted_Thorium_1.get(1),
+ (int) Materials.Thorium.getProtons() / 10,
+ 3,
+ Materials.Thorium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ ItemList.Depleted_Thorium_2.get(1),
+ (int) Materials.Thorium.getProtons() / 10,
+ 6,
+ Materials.Thorium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ ItemList.Depleted_Thorium_4.get(1),
+ (int) Materials.Thorium.getProtons() / 10,
+ 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(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXSimpledepleted", 1),
+ (int) Materials.Plutonium.getProtons() / 10,
+ 3,
+ Materials.Plutonium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXDualdepleted", 1),
+ (int) Materials.Plutonium.getProtons() / 10,
+ 6,
+ Materials.Plutonium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorMOXQuaddepleted", 1),
+ (int) Materials.Plutonium.getProtons() / 10,
+ 12,
+ Materials.Plutonium.mRGBa);
+
+ BWRecipes.instance.addRadHatch(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumSimpledepleted", 1),
+ (int) Materials.Uranium.getProtons() / 10,
+ 3,
+ Materials.Uranium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumDualdepleted", 1),
+ (int) Materials.Uranium.getProtons() / 10,
+ 6,
+ Materials.Uranium.mRGBa);
+ BWRecipes.instance.addRadHatch(
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "reactorUraniumQuaddepleted", 1),
+ (int) Materials.Uranium.getProtons() / 10,
+ 12,
+ Materials.Uranium.mRGBa);
+
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons() / 10,
+ 3,
+ WerkstoffLoader.Tiberium.getRGBA());
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons() / 10,
+ 6,
+ WerkstoffLoader.Tiberium.getRGBA());
+ BWRecipes.instance.addRadHatch(
+ BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1),
+ (int) WerkstoffLoader.Tiberium.getBridgeMaterial()
+ .getProtons() / 10,
+ 12,
+ WerkstoffLoader.Tiberium.getRGBA());
+
+ BWRecipes.instance
+ .addRadHatch(BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1), 130 / 10, 96, Materials.Naquadah.mRGBa);
+
+ BWRecipes.instance.addRadHatch(ItemList.MNqCell_1.get(1), 150, 3, Materials.Naquadria.mRGBa);
+ BWRecipes.instance.addRadHatch(ItemList.MNqCell_2.get(1), 150, 6, Materials.Naquadria.mRGBa);
+ BWRecipes.instance.addRadHatch(ItemList.MNqCell_4.get(1), 150, 12, Materials.Naquadria.mRGBa);
+
+ BWRecipes.instance.addRadHatch(ItemList.Depleted_MNq_1.get(1), 150 / 10, 3, Materials.Naquadria.mRGBa);
+ BWRecipes.instance.addRadHatch(ItemList.Depleted_MNq_2.get(1), 150 / 10, 6, Materials.Naquadria.mRGBa);
+ BWRecipes.instance.addRadHatch(ItemList.Depleted_MNq_4.get(1), 150 / 10, 12, Materials.Naquadria.mRGBa);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
new file mode 100644
index 0000000000..c55561687b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.github.bartimaeusnek.bartworks.common.loaders.recipes.Assembler;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.AssemblyLine;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Autoclave;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Centrifuge;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.ChemicalBath;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.ChemicalReactor;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.CraftingRecipes;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Electrolyzer;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Extractor;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.FakeRecipes;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.FluidHeater;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.FluidSolidifier;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.FormingPress;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.LaserEngraver;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Mixer;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.Pulverizer;
+import com.github.bartimaeusnek.bartworks.common.loaders.recipes.PyrolyseOven;
+
+import gregtech.api.util.GT_ModHandler;
+
+public class RecipeLoader {
+
+ public static final long BITSD = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE
+ | GT_ModHandler.RecipeBits.REVERSIBLE;
+
+ public static void run() {
+ new Assembler().run();
+ new AssemblyLine().run();
+ new Autoclave().run();
+ new Centrifuge().run();
+ new ChemicalBath().run();
+ new ChemicalReactor().run();
+ new CraftingRecipes().run();
+ new Electrolyzer().run();
+ new Extractor().run();
+ new FakeRecipes().run();
+ new FluidHeater().run();
+ new FluidSolidifier().run();
+ new FormingPress().run();
+ new LaserEngraver().run();
+ new Mixer().run();
+ new Pulverizer().run();
+ new PyrolyseOven().run();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java
new file mode 100644
index 0000000000..615eed0c43
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RegisterServerCommands.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.loaders;
+
+import com.github.bartimaeusnek.bartworks.common.commands.ChangeConfig;
+import com.github.bartimaeusnek.bartworks.common.commands.ClearCraftingCache;
+import com.github.bartimaeusnek.bartworks.common.commands.GetWorkingDirectory;
+import com.github.bartimaeusnek.bartworks.common.commands.PrintRecipeListToFile;
+import com.github.bartimaeusnek.bartworks.common.commands.RunGC;
+import com.github.bartimaeusnek.bartworks.common.commands.SummonRuin;
+
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+
+public class RegisterServerCommands {
+
+ public static void registerAll(FMLServerStartingEvent event) {
+ event.registerServerCommand(new SummonRuin());
+ event.registerServerCommand(new ChangeConfig());
+ event.registerServerCommand(new PrintRecipeListToFile());
+ event.registerServerCommand(new ClearCraftingCache());
+ event.registerServerCommand(new GetWorkingDirectory());
+ event.registerServerCommand(new RunGC());
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
new file mode 100644
index 0000000000..6f50650484
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
@@ -0,0 +1,583 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.system.material.WerkstoffLoader.ANAEROBE_GAS;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.NOBLE_GAS;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.fluids;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.molten;
+import static gregtech.api.enums.GT_Values.VN;
+import static gregtech.api.enums.Mods.TinkerConstruct;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.API.recipe.DynamicGTRecipe;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.StreamUtils;
+import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
+import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
+import com.google.common.collect.ArrayListMultimap;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gnu.trove.map.hash.TObjectDoubleHashMap;
+import gregtech.api.enums.Element;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TierEU;
+import gregtech.api.objects.GT_ItemStack;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+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(TinkerConstruct.ID, "materials", 1L, 12) // Raw Aluminum -> Aluminium Ingot
+ // (coremod)
+ );
+
+ private StaticRecipeChangeLoaders() {}
+
+ public static void addEBFGasRecipes() {
+ if (gtEbfGasRecipeTimeMultipliers == null) {
+ // For Werkstoff gases, use Werkstoff.Stats.setEbfGasRecipeTimeMultiplier
+ gtEbfGasRecipeTimeMultipliers = new TObjectDoubleHashMap<>(10, 0.5F, -1.0D); // keep default value as -1
+ // Example to make Argon cut recipe times into a third of the original:
+ // gtEbfGasRecipeTimeMultipliers.put(Materials.Argon, 1.0D / 3.0D);
+
+ gtEbfGasRecipeTimeMultipliers.put(Materials.Nitrogen, 1.0D);
+ gtEbfGasRecipeTimeMultipliers.put(Materials.Helium, 0.9D);
+ gtEbfGasRecipeTimeMultipliers.put(Materials.Argon, 0.8D);
+ gtEbfGasRecipeTimeMultipliers.put(Materials.Radon, 0.7D);
+ }
+ if (gtEbfGasRecipeConsumptionMultipliers == null) {
+ // For Werkstoff gases, use Werkstoff.Stats.setEbfGasRecipeConsumedAmountMultiplier
+ 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);
+ gtEbfGasRecipeConsumptionMultipliers.put(Materials.Nitrogen, 1.0D);
+ gtEbfGasRecipeConsumptionMultipliers.put(Materials.Helium, 1.0D);
+ gtEbfGasRecipeConsumptionMultipliers.put(Materials.Argon, 0.85D);
+ gtEbfGasRecipeConsumptionMultipliers.put(Materials.Radon, 0.7D);
+ }
+ ArrayListMultimap<SubTag, GT_Recipe> toChange = getRecipesToChange(NOBLE_GAS, ANAEROBE_GAS);
+ editRecipes(toChange, getNoGasItems(toChange));
+ }
+
+ public static void fixEnergyRequirements() {
+ RecipeMap.ALL_RECIPE_MAPS.values()
+ .stream()
+ .filter(StreamUtils::filterVisualMaps)
+ .forEach(
+ recipeMap -> recipeMap.getAllRecipes()
+ .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);
+ }
+ }
+ }));
+ }
+
+ public static void unificationRecipeEnforcer() {
+ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
+ StaticRecipeChangeLoaders.runMaterialLinker(werkstoff);
+ if (werkstoff.getGenerationFeatures().enforceUnification) {
+ HashSet<String> oreDictNames = new HashSet<>(werkstoff.getADDITIONAL_OREDICT());
+ 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
+ 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 (RecipeMap<?> map : RecipeMap.ALL_RECIPE_MAPS.values()) {
+ List<GT_Recipe> toRemove = new ArrayList<>();
+ nextRecipe: for (GT_Recipe recipe : map.getAllRecipes()) {
+ boolean removal = map.equals(RecipeMaps.fluidExtractionRecipes)
+ || map.equals(RecipeMaps.fluidSolidifierRecipes);
+ for (int i = 0; i < recipe.mInputs.length; i++) {
+ if (!GT_Utility.areStacksEqual(recipe.mInputs[i], toReplace)) continue;
+ if (removal) {
+ toRemove.add(recipe);
+ continue nextRecipe;
+ }
+ 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) {
+ toRemove.add(recipe);
+ continue nextRecipe;
+ }
+ recipe.mOutputs[i] = GT_Utility
+ .copyAmount(recipe.mOutputs[i].stackSize, replacement);
+ }
+ if (recipe.mSpecialItems instanceof ItemStack specialItemStack) {
+ if (!GT_Utility.areStacksEqual(specialItemStack, toReplace)) continue;
+ if (removal) {
+ toRemove.add(recipe);
+ continue nextRecipe;
+ }
+ recipe.mSpecialItems = GT_Utility
+ .copyAmount(specialItemStack.stackSize, replacement);
+ }
+ }
+ map.getBackend()
+ .removeRecipes(toRemove);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static void runMoltenUnificationEnfocement(Werkstoff werkstoff) {
+ if (werkstoff.getGenerationFeatures().enforceUnification && werkstoff.hasItemType(OrePrefixes.cellMolten)) {
+ try {
+ FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(
+ new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144),
+ werkstoff.get(OrePrefixes.cellMolten),
+ Materials.Empty.getCells(1));
+ Field f = GT_Utility.class.getDeclaredField("sFilledContainerToData");
+ f.setAccessible(true);
+ @SuppressWarnings("unchecked")
+ Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData> sFilledContainerToData = (Map<GT_ItemStack, FluidContainerRegistry.FluidContainerData>) f
+ .get(null);
+ Set<Map.Entry<GT_ItemStack, FluidContainerRegistry.FluidContainerData>> toremFilledContainerToData = new HashSet<>();
+ ItemStack toReplace = null;
+ for (Map.Entry<GT_ItemStack, FluidContainerRegistry.FluidContainerData> entry : sFilledContainerToData
+ .entrySet()) {
+ final String MODID = GameRegistry.findUniqueIdentifierFor(data.filledContainer.getItem()).modId;
+ if (MainMod.MOD_ID.equals(MODID) || BartWorksCrossmod.MOD_ID.equals(MODID)) continue;
+ if (entry.getValue().fluid.equals(data.fluid)
+ && !entry.getValue().filledContainer.equals(data.filledContainer)) {
+ toReplace = entry.getValue().filledContainer;
+ toremFilledContainerToData.add(entry);
+ }
+ }
+ sFilledContainerToData.entrySet()
+ .removeAll(toremFilledContainerToData);
+ Set<GT_Recipe> toremRecipeList = new HashSet<>();
+ if (toReplace != null) {
+ for (RecipeMap<?> map : RecipeMap.ALL_RECIPE_MAPS.values()) {
+ toremRecipeList.clear();
+ for (GT_Recipe recipe : map.getAllRecipes()) {
+ for (ItemStack mInput : recipe.mInputs) {
+ if (GT_Utility.areStacksEqual(mInput, toReplace)) {
+ toremRecipeList.add(recipe);
+ // recipe.mInputs[i] = data.filledContainer;
+ }
+ }
+ for (ItemStack mOutput : recipe.mOutputs) {
+ if (GT_Utility.areStacksEqual(mOutput, toReplace)) {
+ toremRecipeList.add(recipe);
+ // recipe.mOutputs[i] = data.filledContainer;
+ if (map == RecipeMaps.fluidCannerRecipes
+ && GT_Utility.areStacksEqual(mOutput, data.filledContainer)
+ && !recipe.mFluidInputs[0].equals(data.fluid)) {
+ toremRecipeList.add(recipe);
+ // recipe.mOutputs[i] = data.filledContainer;
+ }
+ }
+ }
+ if (recipe.mSpecialItems instanceof ItemStack
+ && GT_Utility.areStacksEqual((ItemStack) recipe.mSpecialItems, toReplace)) {
+ toremRecipeList.add(recipe);
+ // recipe.mSpecialItems = data.filledContainer;
+ }
+ }
+ map.getBackend()
+ .removeRecipes(toremRecipeList);
+ }
+ }
+ GT_Utility.addFluidContainerData(data);
+ } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private static void runUnficationDeleter(Werkstoff werkstoff) {
+ if (werkstoff.getType() == Werkstoff.Types.ELEMENT && werkstoff.getBridgeMaterial() != null
+ && Element.get(werkstoff.getToolTip()) != Element._NULL) {
+ werkstoff.getBridgeMaterial().mElement = Element.get(werkstoff.getToolTip());
+ Element.get(werkstoff.getToolTip()).mLinkedMaterials = new ArrayList<>();
+ Element.get(werkstoff.getToolTip()).mLinkedMaterials.add(werkstoff.getBridgeMaterial());
+ }
+
+ 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) {
+ if (werkstoff.getType() == Werkstoff.Types.ELEMENT && werkstoff.getBridgeMaterial() != null
+ && Element.get(werkstoff.getToolTip()) != Element._NULL) {
+ werkstoff.getBridgeMaterial().mElement = Element.get(werkstoff.getToolTip());
+ Element.get(werkstoff.getToolTip()).mLinkedMaterials = new ArrayList<>();
+ Element.get(werkstoff.getToolTip()).mLinkedMaterials.add(werkstoff.getBridgeMaterial());
+ }
+
+ for (OrePrefixes prefixes : OrePrefixes.values())
+ if (werkstoff.hasItemType(prefixes) && werkstoff.getBridgeMaterial() != null) {
+ 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);
+ }
+ }
+ }
+
+ /**
+ * 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
+ */
+ private static ArrayListMultimap<SubTag, GT_Recipe> getRecipesToChange(SubTag... GasTags) {
+ ArrayListMultimap<SubTag, GT_Recipe> toAdd = ArrayListMultimap.create();
+ for (GT_Recipe recipe : RecipeMaps.blastFurnaceRecipes.getAllRecipes()) {
+ if (recipe.mFluidInputs != null && recipe.mFluidInputs.length > 0) {
+ Materials mat = getMaterialFromInputFluid(recipe);
+ 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]));
+ toAdd.put(tag, recipe);
+ }
+ }
+ }
+ }
+ }
+ return toAdd;
+ }
+
+ /**
+ * 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
+ */
+ private static HashSet<ItemStack> getNoGasItems(ArrayListMultimap<SubTag, GT_Recipe> base) {
+ HashSet<ItemStack> toAdd = new HashSet<>();
+ ArrayListMultimap<SubTag, GT_Recipe> repToAdd = ArrayListMultimap.create();
+ for (GT_Recipe recipe : RecipeMaps.blastFurnaceRecipes.getAllRecipes()) {
+ 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;
+ }
+
+ private static int transformEBFGasRecipeTime(int originalDuration, long originalGasProtons, long newGasProtons) {
+ double protonTerm = originalGasProtons * (newGasProtons >= originalGasProtons ? 1.0D : 2.75D) - newGasProtons;
+ return Math.max(1, (int) (originalDuration / 200D * Math.max(200D + protonTerm, 1D)));
+ }
+
+ private static int transformEBFGasRecipeTime(GT_Recipe recipe, Materials originalGas, Materials newGas) {
+ double newEbfMul = gtEbfGasRecipeTimeMultipliers.get(newGas);
+ double originalEbfMul = gtEbfGasRecipeTimeMultipliers.get(originalGas);
+ if (newEbfMul < 0.0D || originalEbfMul < 0.0D) {
+ return transformEBFGasRecipeTime(recipe.mDuration, originalGas.getProtons(), newGas.getProtons());
+ }
+ return Math.max(1, (int) (recipe.mDuration * newEbfMul / originalEbfMul));
+ }
+
+ private static int transformEBFGasRecipeTime(GT_Recipe recipe, Materials originalGas, Werkstoff newGas) {
+ double newEbfMul = newGas.getStats()
+ .getEbfGasRecipeTimeMultiplier();
+ double originalEbfMul = gtEbfGasRecipeTimeMultipliers.get(originalGas);
+ if (newEbfMul < 0.0D || originalEbfMul < 0.0D) {
+ return transformEBFGasRecipeTime(
+ recipe.mDuration,
+ originalGas.getProtons(),
+ newGas.getStats()
+ .getProtons());
+ }
+ return Math.max(1, (int) (recipe.mDuration * newEbfMul / originalEbfMul));
+ }
+
+ private static int transformEBFNoGasRecipeTime(GT_Recipe recipe, Materials originalGas) {
+ return transformEBFGasRecipeTime(recipe.mDuration, originalGas.getProtons(), 0);
+ }
+
+ 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(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 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 GT_Recipe(
+ 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) {
+ for (Werkstoff newGas : Werkstoff.werkstoffHashMap.values()) {
+ if (newGas.contains(GasTag)) {
+ int time = transformEBFGasRecipeTime(recipe, originalGas, newGas);
+ int gasAmount = Math.max(
+ 1,
+ (int) Math.round(
+ 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 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 GT_Recipe(
+ 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) {
+ for (ItemStack is : noGas) {
+ byte circuitConfiguration = 1;
+ if (GT_Utility.areStacksEqual(is, recipe.mOutputs[0])) {
+ ArrayList<ItemStack> inputs = new ArrayList<>(recipe.mInputs.length);
+ for (ItemStack stack : recipe.mInputs)
+ 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) (OrePrefixes.dustSmall
+ .equals(GT_OreDictUnificator.getAssociation(stack).mPrefix)
+ ? 4
+ : OrePrefixes.dustTiny.equals(GT_OreDictUnificator.getAssociation(stack).mPrefix)
+ ? 9
+ : 1);
+ inputs.add(stack);
+ }
+ inputs.add(GT_Utility.getIntegratedCircuit(circuitConfiguration));
+ toAdd.add(
+ new 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;
+ }
+ }
+ }
+
+ private static void removeDuplicateGasRecipes(HashSet<GT_Recipe> toAdd) {
+ 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
+ || recipe.mSpecialValue != recipe2.mSpecialValue
+ || recipe == recipe2
+ || recipe.mInputs.length != recipe2.mInputs.length
+ || 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;
+ }
+ for (int i = 0; i < recipe.mFluidInputs.length; i++) {
+ if (!GT_Utility.areFluidsEqual(recipe.mFluidInputs[i], recipe2.mFluidInputs[i])) isSame = false;
+ }
+ if (isSame) duplicates.add(recipe2);
+ }
+ }
+ toAdd.removeAll(duplicates);
+ }
+
+ private static Materials getMaterialFromInputFluid(GT_Recipe recipe) {
+ String materialString = recipe.mFluidInputs[0].getFluid()
+ .getName();
+ materialString = StringUtils.removeStart(materialString, "molten");
+ materialString = StringUtils.removeStart(materialString, "fluid");
+ materialString = StringUtils.capitalize(materialString);
+ return Materials.get(materialString);
+ }
+
+ private static void editRecipes(ArrayListMultimap<SubTag, GT_Recipe> base, HashSet<ItemStack> noGas) {
+ HashSet<GT_Recipe> toAdd = new HashSet<>();
+
+ for (SubTag gasTag : base.keySet()) {
+ for (GT_Recipe recipe : base.get(gasTag)) {
+ if (recipe.mFluidInputs != null && recipe.mFluidInputs.length > 0) {
+ Materials originalGas = getMaterialFromInputFluid(recipe);
+ if (originalGas != Materials._NULL) {
+ editEBFWerkstoffRecipes(gasTag, recipe, originalGas, toAdd);
+ editEBFMaterialRecipes(gasTag, recipe, originalGas, toAdd);
+ editEBFNoGasRecipes(recipe, originalGas, toAdd, noGas);
+ }
+ }
+ }
+ RecipeMaps.blastFurnaceRecipes.getBackend()
+ .removeRecipes(base.get(gasTag));
+ }
+
+ removeDuplicateGasRecipes(toAdd);
+ toAdd.forEach(RecipeMaps.blastFurnaceRecipes::add);
+ }
+
+ public static void addElectricImplosionCompressorRecipes() {
+ RecipeMaps.implosionRecipes.getAllRecipes()
+ .stream()
+ .filter(e -> e.mInputs != null)
+ .forEach(
+ recipe -> BartWorksRecipeMaps.electricImplosionCompressorRecipes.addRecipe(
+ true,
+ Arrays.stream(recipe.mInputs)
+ .filter(e -> !StaticRecipeChangeLoaders.checkForExplosives(e))
+ .distinct()
+ .toArray(ItemStack[]::new),
+ recipe.mOutputs,
+ null,
+ null,
+ null,
+ 1,
+ (int) TierEU.RECIPE_UEV,
+ 0));
+
+ // Custom EIC recipes.
+ new ElectricImplosionCompressorRecipes().run();
+ }
+
+ private static boolean checkForExplosives(ItemStack input) {
+ return GT_Utility.areStacksEqual(input, new ItemStack(Blocks.tnt))
+ || GT_Utility.areStacksEqual(input, GT_ModHandler.getIC2Item("industrialTnt", 1L))
+ || GT_Utility.areStacksEqual(input, GT_ModHandler.getIC2Item("dynamite", 1L))
+ || GT_Utility.areStacksEqual(input, ItemList.Block_Powderbarrel.get(1L));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Assembler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Assembler.java
new file mode 100644
index 0000000000..8f152c00c7
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Assembler.java
@@ -0,0 +1,294 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.enums.Mods.GregTech;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.HOURS;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+
+public class Assembler implements Runnable {
+
+ @Override
+ public void run() {
+ 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
+ };
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0),
+ Materials.Lapis.getPlates(9),
+ GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2L),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1))
+ .fluidInputs(FluidRegistry.getFluidStack("ic2coolant", 1000))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1),
+ Materials.Lapis.getBlocks(8),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(new ItemStack(ItemRegistry.BW_BLOCKS[1]))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_ModHandler.getModItem(GregTech.ID, "gt.blockmachines", 64, 1000),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.megaMachines[0])
+ .fluidInputs(Materials.SolderingAlloy.getMolten(9216))
+ .duration(1 * HOURS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_ModHandler.getModItem(GregTech.ID, "gt.blockmachines", 64, 1002),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.megaMachines[1])
+ .fluidInputs(Materials.SolderingAlloy.getMolten(9216))
+ .duration(1 * HOURS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_ModHandler.getModItem(GregTech.ID, "gt.blockmachines", 64, 1126),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.megaMachines[2])
+ .fluidInputs(Materials.SolderingAlloy.getMolten(9216))
+ .duration(1 * HOURS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_ModHandler.getModItem(GregTech.ID, "gt.blockmachines", 64, 1169),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.megaMachines[3])
+ .fluidInputs(Materials.SolderingAlloy.getMolten(9216))
+ .duration(1 * HOURS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_ModHandler.getModItem(GregTech.ID, "gt.blockmachines", 64, 1160),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.megaMachines[4])
+ .fluidInputs(Materials.SolderingAlloy.getMolten(9216))
+ .duration(1 * HOURS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 64L),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(new ItemStack(ItemRegistry.BW_BLOCKS[2], 1, 1))
+ .fluidInputs(Materials.Plastic.getMolten(1152L))
+ .duration(1 * TICKS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ 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))
+ .itemOutputs(new ItemStack(ItemRegistry.CIRCUIT_PROGRAMMER))
+ .fluidInputs(Materials.SolderingAlloy.getMolten(288L))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ ItemList.Circuit_Parts_GlassFiber.get(32),
+ GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 8),
+ WerkstoffLoader.CubicZirconia.get(OrePrefixes.gemExquisite, 2))
+ .itemOutputs(
+ new ItemStack(
+ ItemRegistry.TecTechPipeEnergyLowPower.getItem(),
+ 1,
+ ItemRegistry.TecTechPipeEnergyLowPower.getItemDamage()))
+ .fluidInputs(Materials.Polytetrafluoroethylene.getMolten(72))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(assemblerRecipes);
+
+ ItemStack[][] converters = ItemRegistry.TecTechLaserAdditions[0];
+ 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[] sensors = { ItemList.Sensor_EV, ItemList.Sensor_IV, ItemList.Sensor_LuV, ItemList.Sensor_ZPM };
+
+ OrePrefixes[] prefixes = { OrePrefixes.cableGt04, OrePrefixes.cableGt08, OrePrefixes.cableGt12,
+ OrePrefixes.cableGt16 };
+
+ for (int j = 0; j < 4; j++) {
+ for (int i = 0; i < 4; i++) {
+ ItemStack converter = converters[j][i];
+ ItemStack eInput = input[j][i];
+ ItemStack eDynamo = dynamo[j][i];
+ long recipeConsumption;
+ switch (i) {
+ case 0:
+ recipeConsumption = TierEU.RECIPE_EV;
+ break;
+ case 1:
+ recipeConsumption = TierEU.RECIPE_IV;
+ break;
+ case 2:
+ recipeConsumption = TierEU.RECIPE_LuV;
+ break;
+ case 3:
+ recipeConsumption = TierEU.RECIPE_ZPM;
+ break;
+ default:
+ recipeConsumption = TierEU.RECIPE_EV;
+ break;
+ }
+
+ int solderingAmount = Math.max(144 * i, 72) * (j + 1);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+
+ 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)))
+ .itemOutputs(converter)
+ .fluidInputs(Materials.SolderingAlloy.getMolten(solderingAmount))
+ .duration((10 * (j + 1)) * SECONDS)
+ .eut(recipeConsumption)
+ .addTo(assemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ 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)))
+ .itemOutputs(converter)
+ .fluidInputs(Materials.SolderingAlloy.getMolten(solderingAmount))
+ .duration((10 * (j + 1)) * SECONDS)
+ .eut(recipeConsumption)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ 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)))
+ .itemOutputs(eInput)
+ .fluidInputs(Materials.SolderingAlloy.getMolten(solderingAmount))
+ .duration((10 * (j + 1)) * SECONDS)
+ .eut(recipeConsumption)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ 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)))
+ .itemOutputs(eDynamo)
+ .fluidInputs(Materials.SolderingAlloy.getMolten(solderingAmount))
+ .duration((10 * (j + 1) * SECONDS))
+ .eut(recipeConsumption)
+ .addTo(assemblerRecipes);
+ }
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ ItemList.Hatch_Input_HV.get(64),
+ Materials.LiquidAir.getCells(1),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.compressedHatch.copy())
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Hatch_Output_HV.get(64), GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(ItemRegistry.giantOutputHatch.copy())
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Lead, 6),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1))
+ .itemOutputs(new ItemStack(GregTech_API.sBlockCasings3, 1, 12))
+ .fluidInputs(Materials.Concrete.getMolten(1296))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GregTech_API.sBlockCasings3, 1, 12),
+ GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Europium, 6),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Europium, 24))
+ .itemOutputs(new ItemStack(GregTech_API.sBlockCasings8, 1, 5))
+ .fluidInputs(Materials.Lead.getMolten(864))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_LuV)
+ .addTo(assemblerRecipes);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/AssemblyLine.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/AssemblyLine.java
new file mode 100644
index 0000000000..538195362a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/AssemblyLine.java
@@ -0,0 +1,85 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.enums.Mods.GalactiGreg;
+import static gregtech.api.util.GT_RecipeBuilder.HOURS;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeConstants.AssemblyLine;
+import static gregtech.api.util.GT_RecipeConstants.RESEARCH_ITEM;
+import static gregtech.api.util.GT_RecipeConstants.RESEARCH_TIME;
+
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class AssemblyLine implements Runnable {
+
+ @Override
+ public void run() {
+ Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
+ ? FluidRegistry.getFluid("molten.indalloy140")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+ GT_Values.RA.stdBuilder()
+ .metadata(RESEARCH_ITEM, ItemList.Pump_IV.get(1L))
+ .metadata(RESEARCH_TIME, 1 * HOURS)
+ .itemInputs(
+ 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))
+ .fluidInputs(
+ new FluidStack(solderIndalloy, 32 * 144),
+ Materials.Polytetrafluoroethylene.getMolten(32 * 144))
+ .itemOutputs(ItemRegistry.dehp)
+ .eut(TierEU.RECIPE_LuV)
+ .duration(4 * MINUTES + 10 * SECONDS)
+ .addTo(AssemblyLine);
+
+ if (GalactiGreg.isModLoaded()) {
+ GT_Values.RA.stdBuilder()
+ .metadata(RESEARCH_ITEM, ItemList.OreDrill4.get(1L))
+ .metadata(RESEARCH_TIME, 25 * MINUTES + 36 * SECONDS)
+ .itemInputs(
+ ItemList.OreDrill4.get(1L),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 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))
+ .fluidInputs(new FluidStack(solderIndalloy, 1440), WerkstoffLoader.Neon.getFluidOrGas(20000))
+ .itemOutputs(ItemRegistry.voidminer[0].copy())
+ .eut(TierEU.RECIPE_LuV)
+ .duration(5 * MINUTES)
+ .addTo(AssemblyLine);
+ }
+
+ GT_Values.RA.stdBuilder()
+ .metadata(RESEARCH_ITEM, ItemList.Machine_LuV_CircuitAssembler.get(1L))
+ .metadata(RESEARCH_TIME, 20 * MINUTES)
+ .itemInputs(
+ 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),
+ WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.plate, 8))
+ .fluidInputs(new FluidStack(solderIndalloy, 1440))
+ .itemOutputs(ItemRegistry.cal.copy())
+ .eut(TierEU.RECIPE_LuV)
+ .duration(20 * MINUTES)
+ .addTo(AssemblyLine);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Autoclave.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Autoclave.java
new file mode 100644
index 0000000000..1793877df3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Autoclave.java
@@ -0,0 +1,41 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.autoclaveRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+
+public class Autoclave implements Runnable {
+
+ @Override
+ public void run() {
+ Materials[] sterilizers = { Materials.Ammonia, Materials.Chlorine, Materials.Ethanol, Materials.Methanol };
+ for (Materials used : sterilizers) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Circuit_Parts_PetriDish.get(1L))
+ .itemOutputs(BioItemList.getPetriDish(null))
+ .fluidInputs(used.getGas(10L) != null ? used.getGas(8L) : used.getFluid(16L))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(autoclaveRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(Items.glass_bottle))
+ .itemOutputs(BioItemList.getDNASampleFlask(null))
+ .fluidInputs(used.getGas(10L) != null ? used.getGas(8L) : used.getFluid(16L))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(autoclaveRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Centrifuge.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Centrifuge.java
new file mode 100644
index 0000000000..e148376b01
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Centrifuge.java
@@ -0,0 +1,144 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.MATERIALS_PER_FUEL;
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.sHTGR_Fuel;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import java.util.Arrays;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+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.common.tileentities.multis.GT_TileEntity_HTGR;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR;
+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.enums.TierEU;
+import gregtech.api.util.GT_RecipeBuilder;
+import gregtech.api.util.GT_Utility;
+
+public class Centrifuge implements Runnable {
+
+ @Override
+ public void run() {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Thorium.getDust(1))
+ .itemOutputs(
+ Materials.Thorium.getDust(1),
+ Materials.Thorium.getDust(1),
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1),
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1),
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 1))
+ .outputChances(800, 375, 22, 22, 5)
+ .duration(8 * MINUTES + 20 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(centrifugeRecipes);
+
+ ItemStack[] pellets = new ItemStack[6];
+ Arrays.fill(pellets, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 64, 4));
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(pellets)
+ .duration(40 * MINUTES)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 5),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 64, 6))
+ .duration(40 * MINUTES)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 6))
+ .itemOutputs(Materials.Lead.getDust(1))
+ .outputChances(300)
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ int i = 0;
+ for (GT_TileEntity_HTGR.HTGRMaterials.Fuel_ fuel : sHTGR_Fuel) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(
+ 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))
+ .duration(10 * MINUTES)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 5),
+ GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 64, i + 6))
+ .duration(2 * MINUTES + 30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ GT_RecipeBuilder recipeBuilder = GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 6))
+ .itemOutputs(
+ fuel.recycledItems[0],
+ fuel.recycledItems[1],
+ fuel.recycledItems[2],
+ fuel.recycledItems[3],
+ fuel.recycledItems[4])
+ .outputChances(fuel.recycleChances);
+ if (fuel.recycledFluid != null) {
+ recipeBuilder.fluidOutputs(fuel.recycledFluid);
+ }
+ recipeBuilder.duration(1 * MINUTES)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ i += MATERIALS_PER_FUEL;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(BioItemList.getOther(4))
+ .fluidInputs(new FluidStack(BioCultureLoader.eColi.getFluid(), 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.BioLabFluidMaterials[1], 10))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(17))
+ .fluidInputs(new FluidStack(FluidLoader.BioLabFluidMaterials[1], 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.BioLabFluidMaterials[3], 250))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(17))
+ .fluidInputs(new FluidStack(BioCultureLoader.CommonYeast.getFluid(), 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.BioLabFluidMaterials[2], 10))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(centrifugeRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalBath.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalBath.java
new file mode 100644
index 0000000000..f1d9ddd236
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalBath.java
@@ -0,0 +1,84 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+
+public class ChemicalBath implements Runnable {
+
+ @Override
+ public void run() {
+
+ for (int i = 0; i < Dyes.dyeBrown.getSizeOfFluidList(); ++i) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 6))
+ .fluidInputs(Dyes.dyeRed.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 7))
+ .fluidInputs(Dyes.dyeGreen.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 8))
+ .fluidInputs(Dyes.dyePurple.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 9))
+ .fluidInputs(Dyes.dyeYellow.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 10))
+ .fluidInputs(Dyes.dyeLime.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 11))
+ .fluidInputs(Dyes.dyeBrown.getFluidDye(i, 36))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ }
+
+ for (int i = 6; i < 11; i++) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, i))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .fluidInputs(Materials.Chlorine.getGas(50))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(2)
+ .addTo(chemicalBathRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalReactor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalReactor.java
new file mode 100644
index 0000000000..87aaf91f71
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/ChemicalReactor.java
@@ -0,0 +1,29 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.UniversalChemical;
+
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_Utility;
+
+public class ChemicalReactor implements Runnable {
+
+ @Override
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(10))
+ .fluidInputs(new FluidStack(FluidLoader.heatedfulvicAcid, 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.Kerogen, 1000))
+ .duration(3 * SECONDS + 15 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(UniversalChemical);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/CraftingRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/CraftingRecipes.java
new file mode 100644
index 0000000000..17a5d5b025
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/CraftingRecipes.java
@@ -0,0 +1,462 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.enums.Mods.IndustrialCraft2;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.oredict.OreDictionary;
+
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.common.loaders.RecipeLoader;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_LESU;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ManualTrafo;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_Windmill;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_BioLab;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import ic2.core.Ic2Items;
+
+public class CraftingRecipes implements Runnable {
+
+ @Override
+ public void run() {
+
+ 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
+ };
+
+ 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
+ };
+
+ 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) };
+
+ GT_ModHandler.addCraftingRecipe(
+ new GT_TileEntity_LESU(ConfigHandler.IDOffset, "LESU", "L.E.S.U.").getStackForm(1L),
+ RecipeLoader.BITSD,
+ new Object[] { "CDC", "SBS", "CFC", 'C', "circuitAdvanced", 'D', ItemList.Cover_Screen.get(1L), 'S',
+ GT_OreDictUnificator.get(OrePrefixes.cableGt12, Materials.Platinum, 1L), 'B',
+ new ItemStack(ItemRegistry.BW_BLOCKS[1]), 'F', ItemList.Field_Generator_HV.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(OrePrefixes.plateDouble, 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(OrePrefixes.plateDouble, Materials.Steel, 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_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) });
+
+ if (ConfigHandler.teslastaff) {
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.TESLASTAFF),
+ RecipeLoader.BITSD,
+ new Object[] { "BO ", "OP ", " P", 'O',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUHV, 1L), 'B',
+ ItemList.Energy_LapotronicOrb.get(1L), 'P', "plateAlloyIridium", });
+ }
+
+ 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) });
+ 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) });
+ 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 });
+
+ 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), });
+
+ 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.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 {
+ Materials cable = cables[i];
+ ItemStack hull = hulls[i] instanceof Materials
+ ? GT_OreDictUnificator.get(OrePrefixes.plate, hulls[i], 1L)
+ : ((Werkstoff) hulls[i]).get(OrePrefixes.plate);
+ 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', OrePrefixes.componentCircuit.get(Materials.Diode), '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', OrePrefixes.componentCircuit.get(Materials.Diode), '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', OrePrefixes.componentCircuit.get(Materials.Diode), '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', OrePrefixes.componentCircuit.get(Materials.Diode), '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', OrePrefixes.componentCircuit.get(Materials.Inductor), 'D',
+ OrePrefixes.componentCircuit.get(Materials.Diode), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), 'P', hull, 'C', machinehull });
+
+ } catch (ArrayIndexOutOfBoundsException ignored) {
+
+ }
+
+ }
+
+ 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), });
+ 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), });
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ 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, });
+ }
+ 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), });
+ }
+
+ GT_ModHandler.addCraftingRecipe(
+ 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" });
+
+ 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),
+ 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), });
+
+ 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), });
+ 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", });
+ 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", });
+ 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", });
+
+ 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", });
+
+ 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", });
+
+ 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", });
+
+ 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", });
+
+ 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", });
+
+ 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), });
+ 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), });
+ 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), });
+ 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), });
+
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.THTR,
+ RecipeLoader.BITSD,
+ new Object[] { "BZB", "BRB", "BZB", 'B', new ItemStack(GregTech_API.sBlockCasings3, 1, 12), 'R',
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "blockGenerator", 1, 5), 'Z', "circuitUltimate" });
+
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.HTGR,
+ RecipeLoader.BITSD,
+ new Object[] { "BZB", "BRB", "BZB", 'B', new ItemStack(GregTech_API.sBlockCasings8, 1, 5), 'R',
+ GT_ModHandler.getModItem(IndustrialCraft2.ID, "blockGenerator", 1, 5), 'Z', "circuitSuperconductor" });
+
+ // 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) });
+
+ // 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) });
+
+ // 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), });
+ // 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',
+ WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.plate, 1), });
+
+ // 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',
+ WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.plate, 1), });
+
+ GT_ModHandler.addCraftingRecipe(
+ new GT_TileEntity_BioVat(
+ 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) });
+
+ ItemStack[] Pistons2 = { 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[] BioLab2 = new ItemStack[GT_Values.VN.length - 3];
+ ItemStack[] RadioHatch2 = new ItemStack[GT_Values.VN.length - 3];
+ Materials[] cables2 = { Materials.Gold, Materials.Aluminium, Materials.Tungsten, Materials.VanadiumGallium,
+ Materials.Naquadah, Materials.NaquadahAlloy, Materials.SuperconductorUHV };
+ Materials[] hulls2 = { Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, Materials.Chrome,
+ Materials.Iridium, Materials.Osmium, Materials.Naquadah };
+ Materials[] wireMat2 = { Materials.Kanthal, Materials.Nichrome, Materials.TungstenSteel, Materials.Naquadah,
+ Materials.NaquadahAlloy, Materials.SuperconductorUHV };
+ Materials[] circuits2 = { Materials.Advanced, Materials.Data, Materials.Elite, Materials.Master,
+ Materials.Ultimate, Materials.SuperconductorUHV };
+
+ for (int i = 3; i < GT_Values.VN.length - 1; i++) {
+ // 12625
+ BioLab2[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);
+ RadioHatch2[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);
+ try {
+ ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L);
+ GT_ModHandler.addCraftingRecipe(
+ BioLab2[i - 3],
+ RecipeLoader.BITSD,
+ new Object[] { "PFP", "WCW", "OGO", 'F',
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, hulls2[i - 3], 1L), 'W',
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, wireMat2[i - 3], 1L), 'P',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1L), 'O',
+ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polystyrene, 1L), 'G',
+ "circuit" + circuits2[i - 3], 'C', machinehull });
+ GT_ModHandler.addCraftingRecipe(
+ RadioHatch2[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, cables2[i - 3], 1L), 'P', Pistons2[i - 3] });
+ } catch (ArrayIndexOutOfBoundsException ignored) {
+
+ }
+ }
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Electrolyzer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Electrolyzer.java
new file mode 100644
index 0000000000..9502d4eff3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Electrolyzer.java
@@ -0,0 +1,152 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.electrolyzerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class Electrolyzer implements Runnable {
+
+ // TODO: fix the chemical balance issues there are below
+ @Override
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Forsterit.get(OrePrefixes.dust, 7))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(10 * SECONDS)
+ .eut(90)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.RedZircon.get(OrePrefixes.dust, 6))
+ .itemOutputs(
+ WerkstoffLoader.Zirconium.get(OrePrefixes.dust, 1),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(90)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Fayalit.get(OrePrefixes.dust, 7))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(16 * SECONDS)
+ .eut(90)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Prasiolite.get(OrePrefixes.dust, 16))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 5L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L))
+ .duration(29 * SECONDS)
+ .eut(90)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Hedenbergit.get(OrePrefixes.dust, 10))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 2L))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(15 * SECONDS)
+ .eut(90)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.FuchsitAL.get(OrePrefixes.dust, 21), ItemList.Cell_Empty.get(2))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(19 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.FuchsitCR.get(OrePrefixes.dust, 21), ItemList.Cell_Empty.get(2))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2))
+ .fluidOutputs(Materials.Oxygen.getGas(2000L))
+ .duration(23 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.VanadioOxyDravit.get(OrePrefixes.dust, 53), ItemList.Cell_Empty.get(3))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnalium, 6L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 6),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 3),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 3))
+ .fluidOutputs(Materials.Oxygen.getGas(19000L))
+ .duration(35 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.ChromoAluminoPovondrait.get(OrePrefixes.dust, 53), ItemList.Cell_Empty.get(3))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnalium, 6L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 6),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 3),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 3))
+ .fluidOutputs(Materials.Oxygen.getGas(19000L))
+ .duration(36 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.FluorBuergerit.get(OrePrefixes.dust, 50), ItemList.Cell_Empty.get(3))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 6L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 6),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 3),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fluorine, 3))
+ .fluidOutputs(Materials.Oxygen.getGas(6000L))
+ .duration(36 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Olenit.get(OrePrefixes.dust, 51), ItemList.Cell_Empty.get(1))
+ .itemOutputs(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 9L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 6L),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 3),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1))
+ .fluidOutputs(Materials.Oxygen.getGas(1000L))
+ .duration(39 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(electrolyzerRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Extractor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Extractor.java
new file mode 100644
index 0000000000..9b304de837
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Extractor.java
@@ -0,0 +1,45 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.enums.Mods.CropLoadCore;
+import static gregtech.api.recipe.RecipeMaps.extractorRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.TierEU;
+
+public class Extractor implements Runnable {
+
+ @Override
+ public void run() {
+ List<ItemStack> oreCropVine = OreDictionary.getOres("cropVine", false);
+ if (CropLoadCore.isModLoaded() && !oreCropVine.isEmpty()) {
+ for (ItemStack stack : oreCropVine) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(BW_Util.setStackSize(stack, 12))
+ .itemOutputs(BioItemList.getOther(1))
+ .duration(25 * SECONDS)
+ .eut((int) TierEU.RECIPE_HV)
+ .addTo(extractorRecipes);
+
+ }
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Circuit_Chip_Stemcell.get(1L))
+ .itemOutputs(BioItemList.getOther(4))
+ .duration(25 * SECONDS)
+ .eut((int) TierEU.RECIPE_LuV)
+ .addTo(extractorRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FakeRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FakeRecipes.java
new file mode 100644
index 0000000000..1df03d10f2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FakeRecipes.java
@@ -0,0 +1,11 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR;
+
+public class FakeRecipes implements Runnable {
+
+ @Override
+ public void run() {
+ GT_TileEntity_HTGR.HTGRMaterials.register_fake_THR_Recipes();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidHeater.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidHeater.java
new file mode 100644
index 0000000000..3d27c55038
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidHeater.java
@@ -0,0 +1,27 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.fluidHeaterRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_Utility;
+
+public class FluidHeater implements Runnable {
+
+ @Override
+ public void run() {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(10))
+ .fluidInputs(new FluidStack(FluidLoader.fulvicAcid, 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.heatedfulvicAcid, 1000))
+ .duration(4 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(fluidHeaterRecipes);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidSolidifier.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidSolidifier.java
new file mode 100644
index 0000000000..4991370f44
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FluidSolidifier.java
@@ -0,0 +1,103 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.MaterialsUEVplus;
+import gregtech.api.enums.TierEU;
+
+public class FluidSolidifier implements Runnable {
+
+ @Override
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(Blocks.lapis_block))
+ .itemOutputs(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0))
+ .fluidInputs(Materials.Iron.getMolten(1296L))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 1))
+ .fluidInputs(Materials.Titanium.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 2))
+ .fluidInputs(Materials.TungstenSteel.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 3))
+ .fluidInputs(WerkstoffLoader.LuVTierMaterial.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 4))
+ .fluidInputs(Materials.Iridium.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_LuV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 5))
+ .fluidInputs(Materials.Osmium.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_ZPM)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 13))
+ .fluidInputs(Materials.Neutronium.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 14))
+ .fluidInputs(Materials.CosmicNeutronium.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UHV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 15))
+ .fluidInputs(Materials.Infinity.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UEV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 0))
+ .itemOutputs(new ItemStack(ItemRegistry.bw_glasses[1], 1, 0))
+ .fluidInputs(MaterialsUEVplus.TranscendentMetal.getMolten(1152))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UIV)
+ .addTo(fluidSolidifierRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FormingPress.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FormingPress.java
new file mode 100644
index 0000000000..bdeb24af9e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/FormingPress.java
@@ -0,0 +1,77 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.MATERIALS_PER_FUEL;
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.sHTGR_Fuel;
+import static gregtech.api.recipe.RecipeMaps.formingPressRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+
+public class FormingPress implements Runnable {
+
+ @Override
+ public void run() {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials), Materials.Graphite.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 1))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 1),
+ Materials.Silicon.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 2))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 2),
+ Materials.Graphite.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ int i = 0;
+ for (GT_TileEntity_HTGR.HTGRMaterials.Fuel_ fuel : sHTGR_Fuel) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i),
+ Materials.Carbon.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 1))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 1),
+ Materials.Silicon.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 2))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 2),
+ Materials.Graphite.getDust(64))
+ .itemOutputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i + 3))
+ .duration(2 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+ i += MATERIALS_PER_FUEL;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/LaserEngraver.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/LaserEngraver.java
new file mode 100644
index 0000000000..59c84d0f7c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/LaserEngraver.java
@@ -0,0 +1,28 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.laserEngraverRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_Utility;
+
+public class LaserEngraver implements Runnable {
+
+ @Override
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(Items.emerald), GT_Utility.getIntegratedCircuit(17))
+ .itemOutputs(BioItemList.getPlasmidCell(null))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(laserEngraverRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Mixer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Mixer.java
new file mode 100644
index 0000000000..d69b4278ef
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Mixer.java
@@ -0,0 +1,65 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.MATERIALS_PER_FUEL;
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR.HTGRMaterials.sHTGR_Fuel;
+import static gregtech.api.enums.Mods.Gendustry;
+import static gregtech.api.recipe.RecipeMaps.mixerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_HTGR;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_THTR;
+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.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+
+public class Mixer implements Runnable {
+
+ @Override
+ public void run() {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ WerkstoffLoader.Thorium232.get(OrePrefixes.dust, 10),
+ Materials.Uranium235.getDust(1),
+ GT_Utility.getIntegratedCircuit(2))
+ .itemOutputs(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials))
+ .duration(20 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ int i = 0;
+ for (GT_TileEntity_HTGR.HTGRMaterials.Fuel_ fuel : sHTGR_Fuel) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(fuel.mainItem, fuel.secondaryItem, GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(new ItemStack(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, 1, i))
+ .duration(20 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ i += MATERIALS_PER_FUEL;
+ }
+
+ if (Gendustry.isModLoaded()) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_Utility.getIntegratedCircuit(17),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidInputs(FluidRegistry.getFluidStack("liquiddna", 1000))
+ .fluidOutputs(new FluidStack(FluidLoader.BioLabFluidMaterials[0], 2000))
+ .duration(25 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(mixerRecipes);
+ }
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Pulverizer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Pulverizer.java
new file mode 100644
index 0000000000..4dbcc45708
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/Pulverizer.java
@@ -0,0 +1,98 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.MaterialsUEVplus;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+
+public class Pulverizer implements Runnable {
+
+ @Override
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 1))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.Titanium.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 2))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.TungstenSteel.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 3))
+ .itemOutputs(
+ Materials.BorosilicateGlass.getDust(9),
+ WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.dust, 8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_LuV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 4))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.Iridium.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_ZPM)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 5))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.Osmium.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 13))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.Neutronium.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UHV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 14))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.CosmicNeutronium.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UEV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, 15))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), Materials.Infinity.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UIV)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[1], 1, 0))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9), MaterialsUEVplus.TranscendentMetal.getDust(8))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UMV)
+ .addTo(maceratorRecipes);
+
+ for (int i = 6; i < 11; i++) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(ItemRegistry.bw_glasses[0], 1, i))
+ .itemOutputs(Materials.BorosilicateGlass.getDust(9))
+ .duration(20 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(maceratorRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/PyrolyseOven.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/PyrolyseOven.java
new file mode 100644
index 0000000000..c810c323d9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/recipes/PyrolyseOven.java
@@ -0,0 +1,24 @@
+package com.github.bartimaeusnek.bartworks.common.loaders.recipes;
+
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+
+public class PyrolyseOven implements Runnable {
+
+ @Override
+ public void run() {
+ GT_Values.RA.addPyrolyseRecipe(
+ Materials.Wood.getDust(10),
+ new FluidStack(FluidLoader.Kerogen, 1000),
+ 10,
+ null,
+ Materials.Oil.getFluid(1000),
+ 105,
+ (int) TierEU.RECIPE_HV);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java
new file mode 100644
index 0000000000..b5e002ef29
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import cpw.mods.fml.common.network.internal.FMLProxyPacket;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.server.FMLServerHandler;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.net.GT_Packet;
+import gregtech.api.net.GT_Packet_New;
+import gregtech.api.net.IGT_NetworkHandler;
+import io.netty.buffer.Unpooled;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.SimpleChannelInboundHandler;
+import io.netty.handler.codec.MessageToMessageCodec;
+
+/*
+ * Original GT File slightly Modified
+ */
+@SuppressWarnings("deprecation")
+@ChannelHandler.Sharable
+public class BW_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet_New> implements IGT_NetworkHandler {
+
+ private final EnumMap<Side, FMLEmbeddedChannel> mChannel;
+ private final GT_Packet_New[] mSubChannels;
+
+ public BW_Network() {
+ this.mChannel = NetworkRegistry.INSTANCE.newChannel("BartWorks", this, new BW_Network.HandlerShared());
+ this.mSubChannels = new GT_Packet_New[] { new RendererPacket(), new CircuitProgrammerPacket(),
+ new MetaBlockPacket(), new OreDictCachePacket(), new ServerJoinedPackage(), new EICPacket() };
+ }
+
+ @Override
+ protected void encode(ChannelHandlerContext aContext, GT_Packet_New aPacket, List<Object> aOutput)
+ throws Exception {
+ aOutput.add(
+ new FMLProxyPacket(
+ Unpooled.buffer()
+ .writeByte(aPacket.getPacketID())
+ .writeBytes(aPacket.encode())
+ .copy(),
+ aContext.channel()
+ .attr(NetworkRegistry.FML_CHANNEL)
+ .get()));
+ }
+
+ @Override
+ protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput)
+ throws Exception {
+ ByteArrayDataInput aData = ByteStreams.newDataInput(
+ aPacket.payload()
+ .array());
+ aOutput.add(this.mSubChannels[aData.readByte()].decode(aData));
+ }
+
+ @Override
+ public void sendToPlayer(@Nonnull GT_Packet aPacket, @Nonnull EntityPlayerMP aPlayer) {
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.PLAYER);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ .set(aPlayer);
+ this.mChannel.get(Side.SERVER)
+ .writeAndFlush(aPacket);
+ }
+
+ public void sendToAllPlayersinWorld(@Nonnull GT_Packet aPacket, World world) {
+ for (String name : FMLServerHandler.instance()
+ .getServer()
+ .getAllUsernames()) {
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.PLAYER);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ .set(world.getPlayerEntityByName(name));
+ this.mChannel.get(Side.SERVER)
+ .writeAndFlush(aPacket);
+ }
+ }
+
+ @Override
+ public void sendToAllAround(@Nonnull GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) {
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ .set(aPosition);
+ this.mChannel.get(Side.SERVER)
+ .writeAndFlush(aPacket);
+ }
+
+ @Override
+ public void sendToServer(@Nonnull GT_Packet aPacket) {
+ this.mChannel.get(Side.CLIENT)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.TOSERVER);
+ this.mChannel.get(Side.CLIENT)
+ .writeAndFlush(aPacket);
+ }
+
+ @Override
+ public void sendPacketToAllPlayersInRange(World aWorld, @Nonnull GT_Packet aPacket, int aX, int aZ) {
+ if (!aWorld.isRemote) {
+
+ for (Object tObject : aWorld.playerEntities) {
+ if (!(tObject instanceof EntityPlayerMP tPlayer)) {
+ break;
+ }
+
+ Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ);
+ if (tPlayer.getServerForPlayer()
+ .getPlayerManager()
+ .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
+ this.sendToPlayer(aPacket, tPlayer);
+ }
+ }
+ }
+ }
+
+ @Sharable
+ static final class HandlerShared extends SimpleChannelInboundHandler<GT_Packet_New> {
+
+ HandlerShared() {}
+
+ @Override
+ protected void channelRead0(ChannelHandlerContext ctx, GT_Packet_New aPacket) throws Exception {
+ EntityPlayer aPlayer = GT_Values.GT.getThePlayer();
+ aPacket.process(aPlayer == null ? null : GT_Values.GT.getThePlayer().worldObj);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java
new file mode 100644
index 0000000000..c47b834157
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+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_New;
+import io.netty.buffer.ByteBuf;
+
+public class CircuitProgrammerPacket extends GT_Packet_New {
+
+ private int dimID, playerID;
+ private byte chipCfg;
+ private boolean hasChip;
+
+ public CircuitProgrammerPacket() {
+ super(true);
+ }
+
+ public CircuitProgrammerPacket(int dimID, int playerID, boolean hasChip, byte chipCfg) {
+ super(false);
+ this.dimID = dimID;
+ this.playerID = playerID;
+ this.hasChip = hasChip;
+ this.chipCfg = chipCfg;
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 1;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ aOut.writeInt(this.dimID)
+ .writeInt(this.playerID)
+ .writeByte(this.hasChip ? this.chipCfg : -1);
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput byteArrayDataInput) {
+ return new CircuitProgrammerPacket(
+ byteArrayDataInput.readInt(),
+ byteArrayDataInput.readInt(),
+ byteArrayDataInput.readByte() > -1,
+ byteArrayDataInput.readByte());
+ }
+
+ @Override
+ public void process(IBlockAccess iBlockAccess) {
+ World w = DimensionManager.getWorld(this.dimID);
+ if (w != null && w.getEntityByID(this.playerID) instanceof EntityPlayer) {
+ ItemStack stack = ((EntityPlayer) w.getEntityByID(this.playerID)).getHeldItem();
+ if (stack != null && stack.stackSize > 0) {
+ Item item = stack.getItem();
+ if (item instanceof Circuit_Programmer) {
+ NBTTagCompound nbt = stack.getTagCompound();
+ 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);
+ }
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java
new file mode 100644
index 0000000000..621cc3fe4f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/EICPacket.java
@@ -0,0 +1,60 @@
+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;
+
+public class EICPacket extends GT_Packet_New {
+
+ private Coords coords;
+ private boolean bool;
+
+ public EICPacket() {
+ super(true);
+ }
+
+ public EICPacket(Coords coords, boolean bool) {
+ super(false);
+ this.coords = coords;
+ this.bool = bool;
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 5;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ aOut.writeInt(this.coords.x);
+ aOut.writeInt(this.coords.y);
+ aOut.writeInt(this.coords.z);
+ aOut.writeBoolean(this.bool);
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput aData) {
+ return new EICPacket(new Coords(aData.readInt(), aData.readInt(), aData.readInt()), aData.readBoolean());
+ }
+
+ @Override
+ public void process(IBlockAccess aWorld) {
+ if (SideReference.Side.Client) {
+ TileEntity te = aWorld.getTileEntity(this.coords.x, this.coords.y, this.coords.z);
+ if (!(te instanceof IGregTechTileEntity)) return;
+ IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity();
+ if (!(mte instanceof GT_TileEntity_ElectricImplosionCompressor)) return;
+ if (this.bool && !((IGregTechTileEntity) te).hasMufflerUpgrade())
+ ((IGregTechTileEntity) te).addMufflerUpgrade();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java
new file mode 100644
index 0000000000..6b555014ed
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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_New;
+import io.netty.buffer.ByteBuf;
+
+public class MetaBlockPacket extends GT_Packet_New {
+
+ int x;
+ short y;
+ int z;
+ short meta;
+
+ public MetaBlockPacket(int x, int y, int z, int meta) {
+ super(false);
+ this.x = x;
+ this.y = (short) y;
+ this.z = z;
+ this.meta = (short) meta;
+ }
+
+ public MetaBlockPacket() {
+ super(true);
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 2;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ int hash = MurmurHash3.murmurhash3_x86_32(
+ ByteBuffer.allocate(12)
+ .putInt(this.x)
+ .putInt(this.z)
+ .putShort(this.y)
+ .putShort(this.meta)
+ .array(),
+ 0,
+ 12,
+ 31);
+ aOut.writeInt(this.x)
+ .writeInt(this.z)
+ .writeShort(this.y)
+ .writeShort(this.meta)
+ .writeInt(hash);
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput byteArrayDataInput) {
+ this.x = byteArrayDataInput.readInt();
+ this.z = byteArrayDataInput.readInt();
+ this.y = byteArrayDataInput.readShort();
+ this.meta = byteArrayDataInput.readShort();
+ MetaBlockPacket todecode = new MetaBlockPacket(this.x, this.y, this.z, this.meta);
+ if (byteArrayDataInput.readInt() != 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;
+ }
+ return todecode;
+ }
+
+ @Override
+ public void process(IBlockAccess iBlockAccess) {
+ if (iBlockAccess != null) {
+ TileEntity tTileEntity = iBlockAccess.getTileEntity(this.x, this.y, this.z);
+ if (tTileEntity instanceof BW_MetaGenerated_Block_TE) {
+ ((BW_MetaGenerated_Block_TE) tTileEntity).mMetaData = this.meta;
+ }
+ if (iBlockAccess instanceof World && ((World) iBlockAccess).isRemote) {
+ ((World) iBlockAccess).markBlockForUpdate(this.x, this.y, this.z);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java
new file mode 100644
index 0000000000..c488273d73
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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_New;
+import io.netty.buffer.ByteBuf;
+
+public class OreDictCachePacket extends GT_Packet_New {
+
+ private HashSet<Pair<Integer, Short>> hashSet = new HashSet<>();
+
+ public OreDictCachePacket() {
+ super(true);
+ }
+
+ public OreDictCachePacket(HashSet<Pair<Integer, Short>> set) {
+ super(false);
+ this.hashSet = set;
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 3;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ int size = this.hashSet.size();
+ aOut.writeInt(size);
+ for (Pair<Integer, Short> p : this.hashSet) {
+ aOut.writeInt(p.getKey())
+ .writeShort(p.getValue());
+ }
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput byteArrayDataInput) {
+ int size = byteArrayDataInput.readInt();
+ for (int i = 0; i < size; i++) {
+ this.hashSet.add(new Pair<>(byteArrayDataInput.readInt(), byteArrayDataInput.readShort()));
+ }
+ return new OreDictCachePacket(this.hashSet);
+ }
+
+ @Override
+ public void process(IBlockAccess iBlockAccess) {
+ OreDictHandler.getNonBWCache()
+ .clear();
+ OreDictHandler.getNonBWCache()
+ .addAll(this.hashSet);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java
new file mode 100644
index 0000000000..436413fa14
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/RendererPacket.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.API.SideReference;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
+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_New;
+import io.netty.buffer.ByteBuf;
+
+public class RendererPacket extends GT_Packet_New {
+
+ private Coords coords;
+ private int integer;
+ private byte removal;
+
+ public RendererPacket() {
+ super(true);
+ }
+
+ public RendererPacket(Coords coords, int integer, boolean removal) {
+ super(false);
+ this.coords = coords;
+ this.integer = integer;
+ this.removal = (byte) (removal ? 1 : 0);
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 0;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ byte r = (byte) (this.integer >> 16 & 0xFF);
+ byte g = (byte) (this.integer >> 8 & 0xFF);
+ byte b = (byte) (this.integer & 0xFF);
+ byte checksum = (byte) (this.coords.x % 25 + this.coords.y % 25
+ + this.coords.z % 25
+ + this.coords.wID % 25
+ + this.integer % 25
+ + this.removal);
+ aOut.writeInt(this.coords.x)
+ .writeShort(this.coords.y)
+ .writeInt(this.coords.z)
+ .writeInt(this.coords.wID)
+ .writeByte(r)
+ .writeByte(g)
+ .writeByte(b)
+ .writeByte(this.removal)
+ .writeByte(checksum);
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput dataInput) {
+ this.coords = new Coords(dataInput.readInt(), dataInput.readShort(), dataInput.readInt(), dataInput.readInt());
+ this.integer = BW_ColorUtil
+ .getColorFromRGBArray(new int[] { dataInput.readByte(), dataInput.readByte(), dataInput.readByte() });
+ this.removal = dataInput.readByte();
+
+ byte checksum = (byte) (this.coords.x % 25 + this.coords.y % 25
+ + this.coords.z % 25
+ + this.coords.wID % 25
+ + this.integer % 25
+ + this.removal);
+
+ if (checksum != dataInput.readByte()) {
+ MainMod.LOGGER.error("BW Packet was corrupted or modified!");
+ return null;
+ }
+
+ return new RendererPacket(this.coords, this.integer, this.removal == 1);
+ }
+
+ @Override
+ public void process(IBlockAccess iBlockAccess) {
+ if (SideReference.Side.Client) {
+ if (this.removal == 0) GT_TileEntity_BioVat.staticColorMap.put(this.coords, this.integer);
+ else GT_TileEntity_BioVat.staticColorMap.remove(this.coords);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java
new file mode 100644
index 0000000000..091802683d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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_New;
+import io.netty.buffer.ByteBuf;
+
+public class ServerJoinedPackage extends GT_Packet_New {
+
+ private byte config;
+
+ ServerJoinedPackage() {
+ super(true);
+ }
+
+ public ServerJoinedPackage(Object obj) {
+ super(false);
+ this.config = (byte) (ConfigHandler.classicMode && ConfigHandler.disableExtraGassesForEBF ? 3
+ : ConfigHandler.classicMode ? 2 : ConfigHandler.disableExtraGassesForEBF ? 1 : 0);
+ }
+
+ @Override
+ public byte getPacketID() {
+ return 4;
+ }
+
+ @Override
+ public void encode(ByteBuf aOut) {
+ aOut.writeByte(this.config);
+ }
+
+ @Override
+ public GT_Packet_New decode(ByteArrayDataInput byteArrayDataInput) {
+ this.config = byteArrayDataInput.readByte();
+ return this;
+ }
+
+ @Override
+ public void process(IBlockAccess iBlockAccess) {
+ boolean gas = (this.config & 1) != 0;
+ boolean classic = (this.config & 0b10) != 0;
+ MainMod.runOnPlayerJoined(classic, gas);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java
new file mode 100644
index 0000000000..bb0c0cf319
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.tileentities.classic;
+
+import net.minecraft.tileentity.TileEntity;
+
+public class BWTileEntityDimIDBridge extends TileEntity {
+
+ @Override
+ public boolean canUpdate() {
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java
new file mode 100644
index 0000000000..5db8989d0c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java
@@ -0,0 +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.
+ */
+
+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;
+
+public class BW_RotorBlock extends TileEntityWindKineticGenerator {
+
+ public int getGrindPower() {
+ return super.getKuOutput();
+ }
+
+ @Override
+ public int getKuOutput() {
+ return 0;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin) {
+ return new BW_GUIContainer_RotorBlock(new ContainerWindKineticGenerator(entityPlayer, this));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java
new file mode 100644
index 0000000000..79bedfa1b8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.DOWN;
+import static net.minecraftforge.common.util.ForgeDirection.EAST;
+import static net.minecraftforge.common.util.ForgeDirection.NORTH;
+import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
+import static net.minecraftforge.common.util.ForgeDirection.WEST;
+
+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 = { DOWN, WEST, EAST, SOUTH, NORTH };
+ private PriorityQueue<Coords> breadthFirstQueue = new PriorityQueue<>(Comparator.comparingInt(x -> x.y));
+ private boolean wasInited = false;
+
+ public BW_TileEntity_ExperimentalFloodGate() {
+ this.tank.setCapacity(64000);
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection from, Fluid fluid) {
+ return fluid.canBePlacedInWorld();
+ }
+
+ public void initEntity() {
+ if (this.wasInited) return;
+ this.breadthFirstQueue.add(new Coords(this.xCoord, this.yCoord, this.zCoord));
+ this.wasInited = true;
+ }
+
+ @Override
+ public void updateEntity() {
+ this.initEntity();
+ Coords current = this.breadthFirstQueue.poll();
+ if (current == null) return;
+ this.setFluidBlock(current);
+ for (ForgeDirection allowed_direction : allowed_directions) {
+ this.addBlockToQueue(current, allowed_direction);
+ }
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound tag) {
+ super.writeToNBT(tag);
+ tag.setBoolean("init", this.wasInited);
+
+ int[] x = new int[this.breadthFirstQueue.size()];
+ int[] y = new int[this.breadthFirstQueue.size()];
+ int[] z = new int[this.breadthFirstQueue.size()];
+ Coords[] arr = this.breadthFirstQueue.toArray(new Coords[0]);
+
+ for (int i = 0; i < this.breadthFirstQueue.size(); i++) {
+ x[i] = arr[i].x;
+ y[i] = arr[i].y;
+ z[i] = arr[i].z;
+ }
+
+ tag.setIntArray("queueX", x);
+ tag.setIntArray("queueY", y);
+ tag.setIntArray("queueZ", z);
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound tag) {
+ super.readFromNBT(tag);
+ this.wasInited = tag.getBoolean("init");
+ int[] x = tag.getIntArray("queueX");
+ int[] y = tag.getIntArray("queueY");
+ int[] z = tag.getIntArray("queueZ");
+ for (int i = 0; i < x.length; i++) {
+ this.breadthFirstQueue.add(new Coords(x[i], y[i], z[i]));
+ }
+ }
+
+ private void setFluidBlock(Coords current) {
+ if (!this.checkForAir(current) || this.tank.drain(1000, false) == null
+ || this.tank.drain(1000, false).amount != 1000) return;
+ FluidStack stack = this.tank.drain(1000, true);
+ this.worldObj.setBlock(
+ current.x,
+ current.y,
+ current.z,
+ stack.getFluid()
+ .getBlock(),
+ 0,
+ 2);
+ }
+
+ private void addBlockToQueue(Coords current, ForgeDirection allowed_direction) {
+ Coords side = current.getCoordsFromSide(allowed_direction);
+ if (this.checkForAir(side)) this.breadthFirstQueue.add(side);
+ }
+
+ private boolean checkForAir(Coords coords) {
+ return this.worldObj.isAirBlock(coords.x, coords.y, coords.z);
+ }
+
+ @Override
+ public String[] getInfoData() {
+ return new String[] { "Experimental Machine to fill Holes with Fluids" };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
new file mode 100644
index 0000000000..faccfc4738
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
@@ -0,0 +1,374 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Fluid;
+import net.minecraftforge.fluids.FluidEvent;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+import net.minecraftforge.fluids.IFluidTank;
+
+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.API.modularUI.BW_UITextures;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.api.forge.InvWrapper;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+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;
+
+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;
+ public ItemStack fuelstack;
+ public FluidStack outputstack = new FluidStack(FluidRegistry.WATER, 0);
+ public int fuel;
+ public byte tick;
+ public int maxfuel;
+ public ItemStack fakestack = new ItemStack(Blocks.water);
+
+ @Override
+ public void writeToNBT(NBTTagCompound compound) {
+ NBTTagCompound subItemStack = new NBTTagCompound();
+ if (this.fuelstack != null) {
+ this.fuelstack.writeToNBT(subItemStack);
+ }
+ compound.setTag("ItemStack", subItemStack);
+ NBTTagCompound subFluidStack = new NBTTagCompound();
+ this.outputstack.writeToNBT(subFluidStack);
+ compound.setTag("FluidStack", subFluidStack);
+ compound.setInteger("fuel", this.fuel);
+ compound.setInteger("maxfuel", this.maxfuel);
+ compound.setByte("tick", this.tick);
+ super.writeToNBT(compound);
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound compound) {
+ this.tick = compound.getByte("tick");
+ this.fuel = compound.getInteger("fuel");
+ this.maxfuel = compound.getInteger("maxfuel");
+ this.outputstack = FluidStack.loadFluidStackFromNBT(compound.getCompoundTag("FluidStack"));
+ if (!compound.getCompoundTag("ItemStack")
+ .equals(new NBTTagCompound()))
+ this.fuelstack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("ItemStack"));
+ super.readFromNBT(compound);
+ }
+
+ private boolean checkPreUpdate() {
+ return (this.fuelstack == null || this.fuelstack.stackSize <= 0) && this.fuel <= 0;
+ }
+
+ private void fixUnderlflow() {
+ if (this.fuel < 0) this.fuel = 0;
+ }
+
+ private void handleRefuel() {
+ if (this.fuelstack != null && this.fuel == 0) {
+ this.fuel = this.maxfuel = TileEntityFurnace.getItemBurnTime(this.fuelstack);
+ --this.fuelstack.stackSize;
+ if (this.fuelstack.stackSize <= 0) this.fuelstack = null;
+ }
+ }
+
+ private void handleWaterGeneration() {
+ if (this.fuel > 0) {
+ ++this.tick;
+ --this.fuel;
+ if (this.tick % 20 == 0) {
+ if (this.outputstack.amount <= 8000 - ConfigHandler.mbWaterperSec)
+ this.outputstack.amount += ConfigHandler.mbWaterperSec;
+ this.tick = 0;
+ }
+ }
+ }
+
+ @Override
+ public void updateEntity() {
+ if (this.worldObj.isRemote) return;
+
+ this.pushWaterToAdjacentTiles();
+ this.fakestack.setStackDisplayName(this.outputstack.amount + "L Water");
+ if (this.checkPreUpdate()) return;
+
+ this.fixUnderlflow();
+ this.handleRefuel();
+ this.handleWaterGeneration();
+ this.causePollution();
+ }
+
+ 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 tank) {
+ if (tank.canFill(direction.getOpposite(), this.outputstack.getFluid())) {
+ int drainage = tank.fill(direction.getOpposite(), this.outputstack, false);
+ if (drainage > 0) {
+ tank.fill(direction.getOpposite(), this.outputstack, true);
+ this.drain(drainage, true);
+ }
+ }
+ } else if (te instanceof IFluidTank tank) {
+ int drainage = tank.fill(this.outputstack, false);
+ if (drainage > 0) {
+ tank.fill(this.outputstack, true);
+ this.drain(drainage, true);
+ }
+ }
+ }));
+ }
+
+ private void causePollution() {
+ Optional.ofNullable(this.worldObj)
+ .ifPresent(e -> {
+ if (e.getTotalWorldTime() % 20 == 0) {
+ Optional.ofNullable(e.getChunkFromBlockCoords(this.xCoord, this.zCoord))
+ .ifPresent(c -> GT_Pollution.addPollution(c, ConfigHandler.pollutionHeatedWaterPumpSecond));
+ }
+ });
+ }
+
+ @Override
+ public int[] getAccessibleSlotsFromSide(int side) {
+ return new int[] { 0 };
+ }
+
+ @Override
+ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
+ return TileEntityFurnace.getItemBurnTime(p_102007_2_) > 0;
+ }
+
+ @Override
+ public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
+ return false;
+ }
+
+ @Override
+ public int getSizeInventory() {
+ return 2;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int slotIn) {
+ if (slotIn == 0) return this.fuelstack;
+ return this.fakestack;
+ }
+
+ @Override
+ public ItemStack decrStackSize(int slot, int ammount) {
+ if (slot != BW_TileEntity_HeatedWaterPump.FUELSLOT || this.fuelstack == null
+ || ammount > this.fuelstack.stackSize) return null;
+
+ return this.fuelstack.splitStack(ammount);
+ }
+
+ @Override
+ public ItemStack getStackInSlotOnClosing(int index) {
+ return null;
+ }
+
+ @Override
+ public void setInventorySlotContents(int slot, ItemStack stack) {
+ if (slot == BW_TileEntity_HeatedWaterPump.FUELSLOT) this.fuelstack = stack;
+ else this.fakestack = stack;
+ }
+
+ @Override
+ public String getInventoryName() {
+ return null;
+ }
+
+ @Override
+ public boolean hasCustomInventoryName() {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 64;
+ }
+
+ @Override
+ public boolean isUseableByPlayer(EntityPlayer player) {
+ return true;
+ }
+
+ @Override
+ public void openInventory() {}
+
+ @Override
+ public void closeInventory() {}
+
+ @Override
+ public boolean isItemValidForSlot(int index, ItemStack stack) {
+ return TileEntityFurnace.getItemBurnTime(stack) > 0 && index == BW_TileEntity_HeatedWaterPump.FUELSLOT;
+ }
+
+ @Override
+ public FluidStack getFluid() {
+ return this.outputstack.amount > 0 ? this.outputstack : null;
+ }
+
+ @Override
+ public int getFluidAmount() {
+ return this.outputstack.amount;
+ }
+
+ @Override
+ public int getCapacity() {
+ return 8000;
+ }
+
+ @Override
+ public FluidTankInfo getInfo() {
+ return new FluidTankInfo(this);
+ }
+
+ @Override
+ public int fill(FluidStack resource, boolean doFill) {
+ return 0;
+ }
+
+ @Override
+ public FluidStack drain(int maxDrain, boolean doDrain) {
+ int actualdrain = maxDrain;
+ if (actualdrain > this.outputstack.amount) actualdrain = this.outputstack.amount;
+ FluidStack ret = new FluidStack(BW_TileEntity_HeatedWaterPump.WATER, actualdrain);
+ 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));
+ }
+ return ret;
+ }
+
+ @Override
+ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
+ return 0;
+ }
+
+ @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);
+ return null;
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
+ return this.drain(maxDrain, doDrain);
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection from, Fluid fluid) {
+ return false;
+ }
+
+ @Override
+ public boolean canDrain(ForgeDirection from, Fluid fluid) {
+ return fluid == null || fluid == BW_TileEntity_HeatedWaterPump.WATER;
+ }
+
+ @Override
+ public FluidTankInfo[] getTankInfo(ForgeDirection from) {
+ 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") };
+ }
+
+ @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");
+ for (int i = 2; i < 7; i++) {
+ ITileHasDifferentTextureSides.texture[i] = par1IconRegister
+ .registerIcon(MainMod.MOD_ID + ":heatedWaterPumpSide");
+ }
+ }
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 166);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.bindPlayerInventory(buildContext.getPlayer());
+ final IItemHandlerModifiable invWrapper = new InvWrapper(this);
+
+ 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) this.fuel / this.maxfuel)
+ .setTexture(BW_UITextures.PROGRESSBAR_FUEL, 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(56, 36)
+ .setSize(14, 14));
+
+ return builder.build();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
new file mode 100644
index 0000000000..0dc888c663
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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.Fluid;
+import net.minecraftforge.fluids.FluidEvent;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+import net.minecraftforge.fluids.IFluidTank;
+
+import gregtech.api.util.GT_Utility;
+
+public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank, IFluidHandler {
+
+ final ArrayList<FluidStack> INTERNALTANKS = new ArrayList<>();
+
+ int selectedTank;
+
+ @Override
+ public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
+ return this.fill(resource, doFill);
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
+ return this.drain(from, resource != null ? resource.amount : 0, doDrain);
+ }
+
+ @Override
+ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
+ return this.drain(maxDrain, doDrain);
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection from, Fluid fluid) {
+ return true;
+ }
+
+ @Override
+ public boolean canDrain(ForgeDirection from, Fluid fluid) {
+ boolean ret = false;
+ for (FluidStack stack : this.INTERNALTANKS) {
+ ret = GT_Utility.areFluidsEqual(stack, new FluidStack(fluid, 0));
+ if (ret) {
+ this.selectedTank = this.INTERNALTANKS.indexOf(stack);
+ break;
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public FluidTankInfo[] getTankInfo(ForgeDirection from) {
+ return new FluidTankInfo[0];
+ }
+
+ @Override
+ public FluidStack getFluid() {
+ if (this.INTERNALTANKS.get(this.selectedTank) == null || this.INTERNALTANKS.get(this.selectedTank).amount == 0)
+ if (this.selectedTank > 0) this.selectedTank = this.INTERNALTANKS.size() - 1;
+ return this.INTERNALTANKS.get(this.selectedTank);
+ }
+
+ @Override
+ public int getFluidAmount() {
+ return this.INTERNALTANKS.get(this.selectedTank) != null ? this.INTERNALTANKS.get(this.selectedTank).amount : 0;
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound compound) {
+ super.writeToNBT(compound);
+
+ NBTTagList lInternalTank = new NBTTagList();
+
+ for (FluidStack internaltank : this.INTERNALTANKS) {
+ if (internaltank != null) {
+ NBTTagCompound entry = new NBTTagCompound();
+ entry.setString(
+ "FluidName",
+ internaltank.getFluid()
+ .getName());
+ entry.setInteger("Ammount", internaltank.amount);
+ entry.setTag("FluidTag", internaltank.tag);
+ lInternalTank.appendTag(entry);
+ }
+ }
+ compound.setTag("InternalTank", lInternalTank);
+ }
+
+ @Override
+ public int getCapacity() {
+ return Integer.MAX_VALUE;
+ }
+
+ @Override
+ public FluidTankInfo getInfo() {
+ return null;
+ }
+
+ @Override
+ public int fill(FluidStack resource, boolean doFill) {
+ if (this.worldObj.isRemote || resource == null || resource.amount == 0) return 0;
+
+ if (!doFill) return resource.amount;
+
+ 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;
+ }
+ } else {
+ this.INTERNALTANKS.add(resource);
+ id = this.INTERNALTANKS.size() - 1;
+ this.selectedTank = id;
+ }
+ return this.INTERNALTANKS.get(id).amount;
+ }
+
+ @Override
+ public FluidStack drain(int maxDrain, boolean doDrain) {
+
+ FluidStack outputstack = this.INTERNALTANKS.get(this.selectedTank);
+ if (this.worldObj.isRemote || maxDrain == 0 || this.getFluid() == null || outputstack == null) return null;
+
+ int actualdrain = maxDrain;
+ if (actualdrain > outputstack.amount) actualdrain = outputstack.amount;
+ FluidStack ret = new FluidStack(outputstack.getFluid(), actualdrain);
+ 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));
+ }
+ return ret;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
new file mode 100644
index 0000000000..2dcc69377e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.tileentities.debug;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+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) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new CreativeScanner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ this.setEUVar(this.maxEUStore());
+ this.mProgresstime = this.mMaxProgresstime;
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java
new file mode 100644
index 0000000000..a7d8ea9db8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java
@@ -0,0 +1,836 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.github.bartimaeusnek.bartworks.util.BW_Util.ofGlassTiered;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.entity.player.EntityPlayer;
+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 org.jetbrains.annotations.NotNull;
+
+import com.github.bartimaeusnek.bartworks.API.SideReference;
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.items.LabParts;
+import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
+import com.github.bartimaeusnek.bartworks.common.net.RendererPacket;
+import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.BioCulture;
+import com.github.bartimaeusnek.bartworks.util.Coords;
+import com.github.bartimaeusnek.bartworks.util.MathUtils;
+import com.github.bartimaeusnek.bartworks.util.ResultWrongSievert;
+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;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_ParallelHelper;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class GT_TileEntity_BioVat extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_BioVat> {
+
+ public static final HashMap<Coords, Integer> staticColorMap = new HashMap<>();
+
+ private static final byte TIMERDIVIDER = 20;
+
+ private final HashSet<EntityPlayerMP> playerMPHashSet = new HashSet<>();
+ private final ArrayList<GT_MetaTileEntity_RadioHatch> mRadHatches = new ArrayList<>();
+ private int height = 1;
+ private Fluid mFluid = FluidRegistry.LAVA;
+ private BioCulture mCulture;
+ private ItemStack mStack;
+ private boolean needsVisualUpdate = true;
+ private byte mGlassTier;
+ private int mSievert;
+ private int mNeededSievert;
+ private int mCasing = 0;
+ private int mExpectedMultiplier = 0;
+ private int mTimes = 0;
+ private boolean isVisibleFluid = false;
+
+ public GT_TileEntity_BioVat(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_BioVat(String aName) {
+ super(aName);
+ }
+
+ 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();
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_BioVat> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @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")
+ .addCasingInfoMin("Clean Stainless Steel Casings", 19, false)
+ .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);
+ return tt;
+ }
+
+ public static int[] specialValueUnpack(int aSpecialValue) {
+ int[] ret = new int[4];
+ ret[0] = aSpecialValue & 0xF; // = glass tier
+ ret[1] = aSpecialValue >>> 4 & 0b11; // = special value
+ ret[2] = aSpecialValue >>> 6 & 0b1; // boolean exact svt | 1 = true | 0 = false
+ ret[3] = aSpecialValue >>> 7 & Integer.MAX_VALUE; // = sievert
+ return ret;
+ }
+
+ private int getInputCapacity() {
+ 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();
+ }
+
+ @Override
+ public int getCapacity() {
+ int ret = 0;
+ ret += this.getInputCapacity();
+ // ret += getOutputCapacity();
+ return ret;
+ }
+
+ @Override
+ public int fill(FluidStack resource, boolean doFill) {
+ return super.fill(resource, doFill);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return BartWorksRecipeMaps.bacterialVatRecipes;
+ }
+
+ /**
+ * 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
+ * @return the expected output multiplier
+ */
+ private int getExpectedMultiplier(@Nullable FluidStack recipeFluidOutput, boolean needEqual) {
+ FluidStack storedFluidOutputs = this.getStoredFluidOutputs();
+ if (storedFluidOutputs == null) return 1;
+ if (!needEqual || storedFluidOutputs.isFluidEqual(recipeFluidOutput)) {
+ return this.calcMod(storedFluidOutputs.amount) + 1;
+ }
+ return 1;
+ }
+
+ private int calcMod(double x) {
+ double y = this.getOutputCapacity() / 2D, z = ConfigHandler.bioVatMaxParallelBonus;
+
+ int ret = MathUtils.ceilInt((-1D / y * Math.pow(x - y, 2D) + y) / y * z);
+ return MathUtils.clamp(1, ret, ConfigHandler.bioVatMaxParallelBonus);
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic() {
+
+ @NotNull
+ @Override
+ protected CheckRecipeResult validateRecipe(@NotNull GT_Recipe recipe) {
+ if (!BW_Util.areStacksEqualOrNull(
+ (ItemStack) recipe.mSpecialItems,
+ GT_TileEntity_BioVat.this.getControllerSlot())) return CheckRecipeResultRegistry.NO_RECIPE;
+ int[] conditions = GT_TileEntity_BioVat.specialValueUnpack(recipe.mSpecialValue);
+ GT_TileEntity_BioVat.this.mNeededSievert = conditions[3];
+
+ if (GT_TileEntity_BioVat.this.mGlassTier < conditions[0]) {
+ return CheckRecipeResultRegistry.insufficientMachineTier(conditions[0]);
+ }
+
+ if (conditions[2] == 0) {
+ if (GT_TileEntity_BioVat.this.mSievert < GT_TileEntity_BioVat.this.mNeededSievert) {
+ return ResultWrongSievert.insufficientSievert(GT_TileEntity_BioVat.this.mNeededSievert);
+ }
+ } else if (GT_TileEntity_BioVat.this.mSievert != conditions[3]) {
+ return ResultWrongSievert.wrongSievert(conditions[3]);
+ }
+
+ return CheckRecipeResultRegistry.SUCCESSFUL;
+ }
+
+ @NotNull
+ @Override
+ protected GT_ParallelHelper createParallelHelper(@NotNull GT_Recipe recipe) {
+ return super.createParallelHelper(recipeWithMultiplier(recipe, inputFluids));
+ }
+ };
+ }
+
+ protected GT_Recipe recipeWithMultiplier(GT_Recipe recipe, FluidStack[] fluidInputs) {
+ GT_Recipe tRecipe = recipe.copy();
+ int multiplier = getExpectedMultiplier(recipe.getFluidOutput(0), true);
+ mExpectedMultiplier = multiplier;
+ // Calculate max multiplier limited by input fluids
+ long fluidAmount = 0;
+ for (FluidStack fluid : fluidInputs) {
+ if (recipe.mFluidInputs[0].isFluidEqual(fluid)) {
+ fluidAmount += fluid.amount;
+ }
+ }
+ multiplier = (int) Math.min(multiplier, fluidAmount / recipe.mFluidInputs[0].amount);
+ // In case multiplier is 0
+ multiplier = Math.max(multiplier, 1);
+ mTimes = multiplier;
+ tRecipe.mFluidInputs[0].amount *= multiplier;
+ tRecipe.mFluidOutputs[0].amount *= multiplier;
+ return tRecipe;
+ }
+
+ @Override
+ protected void setupProcessingLogic(ProcessingLogic logic) {
+ super.setupProcessingLogic(logic);
+ logic.setSpecialSlotItem(this.getControllerSlot());
+ }
+
+ public FluidStack getStoredFluidOutputs() {
+ // Only one output Hatch
+ assert this.mOutputHatches.size() == 1;
+ return this.mOutputHatches.get(0)
+ .getFluid();
+ }
+
+ private boolean addRadiationInputToMachineList(IGregTechTileEntity aTileEntity, int CasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null || !(aMetaTileEntity instanceof GT_MetaTileEntity_RadioHatch)) {
+ return false;
+ } else {
+ ((GT_MetaTileEntity_RadioHatch) aMetaTileEntity).updateTexture(CasingIndex);
+ return this.mRadHatches.add((GT_MetaTileEntity_RadioHatch) aMetaTileEntity);
+ }
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ this.mRadHatches.clear();
+ this.mGlassTier = 0;
+ this.mCasing = 0;
+
+ if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 2, 3, 0)) return false;
+
+ return this.mCasing >= 19 && this.mRadHatches.size() <= 1
+ && this.mOutputHatches.size() == 1
+ && this.mMaintenanceHatches.size() == 1
+ && this.mInputHatches.size() > 0
+ && this.mEnergyHatches.size() > 0;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ 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);
+ }
+ }
+
+ private void sendPackagesOrRenewRenderer(int x, int y, int z, BioCulture lCulture) {
+ int xDir = this.getXDir();
+ int zDir = this.getZDir();
+
+ 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(),
+ y + this.getBaseMetaTileEntity()
+ .getYCoord(),
+ zDir + z
+ + this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId),
+ lCulture == null ? BioCulture.NULLCULTURE.getColorRGB() : lCulture.getColorRGB());
+
+ 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),
+ lCulture == null ? BioCulture.NULLCULTURE.getColorRGB() : lCulture.getColorRGB(),
+ true),
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord());
+ 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),
+ lCulture == null ? BioCulture.NULLCULTURE.getColorRGB() : lCulture.getColorRGB(),
+ false),
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord());
+ }
+ this.needsVisualUpdate = true;
+ }
+
+ private void check_Chunk() {
+ World aWorld = this.getBaseMetaTileEntity()
+ .getWorld();
+ if (!aWorld.isRemote) {
+
+ for (Object tObject : aWorld.playerEntities) {
+ if (!(tObject instanceof EntityPlayerMP tPlayer)) {
+ break;
+ }
+ Chunk tChunk = aWorld.getChunkFromBlockCoords(
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord());
+ if (tPlayer.getServerForPlayer()
+ .getPlayerManager()
+ .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
+ if (!this.playerMPHashSet.contains(tPlayer)) {
+ this.playerMPHashSet.add(tPlayer);
+ this.sendAllRequiredRendererPackets();
+ }
+ } else {
+ this.playerMPHashSet.remove(tPlayer);
+ }
+ }
+ }
+ }
+
+ private void placeFluid() {
+ this.isVisibleFluid = true;
+ int xDir = this.getXDir();
+ int zDir = this.getZDir();
+ 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);
+ }
+ }
+ }
+ }
+
+ private void removeFluid(int xDir, int zDir) {
+ this.isVisibleFluid = false;
+
+ 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()
+ .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());
+ 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);
+ }
+ }
+ }
+ }
+
+ private int reCalculateFluidAmmount() {
+ return this.getStoredFluids()
+ .stream()
+ .mapToInt(fluidStack -> fluidStack.amount)
+ .sum();
+ }
+
+ private int reCalculateHeight() {
+ return this.reCalculateFluidAmmount() > this.getCapacity() / 4 - 1
+ ? this.reCalculateFluidAmmount() >= this.getCapacity() / 2 ? 3 : 2
+ : 1;
+ }
+
+ public void doAllVisualThings() {
+ if (this.getBaseMetaTileEntity()
+ .isServerSide()) {
+ if (this.mMachine) {
+ ItemStack aStack = this.mInventory[1];
+ BioCulture lCulture = null;
+ int xDir = this.getXDir();
+ int zDir = this.getZDir();
+
+ if (this.getBaseMetaTileEntity()
+ .getTimer() % 200 == 0) {
+ this.check_Chunk();
+ }
+
+ 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());
+ }
+
+ 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) {
+ 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
+ || aStack.getTagCompound() == null
+ || 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);
+ }
+ }
+ }
+ }
+ }
+ this.mStack = aStack;
+ this.mCulture = lCulture;
+ }
+ if (this.needsVisualUpdate && this.getBaseMetaTileEntity()
+ .getTimer() % GT_TileEntity_BioVat.TIMERDIVIDER == 1) {
+ if (this.getBaseMetaTileEntity()
+ .isClientSide()) new Throwable().printStackTrace();
+ this.placeFluid();
+ this.needsVisualUpdate = false;
+ }
+ }
+ } else {
+ this.onRemoval();
+ }
+ }
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (this.height != this.reCalculateHeight()) this.needsVisualUpdate = true;
+ this.doAllVisualThings();
+ if (this.getBaseMetaTileEntity()
+ .isServerSide() && this.mRadHatches.size() == 1) {
+ this.mSievert = this.mRadHatches.get(0)
+ .getSievert();
+ if (this.getBaseMetaTileEntity()
+ .isActive() && this.mNeededSievert > this.mSievert) this.mOutputFluids = null;
+ }
+ if (aBaseMetaTileEntity.isServerSide() && this.mMaxProgresstime <= 0) {
+ this.mTimes = 0;
+ this.mMaxProgresstime = 0;
+ }
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setInteger("mFluidHeight", this.height);
+ if (this.mCulture != null && !this.mCulture.getName()
+ .isEmpty()) aNBT.setString("mCulture", this.mCulture.getName());
+ else if ((this.mCulture == null || this.mCulture.getName()
+ .isEmpty()) && !aNBT.getString("mCulture")
+ .isEmpty()) {
+ aNBT.removeTag("mCulture");
+ }
+ if (this.mFluid != null) aNBT.setString("mFluid", this.mFluid.getName());
+ aNBT.setInteger("mSievert", this.mSievert);
+ aNBT.setInteger("mNeededSievert", this.mNeededSievert);
+ aNBT.setBoolean("isVisibleFluid", this.isVisibleFluid);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void onRemoval() {
+ if (this.isVisibleFluid) {
+ int xDir = this.getXDir();
+ int zDir = this.getZDir();
+ this.removeFluid(xDir, zDir);
+ this.sendRenderPackets(xDir, zDir);
+ } else if (this.getBaseMetaTileEntity()
+ .getWorld()
+ .getWorldTime() % 20 == 7) {
+ this.sendRenderPackets();
+ }
+
+ super.onRemoval();
+ }
+
+ private int getXDir() {
+ return this.getBaseMetaTileEntity()
+ .getBackFacing().offsetX * 2;
+ }
+
+ private int getZDir() {
+ return this.getBaseMetaTileEntity()
+ .getBackFacing().offsetZ * 2;
+ }
+
+ private void sendRenderPackets() {
+ int xDir = this.getXDir();
+ int zDir = this.getZDir();
+ this.sendRenderPackets(xDir, zDir);
+ }
+
+ private void sendRenderPackets(int xDir, int zDir) {
+ if (SideReference.Side.Server) {
+ for (int x = -1; x < 2; x++) {
+ for (int y = 1; y < 3; y++) {
+ for (int z = -1; z < 2; z++) {
+ 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());
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.height = aNBT.getInteger("mFluidHeight");
+ this.mCulture = BioCulture.getBioCulture(aNBT.getString("mCulture"));
+ if (!aNBT.getString("mFluid")
+ .isEmpty()) this.mFluid = FluidRegistry.getFluid(aNBT.getString("mFluid"));
+ this.mSievert = aNBT.getInteger("mSievert");
+ this.mNeededSievert = aNBT.getInteger("mNeededSievert");
+ super.loadNBTData(aNBT);
+ this.isVisibleFluid = aNBT.getBoolean("isVisibleFluid");
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_BioVat(this.mName);
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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) };
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean b) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 2, 3, 0);
+ }
+
+ @Override
+ public String[] getInfoData() {
+ final String[] baseInfoData = super.getInfoData();
+ final String[] infoData = new String[baseInfoData.length + 2];
+ System.arraycopy(baseInfoData, 0, infoData, 0, baseInfoData.length);
+ // See https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11923
+ // 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
+ + (this.mMachine
+ ? (this.mMaxProgresstime <= 0 ? this.getExpectedMultiplier(null, false) : this.mExpectedMultiplier)
+ * 100
+ : -1)
+ + EnumChatFormatting.RESET
+ + " %";
+ infoData[infoData.length - 1] = StatCollector.translateToLocal("BW.infoData.BioVat.production") + ": "
+ + EnumChatFormatting.GREEN
+ + (this.mMaxProgresstime <= 0 ? 0 : this.mTimes) * 100
+ + EnumChatFormatting.RESET
+ + " %";
+ return infoData;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ batchMode = !batchMode;
+ if (batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java
new file mode 100644
index 0000000000..1f85ea0167
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java
@@ -0,0 +1,641 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
+import static com.github.bartimaeusnek.bartworks.util.BW_Util.ofGlassTieredMixed;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.enums.GT_HatchElement.Energy;
+import static gregtech.api.enums.GT_HatchElement.InputBus;
+import static gregtech.api.enums.GT_HatchElement.InputHatch;
+import static gregtech.api.enums.GT_HatchElement.Maintenance;
+import static gregtech.api.enums.GT_HatchElement.OutputBus;
+import static gregtech.api.enums.SoundResource.IC2_MACHINES_MAGNETIZER_LOOP;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW;
+import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+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.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import org.jetbrains.annotations.NotNull;
+
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+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_Tooltip_Reference;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget;
+import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.SoundResource;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.recipe.check.SimpleCheckRecipeResult;
+import gregtech.api.render.TextureFactory;
+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 mcp.mobius.waila.api.IWailaConfigHandler;
+import mcp.mobius.waila.api.IWailaDataAccessor;
+
+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 String STRUCTURE_PIECE_NEXT_HINT = "next_hint";
+ private static final String STRUCTURE_PIECE_LAST = "last";
+
+ private static final int MINIMUM_CIRCUIT_ASSEMBLER_LENGTH = 5;
+ protected static final String IMPRINT_KEY = "Type";
+ protected static final String LENGTH_KEY = "Length";
+ protected static final String RUNNING_MODE_KEY = "RunningMode";
+
+ private int length;
+ private int mode;
+ private String imprintedItemName;
+ private ItemStack imprintedStack;
+
+ 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" }, }))
+ .addShape(
+ STRUCTURE_PIECE_NEXT_HINT,
+ transpose(new String[][] { { "G", "G", "G" }, { "g", "l", "g" }, { "b", "i", "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAST,
+ transpose(new String[][] { { "G", "G", "G" }, { "g", "l", "g" }, { "b", "o", "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)
+ .disallowOnly(ForgeDirection.EAST, ForgeDirection.WEST)
+ .buildAndChain(GregTech_API.sBlockCasings2, 0))
+ .addElement('i', InputBus.newAny(CASING_INDEX, 3, ForgeDirection.DOWN))
+ .addElement(
+ 'I',
+ buildHatchAdder(GT_TileEntity_CircuitAssemblyLine.class).atLeast(InputHatch, InputBus, OutputBus)
+ .casingIndex(CASING_INDEX)
+ .dot(2)
+ .disallowOnly(ForgeDirection.EAST, ForgeDirection.WEST)
+ .buildAndChain(GregTech_API.sBlockCasings2, 0))
+ .addElement('o', OutputBus.newAny(CASING_INDEX, 2, ForgeDirection.DOWN))
+ .build();
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_CircuitAssemblyLine> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Circuit Assembler/Circuit Assembly Line")
+ .addInfo("Controller block for the Circuit Assembly Line")
+ .addInfo("Change Mode with Screwdriver")
+ .addInfo("Does not lose efficiency when overclocked")
+ .addInfo(
+ "---------" + EnumChatFormatting.WHITE
+ + StatCollector.translateToLocal("chat.cal.mode.0")
+ + EnumChatFormatting.GRAY
+ + "--------")
+ .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(
+ "---------" + EnumChatFormatting.WHITE
+ + StatCollector.translateToLocal("chat.cal.mode.1")
+ + EnumChatFormatting.GRAY
+ + "--------")
+ .addInfo(
+ "Does Circuit Assembler recipes, Minimum Length: " + EnumChatFormatting.RED
+ + MINIMUM_CIRCUIT_ASSEMBLER_LENGTH
+ + EnumChatFormatting.GRAY)
+ .addInfo("Recipe tier in Circuit Assembler mode is at most Energy Hatch tier - 1.")
+ .addInfo("This mode supports Crafting Input Buffer/Bus and allows bus separation")
+ .addInfo("")
+ .addSeparator()
+ .addInfo(BW_Tooltip_Reference.TT_BLUEPRINT)
+ .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")
+ .addStructureInfo("Layer 2 - EV+ Tier Glass, Assembling Line Casing, EV+ Tier Glass")
+ .addStructureInfo("Layer 3 - Grate Machine Casing")
+ .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)
+ .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)
+ .toolTipFinisher(ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get());
+ return tt;
+ }
+
+ public String getTypeForDisplay() {
+
+ if (this.type.equals(new NBTTagCompound())) return "";
+ return GT_LanguageManager.getTranslation(
+ GT_LanguageManager.getTranslateableItemStackName(CircuitImprintLoader.getStackFromTag(this.type)));
+ }
+
+ private NBTTagCompound type = new NBTTagCompound();
+
+ public GT_TileEntity_CircuitAssemblyLine(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ private GT_TileEntity_CircuitAssemblyLine(String aName) {
+ super(aName);
+ }
+
+ 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
+ && itemStack.getTagCompound() != null
+ && this.type.equals(new NBTTagCompound())) {
+ this.type = itemStack.getTagCompound();
+ this.mInventory[1] = null;
+ this.getBaseMetaTileEntity()
+ .issueBlockUpdate();
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(IC2_MACHINES_MAGNETIZER_LOOP, 10, 1.0F, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.type = aNBT.getCompoundTag(IMPRINT_KEY);
+ this.imprintedItemName = this.type == null ? ""
+ : GT_LanguageManager.getTranslateableItemStackName(ItemStack.loadItemStackFromNBT(this.type));
+ mode = aNBT.getInteger(RUNNING_MODE_KEY);
+ length = aNBT.getInteger(LENGTH_KEY);
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ public void setItemNBT(NBTTagCompound aNBT) {
+ if (!this.type.equals(new NBTTagCompound())) aNBT.setTag(IMPRINT_KEY, this.type);
+ aNBT.setInteger(RUNNING_MODE_KEY, mode);
+ aNBT.setInteger(LENGTH_KEY, length);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ if (!this.type.equals(new NBTTagCompound())) aNBT.setTag(IMPRINT_KEY, this.type);
+ aNBT.setInteger(RUNNING_MODE_KEY, mode);
+ aNBT.setInteger(LENGTH_KEY, length);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (getBaseMetaTileEntity().isServerSide()) {
+ this.mode = (this.mode + 1) % 2;
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("chat.cal.mode." + this.mode));
+ }
+ super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ if (this.mode == 0) return BartWorksRecipeMaps.circuitAssemblyLineRecipes;
+ return RecipeMaps.circuitAssemblerRecipes;
+ }
+
+ @Nonnull
+ @Override
+ public Collection<RecipeMap<?>> getAvailableRecipeMaps() {
+ return Arrays.asList(BartWorksRecipeMaps.circuitAssemblyLineRecipes, RecipeMaps.circuitAssemblerRecipes);
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic() {
+
+ @Override
+ @Nonnull
+ protected CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) {
+ // limit CA mode recipes to hatch tier - 1
+ if (GT_TileEntity_CircuitAssemblyLine.this.mode == 1
+ && recipe.mEUt > GT_TileEntity_CircuitAssemblyLine.this.getMaxInputVoltage() / 4) {
+ return CheckRecipeResultRegistry.NO_RECIPE;
+ }
+ return CheckRecipeResultRegistry.SUCCESSFUL;
+ }
+ }.enablePerfectOverclock();
+ }
+
+ @NotNull
+ @Override
+ public CheckRecipeResult checkProcessing() {
+ if (mode == 0) {
+ if (this.type.equals(new NBTTagCompound()) && !this.imprintMachine(this.getControllerSlot()))
+ return SimpleCheckRecipeResult.ofFailure("no_imprint");
+ if (this.imprintedItemName == null || this.imprintedStack == null) {
+ this.imprintedStack = new ItemStack(BW_Meta_Items.getNEWCIRCUITS(), 1, 0);
+ this.imprintedStack.setTagCompound(this.type);
+ this.imprintedItemName = GT_LanguageManager.getTranslateableItemStackName(this.imprintedStack);
+ }
+ } else if (length < MINIMUM_CIRCUIT_ASSEMBLER_LENGTH) {
+ return SimpleCheckRecipeResult.ofFailure("not_enough_length");
+ }
+
+ return super.checkProcessing();
+ }
+
+ @Override
+ protected void setupProcessingLogic(ProcessingLogic logic) {
+ super.setupProcessingLogic(logic);
+ logic.setSpecialSlotItem(this.imprintedStack);
+ }
+
+ @Override
+ protected SoundResource getProcessStartSound() {
+ return SoundResource.IC2_MACHINES_MAGNETIZER_LOOP;
+ }
+
+ @Override
+ public ArrayList<ItemStack> getStoredInputs() {
+ if (mode == 0) {
+ ArrayList<ItemStack> rList = new ArrayList<>();
+ for (GT_MetaTileEntity_Hatch_InputBus tHatch : filterValidMTEs(mInputBusses)) {
+ tHatch.mRecipeMap = this.getRecipeMap();
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i) != null) {
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
+ break;
+ }
+ }
+ }
+ return rList;
+ }
+
+ return super.getStoredInputs();
+ }
+
+ @Override
+ public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
+ return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
+ return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addInputHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null || !(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input)) {
+ return false;
+ } else {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
+ return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ }
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_CircuitAssemblyLine(this.mName);
+ }
+
+ private String[] infoDataBuffer;
+
+ @Override
+ public String[] getInfoData() {
+ if (this.infoDataBuffer != null) return this.infoDataBuffer;
+
+ String[] oldInfo = super.getInfoData();
+ this.infoDataBuffer = new String[oldInfo.length + 1];
+ System.arraycopy(oldInfo, 0, this.infoDataBuffer, 0, oldInfo.length);
+ this.infoDataBuffer[oldInfo.length] = StatCollector.translateToLocal("tooltip.cal.imprintedWith") + " "
+ + EnumChatFormatting.YELLOW
+ + this.getTypeForDisplay();
+ return this.infoDataBuffer;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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) };
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ if (!this.checkPiece(STRUCTURE_PIECE_FIRST, 0, 0, 0)) {
+ return false;
+ }
+ return this.checkMachine(true) || this.checkMachine(false);
+ }
+
+ private boolean checkMachine(boolean leftToRight) {
+
+ for (int i = 1; i < 7; ++i) {
+ if (!this.checkPiece(STRUCTURE_PIECE_NEXT, leftToRight ? -i : i, 0, 0)) {
+ return false;
+ }
+ length = i + 1;
+
+ if (!this.mOutputBusses.isEmpty()) {
+ return this.mEnergyHatches.size() == 1 && this.mMaintenanceHatches.size() == 1;
+ }
+ }
+
+ return false;
+ }
+
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_FIRST, stackSize, hintsOnly, 0, 0, 0);
+ int tLength = Math.min(stackSize.stackSize + 1, 7);
+
+ for (int i = 1; i < tLength; ++i) {
+ this.buildPiece(STRUCTURE_PIECE_NEXT, stackSize, hintsOnly, -i, 0, 0);
+ }
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
+ if (this.mMachine) return -1;
+ int built;
+ built = survivialBuildPiece(STRUCTURE_PIECE_FIRST, stackSize, 0, 0, 0, elementBudget, env, false, true);
+ if (built >= 0) return built;
+ int tLength = Math.min(stackSize.stackSize + 1, 7);
+
+ for (int i = 1; i < tLength - 1; ++i) {
+ built = survivialBuildPiece(
+ STRUCTURE_PIECE_NEXT_HINT,
+ stackSize,
+ -i,
+ 0,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
+ if (built >= 0) return built;
+ }
+ return survivialBuildPiece(
+ STRUCTURE_PIECE_LAST,
+ stackSize,
+ -(tLength - 1),
+ 0,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
+ }
+
+ @Override
+ public void addAdditionalTooltipInformation(ItemStack stack, List<String> tooltip) {
+ if (stack.hasTagCompound() && stack.stackTagCompound.hasKey(IMPRINT_KEY)) {
+ tooltip.add(
+ StatCollector.translateToLocal("tooltip.cal.imprintedWith") + " "
+ + EnumChatFormatting.YELLOW
+ + StatCollector.translateToLocal(
+ GT_LanguageManager.getTranslateableItemStackName(
+ ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("Type")))));
+ }
+ }
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ super.addUIWidgets(builder, buildContext);
+ builder
+ .widget(new FakeSyncWidget.StringSyncer(() -> this.imprintedItemName, val -> this.imprintedItemName = val));
+ builder.widget(
+ new CycleButtonWidget().setToggle(() -> mode == 1, val -> mode = val ? 1 : 0)
+ .setTextureGetter(
+ state -> state == 1 ? BW_UITextures.OVERLAY_BUTTON_ASSEMBLER_MODE
+ : BW_UITextures.OVERLAY_BUTTON_LINE_MODE)
+ .setBackground(GT_UITextures.BUTTON_STANDARD)
+ .setPos(80, 91)
+ .setSize(16, 16)
+ .dynamicTooltip(
+ () -> Collections.singletonList(StatCollector.translateToLocal("chat.cal.mode." + mode)))
+ .setUpdateTooltipEveryTick(true)
+ .setTooltipShowUpDelay(TOOLTIP_DELAY));
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (!aPlayer.isSneaking()) {
+ if (mode == 0) return false;
+ inputSeparation = !inputSeparation;
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation);
+ return true;
+ } else {
+ batchMode = !batchMode;
+ if (batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ }
+
+ @Override
+ public boolean supportsInputSeparation() {
+ return mode != 0;
+ }
+
+ @Override
+ public boolean isInputSeparationEnabled() {
+ return mode == 1 && super.isInputSeparationEnabled();
+ }
+
+ @Override
+ public boolean isRecipeLockingEnabled() {
+ return this.mode == 0 && this.imprintedItemName != null && !"".equals(this.imprintedItemName);
+ }
+
+ @Override
+ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
+ IWailaConfigHandler config) {
+ super.getWailaBody(itemStack, currenttip, accessor, config);
+ NBTTagCompound tag = accessor.getNBTData();
+ currenttip.add(
+ EnumChatFormatting.GREEN
+ + StatCollector.translateToLocal("chat.cal.mode." + tag.getInteger(RUNNING_MODE_KEY)));
+ if (tag.hasKey("ImprintedWith") && tag.getInteger(RUNNING_MODE_KEY) == 0) currenttip.add(
+ StatCollector.translateToLocal("tooltip.cal.imprintedWith") + " "
+ + EnumChatFormatting.YELLOW
+ + tag.getString("ImprintedWith"));
+
+ }
+
+ @Override
+ public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y,
+ int z) {
+ super.getWailaNBTData(player, tile, tag, world, x, y, z);
+ String imprintedWith = this.getTypeForDisplay();
+ if (!imprintedWith.isEmpty()) tag.setString("ImprintedWith", imprintedWith);
+ tag.setInteger(RUNNING_MODE_KEY, mode);
+ }
+
+ @Override
+ protected boolean supportsCraftingMEBuffer() {
+ return mode != 0;
+ }
+
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
new file mode 100644
index 0000000000..f394089fb0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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.common.util.ForgeDirection;
+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;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_ModHandler;
+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;
+
+public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
+
+ private static float nulearHeatMod = 2f;
+ private byte mMode;
+ private byte mTier;
+
+ public GT_TileEntity_DEHP(int aID, int tier, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ this.mTier = (byte) tier;
+ }
+
+ public GT_TileEntity_DEHP(String aName, byte mTier) {
+ super(aName);
+ this.mTier = mTier;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public void onConfigLoad(GT_Config aConfig) {
+ try {
+ Class c = TileEntityNuclearReactorElectric.class;
+ Field f = c.getDeclaredField("huOutputModifier");
+ f.setAccessible(true);
+ GT_TileEntity_DEHP.nulearHeatMod = f.getFloat(f);
+ } catch (SecurityException | IllegalArgumentException | ExceptionInInitializerError | NullPointerException
+ | IllegalAccessException | NoSuchFieldException e) {
+ e.printStackTrace();
+ }
+ super.onConfigLoad(aConfig);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setByte("mTier", this.mTier);
+ aNBT.setByte("mMode", this.mMode);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.mTier = aNBT.getByte("mTier");
+ this.mMode = aNBT.getByte("mMode");
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_DEHP(this.mName, this.mTier);
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ String casings = this.getCasingBlockItem()
+ .get(0)
+ .getDisplayName();
+ 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");
+
+ } 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)");
+ }
+ 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(
+ this.getFrameMaterial().mName + " Frame Boxes",
+ "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[this.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;
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_HeatProof;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Tungsten;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 11;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 2 + this.mTier;
+ }
+
+ @Override
+ protected boolean checkHatches() {
+ return !this.mMaintenanceHatches.isEmpty() && !this.mOutputHatches.isEmpty() && !this.mInputHatches.isEmpty();
+ }
+
+ private long getFluidFromHatches(Fluid f) {
+ long ret = 0;
+ for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches) {
+ if (ih.getFluid()
+ .getFluid()
+ .equals(f)) ret += ih.getFluidAmount();
+ }
+ return ret;
+ }
+
+ private long getWaterFromHatches(boolean onlyDistilled) {
+ Fluid toConsume1 = FluidRegistry.WATER;
+ Fluid toConsume2 = GT_ModHandler.getDistilledWater(1L)
+ .getFluid();
+ 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();
+ }
+ return ret;
+ }
+
+ @Override
+ 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) {}
+ return true;
+ }
+ return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (this.getBaseMetaTileEntity()
+ .getWorld().isRemote) return;
+ ++this.mMode;
+ if (this.mMode >= 4) this.mMode = 0;
+ GT_Utility.sendChatToPlayer(aPlayer, "Mode: " + this.mMode);
+ super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
+ }
+
+ @Override
+ 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) {}
+ return true;
+ }
+
+ if (this.tryLowerPipeState(false) == 0) {
+ return true;
+ }
+ if (this.waitForPipes()) {
+ return false;
+ }
+ if (this.mMode == 0) {
+ this.mMode = 1;
+ }
+ if (ConfigHandler.DEHPDirectSteam) {
+ if (this.mMode == 1) {
+ long steamProduced = this.mTier * 600 * 2L * this.mEfficiency / 10000L;
+ long waterConsume = (steamProduced + 160) / 160;
+
+ if (this.getWaterFromHatches(false) - waterConsume > 0) {
+ this.consumeFluid(FluidRegistry.WATER, waterConsume);
+ this.addOutput(GT_ModHandler.getSteam(steamProduced));
+ } else {
+ this.explodeMultiblock();
+ return false;
+ }
+ } else if (this.mMode == 2) {
+ long steamProduced = this.mTier * 300 * 2L * this.mEfficiency / 10000L;
+ long waterConsume = (steamProduced + 160) / 160;
+
+ if (this.getWaterFromHatches(true) - waterConsume > 0) {
+ this.consumeFluid(
+ GT_ModHandler.getDistilledWater(1)
+ .getFluid(),
+ waterConsume);
+ this.addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", (int) steamProduced));
+ } else {
+ this.explodeMultiblock();
+ return false;
+ }
+ }
+ } else if (this.mMode == 1 || this.mMode == 2) {
+ long coolantConverted = (long) (this.mTier * 24
+ * (double) GT_TileEntity_DEHP.nulearHeatMod
+ * this.mEfficiency
+ / 10000L);
+ if (this.getFluidFromHatches(FluidRegistry.getFluid("ic2coolant")) - coolantConverted > 0) {
+ this.consumeFluid(FluidRegistry.getFluid("ic2coolant"), coolantConverted);
+ this.addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", (int) coolantConverted));
+ } else {
+ this.explodeMultiblock();
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private boolean consumeFluid(Fluid fluid, long ammount) {
+ if (ammount > Integer.MAX_VALUE) {
+ int[] tmp = new int[(int) (ammount / Integer.MAX_VALUE)];
+ Arrays.fill(tmp, (int) (ammount / Integer.MAX_VALUE));
+ for (int i = 0; i < tmp.length; i++) {
+ 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;
+ if (tmp[i] <= 0) break;
+ }
+ }
+
+ return tmp[tmp.length - 1] <= 0;
+ }
+
+ long tmp = ammount;
+ 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;
+ if (tmp <= 0) return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected void setElectricityStats() {
+ try {
+ this.mEUt = this.isPickingPipes ? 60 : Math.toIntExact(GT_Values.V[this.getMinTier()]);
+ } catch (ArithmeticException e) {
+ e.printStackTrace();
+ this.mEUt = Integer.MAX_VALUE - 7;
+ }
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 1;
+ this.mEfficiency = this.getCurrentEfficiency(null);
+ this.mEfficiencyIncrease = 10000;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
new file mode 100644
index 0000000000..cb2140d62b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
@@ -0,0 +1,550 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry.BW_BLOCKS;
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.TT;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.jetbrains.annotations.NotNull;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.client.renderer.BW_EICPistonVisualizer;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.net.EICPacket;
+import com.github.bartimaeusnek.bartworks.util.Coords;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
+import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
+import com.gtnewhorizon.structurelib.structure.ITierConverter;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureUtility;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import fox.spiteful.avaritia.blocks.LudicrousBlocks;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.SoundResource;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_ExtendedPowerMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.render.TextureFactory;
+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;
+
+public class GT_TileEntity_ElectricImplosionCompressor
+ extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GT_TileEntity_ElectricImplosionCompressor>
+ implements ISurvivalConstructable {
+
+ private static final boolean pistonEnabled = !ConfigHandler.disablePistonInEIC;
+ private Boolean piston = true;
+ private static final SoundResource sound = SoundResource.RANDOM_EXPLODE;
+ private final ArrayList<ChunkCoordinates> chunkCoordinates = new ArrayList<>(5);
+ private int mBlockTier = 0;
+ private int mCasing;
+
+ public GT_TileEntity_ElectricImplosionCompressor(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_ElectricImplosionCompressor(String aName) {
+ super(aName);
+ }
+
+ 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',
+ StructureUtility.ofBlocksTiered(
+ tieredBlockConverter(),
+ getAllBlockTiers(),
+ 0,
+ GT_TileEntity_ElectricImplosionCompressor::setBlockTier,
+ GT_TileEntity_ElectricImplosionCompressor::getBlockTier))
+ .addElement(
+ 'C',
+ buildHatchAdder(GT_TileEntity_ElectricImplosionCompressor.class)
+ .atLeast(InputBus, OutputBus, Maintenance, InputHatch, OutputHatch)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings2, 0)),
+ onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings3, 4))))
+ .addElement(
+ 'e',
+ buildHatchAdder(GT_TileEntity_ElectricImplosionCompressor.class).atLeast(Energy.or(ExoticEnergy))
+ .casingIndex(CASING_INDEX)
+ .dot(2)
+ .buildAndChain(
+ onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings2, 0)),
+ onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings3, 4))))
+ .addElement('N', new IStructureElement<>() {
+
+ // Much of this based on StructureUtility.ofBlocksTiered
+ private final List<Pair<Block, Integer>> tiers = getAllBlockTiers();
+
+ @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) {
+ Block candidate = world.getBlock(x, y, z);
+ int candidateMeta = world.getBlockMetadata(x, y, z);
+ return getTierOfBlock(candidate, candidateMeta) != -1;
+ }
+ return true;
+ }
+
+ private Pair<Block, Integer> getTier(ItemStack trigger) {
+ return this.tiers.get(Math.min(Math.max(trigger.stackSize, 1), this.tiers.size()) - 1);
+ }
+
+ @Override
+ public boolean spawnHint(GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y, int z,
+ ItemStack itemStack) {
+ Pair<Block, Integer> tier = this.getTier(itemStack);
+ if (te.piston) StructureLibAPI.hintParticle(world, x, y, z, tier.getKey(), tier.getValue());
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(GT_TileEntity_ElectricImplosionCompressor te, World world, int x, int y, int z,
+ ItemStack itemStack) {
+ Pair<Block, Integer> tier = this.getTier(itemStack);
+ if (te.piston) world.setBlock(x, y, z, tier.getKey(), tier.getValue(), 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();
+
+ public static List<Pair<Block, Integer>> getAllBlockTiers() {
+ return new ArrayList<>() {
+
+ private static final long serialVersionUID = 8171991663102417651L;
+
+ {
+ this.add(Pair.of(GregTech_API.sBlockMetal5, 2));
+ this.add(Pair.of(LudicrousBlocks.resource_block, 1));
+ this.add(Pair.of(GregTech_API.sBlockMetal9, 4));
+ this.add(Pair.of(GregTech_API.sBlockMetal9, 3));
+ this.add(Pair.of(GregTech_API.sBlockMetal9, 8));
+ }
+
+ };
+ }
+
+ public static ITierConverter<Integer> tieredBlockConverter() {
+ return GT_TileEntity_ElectricImplosionCompressor::getTierOfBlock;
+ }
+
+ private static int getTierOfBlock(Block block, int meta) {
+ if (block == null) {
+ return -1;
+ }
+ if (block == GregTech_API.sBlockMetal5 && meta == 2) {
+ return 1; // Neutronium
+ }
+ if (block == LudicrousBlocks.resource_block && meta == 1) {
+ return 2; // Infinity
+ }
+ if (block == GregTech_API.sBlockMetal9) {
+ return switch (meta) {
+ case 4 -> 3; // Transcendent Metal
+ case 3 -> 4; // SpaceTime
+ case 8 -> 5; // Universium
+ default -> -1;
+ };
+ }
+ return -1;
+ }
+
+ private void setBlockTier(int tier) {
+ this.mBlockTier = tier;
+ }
+
+ private int getBlockTier() {
+ return this.mBlockTier;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_ElectricImplosionCompressor> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @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")
+ .addInfo("Controller block for the Electric Implosion Compressor")
+ .addInfo("Uses electricity instead of Explosives")
+ .addInfo("Can parallel up to 4^(Tier - 1)")
+ .addInfo("Tier is determined by containment block")
+ .addInfo("Valid blocks: Neutronium, Infinity, Transcendent Metal, Spacetime, Universium")
+ .addInfo("Minimum allowed energy hatch tier is one below recipe tier")
+ .addInfo("Supports " + TT + " energy hatches")
+ .addSeparator()
+ .beginStructureBlock(3, 9, 3, false)
+ .addController("Front 3rd layer center")
+ .addCasingInfoMin("Solid Steel Machine Casing", 8, false)
+ .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("Containment 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 middle and/or top middle", 2)
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return BartWorksRecipeMaps.electricImplosionCompressorRecipes;
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic() {
+
+ @NotNull
+ @Override
+ protected CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) {
+ long voltage = GT_TileEntity_ElectricImplosionCompressor.this.getAverageInputVoltage();
+ // Only allow a minimum of T-1 energy hatch
+ if (recipe.mEUt > voltage * 4) {
+ return CheckRecipeResultRegistry.insufficientPower(recipe.mEUt);
+ }
+ return CheckRecipeResultRegistry.SUCCESSFUL;
+ }
+
+ @NotNull
+ @Override
+ protected GT_OverclockCalculator createOverclockCalculator(@NotNull GT_Recipe recipe) {
+ // For overclocking we'll allow all power to be used
+ return super.createOverclockCalculator(recipe)
+ .setEUt(GT_TileEntity_ElectricImplosionCompressor.this.getMaxInputEu())
+ .setAmperage(1);
+ }
+ }.setMaxParallelSupplier(() -> (int) Math.pow(4, Math.max(this.mBlockTier - 1, 0)));
+ }
+
+ private void updateChunkCoordinates() {
+ this.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 = { x, -2, z + 1 };
+ int[] xyz = { 0, 0, 0 };
+ this.getExtendedFacing()
+ .getWorldOffset(abc, xyz);
+ xyz[0] += this.getBaseMetaTileEntity()
+ .getXCoord();
+ xyz[1] += this.getBaseMetaTileEntity()
+ .getYCoord();
+ xyz[2] += this.getBaseMetaTileEntity()
+ .getZCoord();
+ this.chunkCoordinates.add(new ChunkCoordinates(xyz[0], xyz[1], xyz[2]));
+ }
+ }
+ }
+
+ @Override
+ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
+ super.onFirstTick(aBaseMetaTileEntity);
+ this.updateChunkCoordinates();
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+
+ if (pistonEnabled && aBaseMetaTileEntity.isActive() && aTick % 20 == 0) {
+ if (aBaseMetaTileEntity.isClientSide()) this.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());
+ }
+ }
+
+ @Override
+ public void setExtendedFacing(ExtendedFacing newExtendedFacing) {
+ super.setExtendedFacing(newExtendedFacing); // Will call stopMachine
+
+ this.updateChunkCoordinates();
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public void stopMachine() {
+ this.resetPiston(this.mBlockTier);
+ super.stopMachine();
+ }
+
+ private void resetPiston(int tier) {
+ if (!pistonEnabled) return;
+ IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
+ if (!aBaseMetaTileEntity.isServerSide()) return;
+ if (!this.piston) {
+ List<Pair<Block, Integer>> tiers = getAllBlockTiers();
+ Pair<Block, Integer> tieredBlock = tiers.get(Math.min(tier, tiers.size()) - 1);
+ this.chunkCoordinates.forEach(c -> {
+ // Don't replace real blocks in case user has placed something (e.g. tier upgrade)
+ if (aBaseMetaTileEntity.getWorld()
+ .isAirBlock(c.posX, c.posY, c.posZ)) {
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(c.posX, c.posY, c.posZ, tieredBlock.getKey(), tieredBlock.getValue(), 3);
+ }
+ });
+ this.piston = !this.piston;
+ }
+ }
+
+ private void activatePiston() {
+ if (!pistonEnabled) return;
+ IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
+ if (!aBaseMetaTileEntity.isServerSide()) return;
+ if (this.piston) {
+ this.chunkCoordinates.forEach(
+ c -> aBaseMetaTileEntity.getWorld()
+ .setBlockToAir(c.posX, c.posY, c.posZ));
+ this.piston = !this.piston;
+ }
+ }
+
+ private void animatePiston(IGregTechTileEntity aBaseMetaTileEntity) {
+ if (!aBaseMetaTileEntity.getWorld().isRemote) return;
+
+ if (!this.getBaseMetaTileEntity()
+ .hasMufflerUpgrade())
+ GT_Utility.doSoundAtClient(
+ sound,
+ 10,
+ 1f,
+ 1f,
+ this.chunkCoordinates.get(0).posX,
+ this.chunkCoordinates.get(0).posY,
+ this.chunkCoordinates.get(0).posZ);
+ this.spawnVisualPistonBlocks(
+ aBaseMetaTileEntity.getWorld(),
+ this.chunkCoordinates.get(2).posX,
+ this.chunkCoordinates.get(2).posY,
+ this.chunkCoordinates.get(2).posZ,
+ 10);
+ }
+
+ @SideOnly(Side.CLIENT)
+ private void spawnVisualPistonBlocks(World world, int x, int y, int z, int age) {
+ BW_EICPistonVisualizer pistonVisualizer = new BW_EICPistonVisualizer(world, x, y, z, age);
+ Minecraft.getMinecraft().effectRenderer.addEffect(pistonVisualizer);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setBoolean("piston", this.piston);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ if (aNBT.hasKey("piston")) this.piston = aNBT.getBoolean("piston");
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ int pistonTier = this.mBlockTier;
+ this.mCasing = 0;
+ int mMaxHatchTier = 0;
+ this.setBlockTier(0);
+ boolean isOK = this.checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0);
+
+ List<GT_MetaTileEntity_Hatch> energyHatches = this.getExoticAndNormalEnergyHatchList();
+ for (GT_MetaTileEntity_Hatch hatch : energyHatches) {
+ mMaxHatchTier = Math.max(mMaxHatchTier, hatch.mTier);
+ }
+
+ isOK = isOK && this.mMaintenanceHatches.size() == 1 && energyHatches.size() >= 1;
+ if (isOK) {
+ this.activatePiston();
+ return true;
+ }
+ this.resetPiston(pistonTier);
+ return false;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_ElectricImplosionCompressor(this.mName);
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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) };
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean b) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 1, 6, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
+ if (this.mMachine) return -1;
+ return this.survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 1, 6, 0, elementBudget, env, false, true);
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ batchMode = !batchMode;
+ if (batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java
new file mode 100644
index 0000000000..a5ed5a69b7
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_HTGR.java
@@ -0,0 +1,614 @@
+/*
+ * 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_VIA_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_Values.AuthorKuba;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+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;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+
+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 int HELIUM_NEEDED = 730000;
+ public static final int powerUsage = (int) TierEU.RECIPE_LuV;
+ private static final int maxcapacity = 720000;
+ private static final int mincapacity = maxcapacity / 10;
+ private int HeliumSupply;
+ private int fueltype = -1, fuelsupply = 0;
+ private boolean empty;
+ private int emptyticksnodiff = 0;
+ private int coolanttaking = 0;
+ private int mCasing = 0;
+
+ public GT_TileEntity_HTGR(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ private GT_TileEntity_HTGR(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_HTGR> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ 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("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)")
+ .addInfo("Consumes up to 2.5% of total Fuel Pellets per Operation depending on efficiency")
+ .addInfo("Efficiency is calculated exponentially depending on the amount of pebbles in the internal buffer")
+ .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")
+ .addCasingInfoMin("Europium Reinforced Radiation Proof Casings", 500, false)
+ .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)
+ .toolTipFinisher(MULTIBLOCK_ADDED_VIA_BARTWORKS.apply(ChatColorHelper.GOLD + "kuba6000"));
+ return tt;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ this.buildPiece("main", stackSize, hintsOnly, 5, 11, 0);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ this.mCasing = 0;
+ return this.checkPiece("main", 5, 11, 0) && this.mCasing >= 500
+ && this.mMaintenanceHatches.size() == 1
+ && this.mInputHatches.size() > 0
+ && this.mOutputHatches.size() > 0
+ && this.mInputBusses.size() > 0
+ && this.mOutputBusses.size() > 0
+ && this.mEnergyHatches.size() > 0;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.HeliumSupply = aNBT.getInteger("HeliumSupply");
+ this.fueltype = aNBT.getInteger("fueltype");
+ this.fuelsupply = aNBT.getInteger("fuelsupply");
+ this.empty = aNBT.getBoolean("EmptyMode");
+ this.coolanttaking = aNBT.getInteger("coolanttaking");
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("HeliumSupply", this.HeliumSupply);
+ aNBT.setInteger("fueltype", this.fueltype);
+ aNBT.setInteger("fuelsupply", this.fuelsupply);
+ aNBT.setBoolean("EmptyMode", this.empty);
+ aNBT.setInteger("coolanttaking", this.coolanttaking);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (aBaseMetaTileEntity.isServerSide() && !this.empty) {
+ boolean updateneeded = false;
+ if (this.HeliumSupply < GT_TileEntity_HTGR.HELIUM_NEEDED) {
+ for (FluidStack fluidStack : this.getStoredFluids()) {
+ if (fluidStack.isFluidEqual(Materials.Helium.getGas(1))) {
+ int toget = Math.min(GT_TileEntity_HTGR.HELIUM_NEEDED - this.HeliumSupply, fluidStack.amount);
+ fluidStack.amount -= toget;
+ this.HeliumSupply += toget;
+ updateneeded = true;
+ }
+ }
+ }
+ if (this.fuelsupply < maxcapacity) {
+ this.startRecipeProcessing();
+ for (ItemStack itemStack : this.getStoredInputs()) {
+ int type = -1;
+ if (itemStack == null || itemStack.getItem() != HTGRMaterials.aHTGR_Materials) continue;
+ int damage = HTGRMaterials.aHTGR_Materials.getDamage(itemStack);
+ if ((damage + 1) % HTGRMaterials.MATERIALS_PER_FUEL != HTGRMaterials.USABLE_FUEL_INDEX + 1)
+ continue; // is fuel
+ type = damage / HTGRMaterials.MATERIALS_PER_FUEL;
+ if (this.fueltype == -1) this.fueltype = type;
+ if (this.fueltype != type) continue;
+ int toget = Math.min(maxcapacity - this.fuelsupply, itemStack.stackSize);
+ this.fuelsupply += toget;
+ itemStack.stackSize -= toget;
+ updateneeded = true;
+ }
+ this.endRecipeProcessing();
+ }
+ if (updateneeded) this.updateSlots();
+ }
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ // Only for visual
+ return BartWorksRecipeMaps.htgrFakeRecipes;
+ }
+
+ @Override
+ protected boolean filtersFluid() {
+ return false;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack controllerStack) {
+
+ if (this.empty) {
+ if (this.HeliumSupply > 0 || this.fuelsupply > 0) {
+ this.mEfficiency = 10000;
+ this.mMaxProgresstime = 100;
+ return true;
+ }
+ return false;
+ }
+ if (this.HeliumSupply < GT_TileEntity_HTGR.HELIUM_NEEDED || this.fuelsupply < mincapacity) return false;
+
+ double eff = Math.min(Math.pow((double) this.fuelsupply / (double) mincapacity, 2D), 100D) / 100D
+ - (this.getIdealStatus() - this.getRepairStatus()) / 10D;
+
+ if (eff <= 0) return false;
+
+ int toReduce = MathUtils.floorInt(this.fuelsupply * 0.025D * eff);
+
+ final int originalToReduce = toReduce;
+ int burnedballs = toReduce / 64;
+ if (burnedballs > 0) toReduce -= burnedballs * 64;
+
+ int meta = this.fueltype * HTGRMaterials.MATERIALS_PER_FUEL + HTGRMaterials.BURNED_OUT_FUEL_INDEX;
+
+ ItemStack[] toOutput = { new ItemStack(HTGRMaterials.aHTGR_Materials, burnedballs, meta),
+ new ItemStack(HTGRMaterials.aHTGR_Materials, toReduce, meta + 1) };
+ if (!this.canOutputAll(toOutput)) return false;
+
+ this.fuelsupply -= originalToReduce;
+ this.mOutputItems = toOutput;
+
+ // this.updateSlots(); // not needed ?
+
+ this.coolanttaking = (int) (4000D * (this.fueltype * 0.5D + 1) * eff);
+
+ this.mEfficiency = (int) (eff * 10000D);
+ this.mEfficiencyIncrease = 0;
+ this.mEUt = -powerUsage;
+ this.mMaxProgresstime = (int) (72000 * (1d - eff / 2d));
+ return true;
+ }
+
+ private int runningtick = 0;
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ this.runningtick++;
+
+ if (this.empty) {
+ if (this.emptyticksnodiff > 20 && this.emptyticksnodiff % 20 != 0) {
+ this.emptyticksnodiff++;
+ return true;
+ }
+ if (this.HeliumSupply > 0) {
+ this.addOutput(Materials.Helium.getGas(this.HeliumSupply));
+ this.HeliumSupply = 0;
+ }
+ if (this.fuelsupply > 0) {
+ ItemStack iStack = new ItemStack(
+ HTGRMaterials.aHTGR_Materials,
+ this.fuelsupply,
+ HTGRMaterials.MATERIALS_PER_FUEL * this.fueltype + HTGRMaterials.USABLE_FUEL_INDEX);
+ boolean storedAll = false;
+ for (GT_MetaTileEntity_Hatch_OutputBus tHatch : filterValidMTEs(mOutputBusses)) {
+ if (tHatch.storeAll(iStack)) {
+ storedAll = true;
+ break;
+ }
+ }
+ if (!storedAll) {
+ if (this.fuelsupply == iStack.stackSize) this.emptyticksnodiff++;
+ else {
+ this.fuelsupply = iStack.stackSize;
+ this.emptyticksnodiff = 0;
+ }
+ } else {
+ this.fuelsupply = 0;
+ this.fueltype = -1;
+ this.coolanttaking = 0;
+ }
+ }
+ return true;
+ }
+ // USE DA POWAH
+ if (!this.drainEnergyInput(-this.mEUt)) {
+ this.criticalStopMachine();
+ return false;
+ }
+
+ if (this.runningtick % 20 == 0) {
+ int takecoolant = this.coolanttaking;
+ int drainedamount = 0;
+
+ for (GT_MetaTileEntity_Hatch_Input tHatch : filterValidMTEs(mInputHatches)) {
+ FluidStack tLiquid = tHatch.getFluid();
+ if (tLiquid != null && tLiquid.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant", 1))) {
+ FluidStack drained = tHatch.drain(takecoolant, true);
+ takecoolant -= drained.amount;
+ drainedamount += drained.amount;
+ if (takecoolant <= 0) break;
+ }
+ }
+
+ if (drainedamount > 0) this.addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", drainedamount));
+
+ this.updateSlots();
+
+ if (takecoolant > 0) this.stopMachine();
+ }
+
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_HTGR(this.mName);
+ }
+
+ @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(this.coolanttaking) + "L/s", "Problems:",
+ String.valueOf(this.getIdealStatus() - this.getRepairStatus()) };
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side,
+ ForgeDirection forgeDirection, int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == forgeDirection) {
+ if (aActive) 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_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ }
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_HTGR.BASECASINGINDEX) };
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (this.mMaxProgresstime > 0) {
+ GT_Utility.sendChatToPlayer(aPlayer, "HTGR mode cannot be changed while the machine is running.");
+ return;
+ }
+ this.empty = !this.empty;
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ "HTGR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ public static class HTGRMaterials {
+
+ private static class CustomHTGRSimpleSubItemClass extends SimpleSubItemClass {
+
+ HashMap<Integer, String> tooltip = null;
+
+ public CustomHTGRSimpleSubItemClass(HashMap<Integer, String> tooltip, String... tex) {
+ super(tex);
+ this.tooltip = tooltip;
+ }
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) {
+ if (this.tooltip.containsKey(this.getDamage(p_77624_1_)))
+ aList.add(this.tooltip.get(this.getDamage(p_77624_1_)));
+ aList.add("Material for High Temperature Gas-cooled Reactor");
+ super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_);
+ }
+ }
+
+ private static class Base_ {
+
+ public String sName;
+ public String sEnglish;
+
+ public Base_(String a, String b) {
+ this.sName = a;
+ this.sEnglish = b;
+ }
+ }
+
+ public 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 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) {
+ this.sName = sName;
+ this.sEnglish = sEnglish;
+ this.mainItem = mainItem;
+ this.secondaryItem = secondaryItem;
+ this.recycledFluid = recycledFluid;
+ System.arraycopy(recycledItems, 0, this.recycledItems, 0, recycledItems.length);
+ this.recycleChances = recycleChances;
+ this.tooltip = tooltip;
+ }
+ }
+
+ private static class LangEntry_ {
+
+ public String sName;
+ public String sEnglish;
+
+ public LangEntry_(String a, String b) {
+ this.sName = a;
+ this.sEnglish = b;
+ }
+ }
+
+ public static final Base_[] sHTGR_Bases = { 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"), };
+ public static final int MATERIALS_PER_FUEL = sHTGR_Bases.length;
+ static final int USABLE_FUEL_INDEX = 4;
+ static final int BURNED_OUT_FUEL_INDEX = 5;
+ public static final Fuel_[] sHTGR_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"), };
+ public static final CustomHTGRSimpleSubItemClass aHTGR_Materials;
+ static final ArrayList<LangEntry_> aHTGR_Localizations = new ArrayList<>();
+
+ static {
+ 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++;
+ }
+ aHTGR_Materials = new CustomHTGRSimpleSubItemClass(tooltip, sHTGR_Materials);
+ }
+
+ public static void registeraTHR_Materials() {
+ for (LangEntry_ iName : aHTGR_Localizations)
+ GT_LanguageManager.addStringLocalization(iName.sName, iName.sEnglish);
+ GameRegistry.registerItem(GT_TileEntity_HTGR.HTGRMaterials.aHTGR_Materials, "bw.HTGRMaterials");
+ }
+
+ public static void register_fake_THR_Recipes() {
+
+ int i = 0;
+ for (@SuppressWarnings("unused")
+ Fuel_ fuel : sHTGR_Fuel) {
+
+ BartWorksRecipeMaps.htgrFakeRecipes.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) },
+ null,
+ null,
+ null,
+ 72000,
+ powerUsage,
+ 0);
+
+ i += MATERIALS_PER_FUEL;
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
new file mode 100644
index 0000000000..5a2c3ba382
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
@@ -0,0 +1,598 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Color;
+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 net.minecraftforge.common.util.ForgeDirection;
+
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+import com.github.bartimaeusnek.bartworks.util.ConnectedBlocksChecker;
+import com.gtnewhorizons.modularui.api.NumberFormatMUI;
+import com.gtnewhorizons.modularui.api.drawable.Text;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+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.DynamicPositionedColumn;
+import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
+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;
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.interfaces.IIconContainer;
+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 gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Utility;
+
+public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
+
+ private static final byte TEXID_SIDE = 0;
+ private static final byte TEXID_CHARGING = 1;
+ private static final byte TEXID_IDLE = 2;
+ private static final byte TEXID_EMPTY = 3;
+ private static final IIcon[] iIcons = new IIcon[4];
+ private static final IIconContainer[] iIconContainers = new IIconContainer[4];
+ private static final ITexture[][] iTextures = new ITexture[4][1];
+ public ConnectedBlocksChecker connectedcells;
+ public final ItemStack[] circuits = new ItemStack[5];
+ private final ItemStackHandler circuitsInventoryHandler = new ItemStackHandler(this.circuits) {
+
+ @Override
+ public int getSlotLimit(int slot) {
+ return 1;
+ }
+ };
+ private long mStorage;
+
+ protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
+
+ public GT_TileEntity_LESU(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ this.mStorage = ConfigHandler.energyPerCell;
+ }
+
+ public GT_TileEntity_LESU(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public boolean isEnetOutput() {
+ return true;
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return true;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return this.mStorage >= Long.MAX_VALUE - 1 || this.mStorage < 0 ? Long.MAX_VALUE - 1 : this.mStorage;
+ }
+
+ @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();
+ return ret > 0 ? ret : 1;
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return this.maxAmperesIn();
+ }
+
+ @Override
+ public long maxEUInput() {
+
+ for (int i = 1; i < GT_Values.V.length; i++) {
+ if (this.maxEUOutput() <= GT_Values.V[i] && this.maxEUOutput() > GT_Values.V[i - 1])
+ return Math.min(GT_Values.V[i], 32768L);
+ }
+
+ return 8;
+ }
+
+ @Override
+ public long maxEUOutput() {
+ return Math.min(Math.max(this.mStorage / ConfigHandler.energyPerCell, 1L), 32768L);
+ }
+
+ @Override
+ public int rechargerSlotStartIndex() {
+ return 0;
+ }
+
+ @Override
+ public int rechargerSlotCount() {
+ return 1;
+ }
+
+ @Override
+ public int dechargerSlotStartIndex() {
+ return 1;
+ }
+
+ @Override
+ public int dechargerSlotCount() {
+ return 1;
+ }
+
+ @Override
+ public boolean isTeleporterCompatible() {
+ return true;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_LESU(this.mName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ ArrayList<String> e = new ArrayList<>();
+ 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");
+ dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name")
+ .split(";");
+ Collections.addAll(e, dsc);
+ e.add(ChatColorHelper.RED + StatCollector.translateToLocal("tooltip.tile.lesu.3.name"));
+ e.add(BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get());
+ return e.toArray(new String[0]);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister aBlockIconRegister) {
+
+ for (int i = 0; i < GT_TileEntity_LESU.iTextures.length; i++) {
+ 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];
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return GT_TileEntity_LESU.iIcons[finalI];
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return new ResourceLocation(MainMod.MOD_ID + ":LESU_CASING_" + finalI);
+ }
+ };
+ }
+ }
+
+ public boolean isClientSide() {
+ if (this.getWorld() != null) return this.getWorld().isRemote ? FMLCommonHandler.instance()
+ .getSide() == Side.CLIENT
+ : FMLCommonHandler.instance()
+ .getEffectiveSide() == Side.CLIENT;
+ return FMLCommonHandler.instance()
+ .getEffectiveSide() == Side.CLIENT;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+
+ ITexture[] ret = {};
+
+ 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));
+ }
+
+ if (side == facing && this.getBaseMetaTileEntity()
+ .getUniversalEnergyStored() <= 0) ret = GT_TileEntity_LESU.iTextures[GT_TileEntity_LESU.TEXID_EMPTY];
+ else if (side == facing && !aActive) ret = GT_TileEntity_LESU.iTextures[GT_TileEntity_LESU.TEXID_IDLE];
+ else if (side == facing && aActive) ret = GT_TileEntity_LESU.iTextures[GT_TileEntity_LESU.TEXID_CHARGING];
+ else ret = GT_TileEntity_LESU.iTextures[GT_TileEntity_LESU.TEXID_SIDE];
+ }
+
+ return ret;
+ }
+
+ @Override
+ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
+ return true;
+ }
+
+ @Override
+ public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
+ return true;
+ }
+
+ @Override
+ public int getSizeInventory() {
+ return 6;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int slotIn) {
+ if (slotIn > 1) return this.circuits[slotIn - 2];
+ return this.mInventory[slotIn];
+ }
+
+ @Override
+ public void setInventorySlotContents(int index, ItemStack stack) {
+ if (index < 2) this.mInventory[index] = stack;
+ else this.circuits[index - 2] = stack;
+ }
+
+ @Override
+ public String getInventoryName() {
+ return "L.E.S.U.";
+ }
+
+ @Override
+ public boolean hasCustomInventoryName() {
+ return true;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 1;
+ }
+
+ @Override
+ public boolean isUseableByPlayer(EntityPlayer player) {
+ return true;
+ }
+
+ @Override
+ public boolean isItemValidForSlot(int index, ItemStack stack) {
+
+ return switch (index) {
+ case 0, 1 -> true;
+ default -> stack != null && stack.getItem()
+ .equals(
+ GT_Utility.getIntegratedCircuit(0)
+ .getItem());
+ };
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isInputFacing(ForgeDirection side) {
+ return side != this.getBaseMetaTileEntity()
+ .getFrontFacing();
+ }
+
+ @Override
+ public boolean isOutputFacing(ForgeDirection side) {
+ return side == this.getBaseMetaTileEntity()
+ .getFrontFacing();
+ }
+
+ @Override
+ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
+ this.checkMachine(aBaseMetaTileEntity, null);
+ super.onFirstTick(aBaseMetaTileEntity);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ this.mMaxProgresstime = 1;
+ if (aTick % 20 == 0) this.checkMachine(aBaseMetaTileEntity, null);
+ this.mWrench = true;
+ this.mScrewdriver = true;
+ this.mSoftHammer = true;
+ this.mHardHammer = true;
+ this.mSolderingTool = true;
+ this.mCrowbar = true;
+ }
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return 0;
+ }
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ this.mMaxProgresstime = 1;
+ return true;
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setIntArray("customCircuitInv", GT_Utility.stacksToIntArray(this.circuits));
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ int[] stacks = aNBT.getIntArray("customCircuitInv");
+ for (int i = 0; i < stacks.length; i++) {
+ this.circuits[i] = GT_Utility.intToStack(stacks[i]);
+ }
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ long startingTime = System.nanoTime();
+ this.connectedcells = new ConnectedBlocksChecker();
+ this.connectedcells.get_connected(
+ aBaseMetaTileEntity.getWorld(),
+ aBaseMetaTileEntity.getXCoord(),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getZCoord(),
+ ItemRegistry.BW_BLOCKS[1]);
+
+ if (this.connectedcells.get_meta_of_sideblocks(
+ aBaseMetaTileEntity.getWorld(),
+ this.getBaseMetaTileEntity()
+ .getMetaTileID(),
+ new int[] { aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getZCoord() },
+ true)) {
+ this.getBaseMetaTileEntity()
+ .disableWorking();
+ this.getBaseMetaTileEntity()
+ .setActive(false);
+ this.mStorage = 0;
+ this.mMaxProgresstime = 0;
+ this.mProgresstime = 0;
+ return false;
+ }
+
+ 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();
+ this.mMaxProgresstime = 1;
+ this.mProgresstime = 0;
+
+ this.mCrowbar = true;
+ this.mHardHammer = true;
+ this.mScrewdriver = true;
+ this.mSoftHammer = true;
+ this.mSolderingTool = true;
+ this.mWrench = true;
+
+ this.getBaseMetaTileEntity()
+ .enableWorking();
+ this.getBaseMetaTileEntity()
+ .setActive(true);
+
+ 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);
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ public World getWorld() {
+ return this.getBaseMetaTileEntity()
+ .getWorld();
+ }
+
+ @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));
+ }
+
+ @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))
+ .widget(new SlotWidget(new BaseSlot(this.inventoryHandler, 1) {
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ }).setBackground(
+ this.getGUITextureSet()
+ .getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(127, 13))
+ .widget(new SlotWidget(new BaseSlot(this.inventoryHandler, 0) {
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ }).setBackground(
+ this.getGUITextureSet()
+ .getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_CHARGER)
+ .setPos(127, 49));
+ for (int i = 0; i < 4; i++) {
+ builder.widget(
+ new SlotWidget(this.circuitsInventoryHandler, i).setBackground(
+ this.getGUITextureSet()
+ .getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
+ .setPos(151, 4 + i * 18));
+ }
+
+ final DynamicPositionedColumn screenElements = new DynamicPositionedColumn();
+ this.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) this.getBaseMetaTileEntity()
+ .getStoredEU() / this.getBaseMetaTileEntity()
+ .getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(BW_UITextures.PROGRESSBAR_STORED_EU_116, 116)
+ .setPos(8, 73)
+ .setSize(116, 5));
+ }
+
+ private long clientEU;
+ private long clientMaxEU;
+ private long clientMaxIn;
+ private long clientMaxOut;
+ private long clientAmps;
+
+ private void drawTexts(DynamicPositionedColumn screenElements) {
+ screenElements.setSpace(0)
+ .setPos(11, 8);
+
+ screenElements.widget(
+ new TextWidget().setStringSupplier(() -> "EU: " + numberFormat.format(this.clientEU))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get()))
+ .widget(
+ new FakeSyncWidget.LongSyncer(
+ () -> this.getBaseMetaTileEntity()
+ .getStoredEU(),
+ val -> clientEU = val))
+ .widget(
+ new TextWidget().setStringSupplier(() -> "MAX: " + numberFormat.format(clientMaxEU))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get()))
+ .widget(
+ new FakeSyncWidget.LongSyncer(
+ () -> this.getBaseMetaTileEntity()
+ .isActive()
+ ? this.getBaseMetaTileEntity()
+ .getOutputVoltage() * ConfigHandler.energyPerCell
+ : 0,
+ val -> clientMaxEU = val))
+ .widget(
+ new TextWidget().setStringSupplier(() -> "MAX EU/t IN: " + numberFormat.format(clientMaxIn))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get()))
+ .widget(
+ new FakeSyncWidget.LongSyncer(
+ () -> this.getBaseMetaTileEntity()
+ .getInputVoltage(),
+ val -> clientMaxIn = val))
+ .widget(
+ new TextWidget().setStringSupplier(() -> "EU/t OUT: " + numberFormat.format(clientMaxOut))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get()))
+ .widget(
+ new FakeSyncWidget.LongSyncer(
+ () -> this.getBaseMetaTileEntity()
+ .getOutputVoltage(),
+ val -> clientMaxOut = val))
+ .widget(
+ new TextWidget().setStringSupplier(() -> "AMP/t IN/OUT: " + numberFormat.format(clientAmps))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get()))
+ .widget(
+ new FakeSyncWidget.LongSyncer(
+ () -> this.getBaseMetaTileEntity()
+ .getInputAmperage(),
+ val -> clientAmps = val))
+ .widget(
+ new TextWidget(Text.localised("tooltip.LESU.0.name")).setDefaultColor(Color.YELLOW.getRGB())
+ .setEnabled(widget -> this.maxEUStore() >= Long.MAX_VALUE - 1))
+ .widget(
+ new TextWidget(Text.localised("tooltip.LESU.1.name")).setDefaultColor(Color.RED.getRGB())
+ .setEnabled(
+ widget -> !this.getBaseMetaTileEntity()
+ .isActive()));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java
new file mode 100644
index 0000000000..b481429411
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry.BW_BLOCKS;
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_Values.V;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW;
+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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+
+public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_ManualTrafo> {
+
+ private byte mode;
+ private int mTiers;
+ private boolean upstep = true;
+
+ public GT_TileEntity_ManualTrafo(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_ManualTrafo(String aName) {
+ super(aName);
+ }
+
+ private static final int CASING_INDEX = 2;
+ private static final String STRUCTURE_PIECE_BASE = "base";
+ 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 || !(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;
+ }
+ 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() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @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")
+ .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")
+ .addCasingInfoMin("MV Machine Casing", 0, false)
+ .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---------")
+ .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")
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (!this.getBaseMetaTileEntity()
+ .isAllowedToWork()) this.stopMachine();
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ if (!this.getBaseMetaTileEntity()
+ .isAllowedToWork()) {
+ this.stopMachine();
+ return false;
+ }
+
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 1;
+
+ if (this.getBaseMetaTileEntity()
+ .getTimer() % 40 == 0) if (this.mEfficiency < this.getMaxEfficiency(null)) this.mEfficiency += 100;
+ else this.mEfficiency = this.getMaxEfficiency(null);
+
+ if (this.mode > 1) {
+ return false; // this.onRunningTickTabbedMode(); Tapped mode is disable
+ }
+
+ return this.drainEnergyInput(this.getInputTier() * 2 * this.mEnergyHatches.size()) && this.addEnergyOutput(
+ this.getInputTier() * 2 * this.mEnergyHatches.size() * this.mEfficiency / this.getMaxEfficiency(null));
+ }
+
+ public boolean onRunningTickTabbedMode() {
+ boolean ret = false;
+ for (GT_MetaTileEntity_Hatch_Dynamo E : this.mDynamoHatches) {
+ for (GT_MetaTileEntity_Hatch_Energy I : this.mEnergyHatches) {
+
+ long vtt = I.getEUVar() >= V[E.mTier] / 2 && E.getEUVar() < E.maxEUStore() ? I.getEUVar() : 0;
+
+ if (vtt == 0) continue;
+
+ long vtp = E.getEUVar() + vtt;
+ long avt = Math.min(vtp, E.maxEUStore());
+ E.setEUVar(avt);
+ I.setEUVar(I.getEUVar() - vtt);
+ ret = true;
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public long getInputTier() {
+ if (this.mEnergyHatches.size() > 0) return GT_Utility.getTier(
+ this.mEnergyHatches.get(0)
+ .getBaseMetaTileEntity()
+ .getInputVoltage());
+ return 0L;
+ }
+
+ @Override
+ public long getOutputTier() {
+ if (this.mDynamoHatches.size() > 0) return GT_Utility.getTier(
+ this.mDynamoHatches.get(0)
+ .getBaseMetaTileEntity()
+ .getOutputVoltage());
+ return 0L;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack itemStack) {
+
+ if (!this.getBaseMetaTileEntity()
+ .isAllowedToWork()) {
+ this.stopMachine();
+ return false;
+ }
+ if (itemStack == null || !itemStack.getUnlocalizedName()
+ .startsWith("gt.integrated_circuit")) this.mode = 0;
+ else this.mode = (byte) Math.min(3, itemStack.getItemDamage());
+ this.upstep = this.mode % 2 == 0;
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 1;
+ this.mEfficiency = Math.max(this.mEfficiency, 100);
+ return this.upstep ? this.getOutputTier() - this.getInputTier() == this.mTiers
+ : this.getInputTier() - this.getOutputTier() == this.mTiers;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+
+ if (itemStack == null || !itemStack.getUnlocalizedName()
+ .startsWith("gt.integrated_circuit")) this.mode = 0;
+ else this.mode = (byte) Math.min(3, itemStack.getItemDamage());
+
+ this.upstep = this.mode % 2 == 0;
+ boolean tapmode = this.mode > 1;
+
+ if (!this.checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0) || this.mEnergyHatches.size() == 0) return false;
+
+ byte intier = this.mEnergyHatches.get(0).mTier;
+ for (GT_MetaTileEntity_Hatch_Energy in : this.mEnergyHatches) if (in.mTier != intier) return false;
+
+ int mHeight;
+ for (mHeight = 1; mHeight <= 8; mHeight++) {
+ if (tapmode) {
+ this.mTiers = mHeight;
+ if (!this.checkPiece(STRUCTURE_PIECE_TAP_LAYER, 2, mHeight, 1)) break;
+ } else if (!this.checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0)) break;
+ }
+ if (!this.checkPiece(STRUCTURE_PIECE_TOP, 1, mHeight, 0)) return false;
+ this.mTiers = mHeight - 1;
+
+ if (this.mDynamoHatches.size() == 0 || this.mMaintenanceHatches.size() != 1 || this.mTiers == 0) return false;
+
+ byte outtier = this.mDynamoHatches.get(0).mTier;
+ for (GT_MetaTileEntity_Hatch_Dynamo out : this.mDynamoHatches) {
+ if (out.mTier != outtier) return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_ManualTrafo(this.mName);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound ntag) {
+ super.saveNBTData(ntag);
+ ntag.setInteger("mTiers", this.mTiers);
+ ntag.setByte("mMode", this.mode);
+ ntag.setBoolean("upstep", this.upstep);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound ntag) {
+ super.loadNBTData(ntag);
+ this.mTiers = ntag.getInteger("mTiers");
+ this.mode = ntag.getByte("mMode");
+ this.upstep = ntag.getBoolean("upstep");
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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) };
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean b) {
+ 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;
+ this.buildPiece(STRUCTURE_PIECE_BASE, itemStack, b, 1, 0, 0);
+ for (int i = 0; i < mHeight; i++) {
+ if (tapmode) this.buildPiece(STRUCTURE_PIECE_TAP_LAYER, itemStack, b, 2, i + 1, 1);
+ else this.buildPiece(STRUCTURE_PIECE_LAYER, itemStack, b, 1, i + 1, 0);
+ }
+ this.buildPiece(STRUCTURE_PIECE_TOP, itemStack, b, 1, mHeight + 1, 0);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java
new file mode 100644
index 0000000000..e7a2b090c9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java
@@ -0,0 +1,413 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass;
+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.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+
+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 int HELIUM_NEEDED = 730000;
+ private static final int powerUsage = (int) TierEU.RECIPE_IV / 2;
+ private static final int maxcapacity = 675000;
+ private static final int mincapacity = 100000;
+ private int HeliumSupply;
+ private int fuelsupply;
+ private boolean empty;
+ private int coolanttaking = 0;
+ private int mCasing = 0;
+
+ public GT_TileEntity_THTR(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ private GT_TileEntity_THTR(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_THTR> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("High Temperature Reactor")
+ .addInfo("Controller block for the Thorium High Temperature Reactor (THTR)")
+ .addInfo("Needs to be primed with " + GT_Utility.formatNumbers(HELIUM_NEEDED) + " of helium")
+ .addInfo("Needs a constant supply of coolant while running")
+ .addInfo("Needs at least 100k Fuel pebbles to start operation (can hold up to 675k pebbles)")
+ .addInfo("Consumes up to 0.5% of total Fuel Pellets per Operation depending on efficiency")
+ .addInfo("Efficiency decreases exponentially if the internal buffer is not completely filled")
+ .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 hours")
+ .addSeparator()
+ .beginStructureBlock(11, 12, 11, true)
+ .addController("Front bottom center")
+ .addCasingInfoMin("Radiation Proof Casings", 500, false)
+ .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)
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 5, 11, 0);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ this.mCasing = 0;
+ return this.checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && this.mCasing >= 500
+ && this.mMaintenanceHatches.size() == 1
+ && this.mInputHatches.size() > 0
+ && this.mOutputHatches.size() > 0
+ && this.mInputBusses.size() > 0
+ && this.mOutputBusses.size() > 0
+ && this.mEnergyHatches.size() > 0;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.HeliumSupply = aNBT.getInteger("HeliumSupply");
+ this.fuelsupply = aNBT.getInteger("fuelsupply");
+ this.coolanttaking = aNBT.getInteger("coolanttaking");
+ this.empty = aNBT.getBoolean("EmptyMode");
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("HeliumSupply", this.HeliumSupply);
+ aNBT.setInteger("fuelsupply", this.fuelsupply);
+ aNBT.setInteger("coolanttaking", this.coolanttaking);
+ aNBT.setBoolean("EmptyMode", this.empty);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (aBaseMetaTileEntity.isServerSide() && !this.empty) {
+ if (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED) {
+ for (FluidStack fluidStack : this.getStoredFluids()) {
+ if (fluidStack.isFluidEqual(Materials.Helium.getGas(1))) {
+ int toget = Math.min(GT_TileEntity_THTR.HELIUM_NEEDED - this.HeliumSupply, fluidStack.amount);
+ fluidStack.amount -= toget;
+ this.HeliumSupply += toget;
+ if (GT_TileEntity_THTR.HELIUM_NEEDED == this.HeliumSupply && fluidStack.amount == 0)
+ fluidStack = null;
+ }
+ }
+ }
+ if (this.fuelsupply < maxcapacity) {
+ this.startRecipeProcessing();
+ for (ItemStack itemStack : this.getStoredInputs()) {
+ if (GT_Utility.areStacksEqual(
+ itemStack,
+ new ItemStack(THTRMaterials.aTHTR_Materials, 1, THTRMaterials.MATERIAL_FUEL_INDEX))) {
+ int toget = Math.min(maxcapacity - this.fuelsupply, itemStack.stackSize);
+ if (toget == 0) continue;
+ itemStack.stackSize -= toget;
+ this.fuelsupply += toget;
+ }
+ }
+ this.endRecipeProcessing();
+ this.updateSlots();
+ }
+ }
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack controllerStack) {
+
+ if (this.empty) {
+ if (this.HeliumSupply > 0 || this.fuelsupply > 0) {
+ this.mEfficiency = 10000;
+ this.mMaxProgresstime = 100;
+ return true;
+ }
+ return false;
+ }
+ if (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED || this.fuelsupply < mincapacity) return false;
+
+ double eff = Math
+ .min(Math.pow((this.fuelsupply - mincapacity) / ((maxcapacity - mincapacity) / 10D), 2D) + 1, 100D) / 100D
+ - (this.getIdealStatus() - this.getRepairStatus()) / 10D;
+ if (eff <= 0D) return false;
+
+ int toReduce = MathUtils.floorInt(this.fuelsupply * 0.005D * eff);
+
+ final int originalToReduce = toReduce;
+ int burnedballs = toReduce / 64;
+ if (burnedballs > 0) toReduce -= burnedballs * 64;
+
+ int meta = THTRMaterials.MATERIAL_USED_FUEL_INDEX;
+
+ ItemStack[] toOutput = { new ItemStack(THTRMaterials.aTHTR_Materials, burnedballs, meta),
+ new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1) };
+ if (!this.canOutputAll(toOutput)) return false;
+
+ this.fuelsupply -= originalToReduce;
+ this.mOutputItems = toOutput;
+
+ // this.updateSlots(); not needed ?
+
+ this.coolanttaking = (int) (4800D * eff);
+ this.mEfficiency = (int) (eff * 10000D);
+ this.mEUt = -powerUsage;
+ this.mMaxProgresstime = 648000;
+ return true;
+ }
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+
+ if (this.empty) {
+ this.addOutput(Materials.Helium.getGas(this.HeliumSupply));
+ this.addOutput(
+ new ItemStack(THTRMaterials.aTHTR_Materials, this.fuelsupply, THTRMaterials.MATERIAL_FUEL_INDEX));
+ this.HeliumSupply = 0;
+ this.fuelsupply = 0;
+ this.updateSlots();
+ return true;
+ }
+
+ if (!super.onRunningTick(aStack)) return false;
+
+ int takecoolant = this.coolanttaking;
+ int drainedamount = 0;
+
+ for (GT_MetaTileEntity_Hatch_Input tHatch : filterValidMTEs(mInputHatches)) {
+ FluidStack tLiquid = tHatch.getFluid();
+ if (tLiquid != null && tLiquid.isFluidEqual(FluidRegistry.getFluidStack("ic2coolant", 1))) {
+ FluidStack drained = tHatch.drain(takecoolant, true);
+ takecoolant -= drained.amount;
+ drainedamount += drained.amount;
+ if (takecoolant <= 0) break;
+ }
+ }
+
+ if (drainedamount > 0) this.addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", drainedamount));
+
+ this.updateSlots();
+
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_THTR(this.mName);
+ }
+
+ @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 : this.coolanttaking) + "L/t",
+ "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus()) };
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ if (aActive) 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_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ }
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(GT_TileEntity_THTR.BASECASINGINDEX) };
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (this.mMaxProgresstime > 0) {
+ GT_Utility.sendChatToPlayer(aPlayer, "THTR mode cannot be changed while the machine is running.");
+ return;
+ }
+ this.empty = !this.empty;
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ "THTR is now running in " + (this.empty ? "emptying mode." : "normal Operation"));
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ public static class THTRMaterials {
+
+ public static final SimpleSubItemClass aTHTR_Materials = new SimpleSubItemClass(
+ "BISOPelletCompound", // 0
+ "BISOPelletBall", // 1
+ "TRISOPelletCompound", // 2
+ "TRISOPelletBall", // 3
+ "TRISOPellet", // 4
+ "BurnedOutTRISOPelletBall", // 5
+ "BurnedOutTRISOPellet" // 6
+ );
+ public static final int MATERIAL_FUEL_INDEX = 4;
+ public static final int MATERIAL_USED_FUEL_INDEX = 5;
+
+ public static void registeraTHR_Materials() {
+ GameRegistry.registerItem(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, "bw.THTRMaterials");
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
new file mode 100644
index 0000000000..a1e1f1fd46
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
@@ -0,0 +1,641 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofTileAdder;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+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.Item;
+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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+import com.gtnewhorizon.structurelib.structure.IStructureElementNoPlacement;
+import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizons.modularui.api.drawable.ItemDrawable;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+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;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.modularui.GUITextureSet;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.modularui.IGetTitleColor;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.objects.ItemData;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.render.TextureFactory;
+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 gregtech.common.items.GT_MetaGenerated_Tool_01;
+
+public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_Windmill>
+ implements ISurvivalConstructable, IGetTitleColor {
+
+ private static final IIcon[] iIcons = new IIcon[2];
+ private static final IIconContainer[] iIconContainers = new IIconContainer[2];
+ private static final ITexture[] iTextures = new ITexture[3];
+
+ private BW_RotorBlock rotorBlock;
+ private int mDoor = 0;
+ private int mHardenedClay = 0;
+ private int mMulti = 16;
+
+ public GT_TileEntity_Windmill(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ private GT_TileEntity_Windmill(String aName) {
+ super(aName);
+ }
+
+ 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 this.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 this.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 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 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() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @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")
+ .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("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")
+ .addCasingInfoMin("Hardened Clay block", 40, false)
+ .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);
+ return tt;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ private final Set<TileEntityDispenser> tileEntityDispensers = new HashSet<>();
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ if (this.mMaxProgresstime > 0) this.mProgresstime += this.rotorBlock.getGrindPower();
+ if (!this.rotorBlock.rotorSlot.isEmpty()) this.setRotorDamage(this.rotorBlock, this.rotorBlock.getGrindPower());
+ return this.rotorBlock.getGrindPower() > 0;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
+ ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean doRandomMaintenanceDamage() {
+ return true;
+ }
+
+ private float[] multiplierRecipe(ItemStack itemStack) {
+ // will return max and min value of the multiplier, the average of these is used to calculate the multiplier.
+ final Item item = itemStack.getItem();
+ if (item == Items.wheat) {
+ return new float[] { 1.13f, 1.5f };
+ }
+ final Block block = Block.getBlockFromItem(item);
+ if (item == Items.bone || block == Blocks.glowstone || block == Blocks.pumpkin) {
+ return new float[] { 0.8f, 1f };
+ }
+ if (block == Blocks.gravel || block == Blocks.cobblestone
+ || block == Blocks.stone
+ || block == Blocks.sandstone
+ || block == Blocks.clay
+ || block == Blocks.hardened_clay
+ || block == Blocks.stained_hardened_clay
+ || block == Blocks.wool
+ || block == Blocks.netherrack
+ || block == Blocks.log
+ || block == Blocks.log2) {
+ return new float[] { 1f, 1.5f };
+ }
+ final ItemData association = GT_OreDictUnificator.getAssociation(itemStack);
+ final OrePrefixes prefix = association == null ? null : association.mPrefix;
+ if (prefix == null || association.mMaterial == null
+ || association.mMaterial.mMaterial == null
+ || association.mMaterial.mMaterial.getDust(1) == null) {
+ return new float[] { 1f, 1f };
+ }
+ if (OrePrefixes.ore == prefix || OrePrefixes.oreNetherrack == prefix
+ || OrePrefixes.oreEndstone == prefix
+ || OrePrefixes.oreBlackgranite == prefix
+ || OrePrefixes.oreRedgranite == prefix
+ || OrePrefixes.oreMarble == prefix
+ || OrePrefixes.oreBasalt == prefix) {
+ return new float[] { 0.5f, 1f };
+ }
+ if (OrePrefixes.stone == prefix || OrePrefixes.stoneBricks == prefix
+ || OrePrefixes.stoneChiseled == prefix
+ || OrePrefixes.stoneCobble == prefix
+ || OrePrefixes.stoneCracked == prefix
+ || OrePrefixes.stoneMossy == prefix
+ || OrePrefixes.stoneMossyBricks == prefix
+ || OrePrefixes.stoneSmooth == prefix
+ || OrePrefixes.cobblestone == prefix) {
+ return new float[] { 1f, 1.5f };
+ }
+ return new float[] { 1f, 1f };
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack itemStack) {
+ if (itemStack == null || itemStack.getItem() == null) return false;
+
+ if (this.mOutputItems == null) this.mOutputItems = new ItemStack[2];
+
+ GT_Recipe tRecipe = RecipeMaps.maceratorRecipes
+ .findRecipe(this.getBaseMetaTileEntity(), false, false, V[1], null, itemStack);
+ if (tRecipe == null) {
+ return false;
+ }
+
+ if (tRecipe.getOutput(0) != null) {
+ // Decrease input stack by appropriate amount (Not always 1)
+ for (int i = 0; i < this.mMulti; i++) {
+ if (!tRecipe.isRecipeInputEqual(true, null, itemStack)) {
+ this.mMulti = i;
+ break;
+ }
+ }
+ this.updateSlots();
+ this.mOutputItems[0] = tRecipe.getOutput(0);
+ float[] mRecipe = this.multiplierRecipe(itemStack);
+ float multiper = Math.min(
+ mRecipe[1],
+ Math.max(
+ mRecipe[0],
+ 2f * (float) Math.sqrt((float) 1 / (this.rotorBlock.getWindStrength() + 1))
+ * this.OutputMultiplier(this.rotorBlock)
+ * (mRecipe[0] + mRecipe[1])));
+ int amount = (int) Math.floor(multiper * (this.mOutputItems[0].stackSize * this.mMulti));
+
+ // Split ItemStack --by gtpp
+ List<ItemStack> splitStacks = new ArrayList<>();
+ while (amount > this.mOutputItems[0].getMaxStackSize()) {
+ ItemStack tmp = this.mOutputItems[0].copy();
+ tmp.stackSize = this.mOutputItems[0].getMaxStackSize();
+ amount -= this.mOutputItems[0].getMaxStackSize();
+ splitStacks.add(tmp);
+ }
+ ItemStack tmp = this.mOutputItems[0].copy();
+ tmp.stackSize = amount;
+ splitStacks.add(tmp);
+ this.mOutputItems = splitStacks.toArray(new ItemStack[splitStacks.size()]);
+ }
+ this.mMaxProgresstime = tRecipe.mDuration * 2 * 100 * this.mMulti / this.getSpeed(this.rotorBlock);
+ this.mMulti = 16;
+ return true;
+ }
+
+ @Override
+ public void stopMachine() {
+ this.getBaseMetaTileEntity()
+ .disableWorking();
+ }
+
+ public boolean addDispenserToOutputSet(TileEntity aTileEntity) {
+ if (aTileEntity instanceof TileEntityDispenser) {
+ this.tileEntityDispensers.add((TileEntityDispenser) aTileEntity);
+ return true;
+ }
+ return false;
+ }
+
+ public boolean setRotorBlock(TileEntity aTileEntity) {
+ if (aTileEntity instanceof BW_RotorBlock) {
+ this.rotorBlock = (BW_RotorBlock) aTileEntity;
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean addOutput(ItemStack aStack) {
+ if (GT_Utility.isStackInvalid(aStack)) return false;
+
+ 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 (GT_Utility.areStacksEqual(tHatch.getStackInSlot(i), aStack)) {
+ ItemStack merge = tHatch.getStackInSlot(i)
+ .copy();
+ merge.stackSize = aStack.stackSize + tHatch.getStackInSlot(i).stackSize;
+ tHatch.setInventorySlotContents(i, merge);
+ } else {
+ tHatch.setInventorySlotContents(i, aStack.copy());
+ }
+
+ if (GT_Utility.areStacksEqual(tHatch.getStackInSlot(i), aStack)) {
+ aStack = null;
+ return true;
+ }
+ tHatch.setInventorySlotContents(i, null);
+ aStack = null;
+ return false;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+
+ this.tileEntityDispensers.clear();
+ this.mDoor = 0;
+ this.mHardenedClay = 0;
+
+ if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 3, 11, 0) || this.tileEntityDispensers.isEmpty()
+ || this.mDoor > 2
+ || this.mHardenedClay < 40) return false;
+
+ this.mWrench = true;
+ this.mScrewdriver = true;
+ this.mSoftHammer = true;
+ this.mHardHammer = true;
+ this.mSolderingTool = true;
+ this.mCrowbar = true;
+
+ return true;
+ }
+
+ @Override
+ public int getCurrentEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public void updateSlots() {
+ if (this.mInventory[1] != null && this.mInventory[1].stackSize <= 0) {
+ this.mInventory[1] = null;
+ }
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_Windmill(this.mName);
+ }
+
+ @Override
+ public String[] getInfoData() {
+ return new String[] { "Progress:",
+ this.mProgresstime + " Grindings of " + this.mMaxProgresstime + " needed Grindings", "GrindPower:",
+ this.rotorBlock.getGrindPower() + "KU/t" };
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ 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];
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return null;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return new ResourceLocation("brick");
+ }
+ };
+
+ 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];
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return null;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return new ResourceLocation(MainMod.MOD_ID + ":windmill_top");
+ }
+ };
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+
+ ITexture[] ret = new ITexture[6];
+
+ if (this.isClientSide()) {
+
+ if (facing == side || side == ForgeDirection.DOWN) {
+ GT_TileEntity_Windmill.iTextures[0] = TextureFactory.of(GT_TileEntity_Windmill.iIconContainers[0]);
+ Arrays.fill(ret, GT_TileEntity_Windmill.iTextures[0]);
+ } else if (side == ForgeDirection.UP) {
+ GT_TileEntity_Windmill.iTextures[1] = TextureFactory.of(GT_TileEntity_Windmill.iIconContainers[1]);
+ Arrays.fill(ret, GT_TileEntity_Windmill.iTextures[1]);
+ } else {
+ GT_TileEntity_Windmill.iTextures[2] = TextureFactory.of(Textures.BlockIcons.COVER_WOOD_PLATE);
+ Arrays.fill(ret, GT_TileEntity_Windmill.iTextures[2]);
+ }
+ }
+ return ret;
+ }
+
+ public boolean isClientSide() {
+ 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;
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean b) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 3, 11, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
+ if (this.mMachine) return -1;
+ return this.survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 3, 11, 0, elementBudget, env, false, true);
+ }
+
+ public float OutputMultiplier(BW_RotorBlock rotorBlock) {
+ try {
+ return ((BW_Stonage_Rotors) rotorBlock.rotorSlot.get()
+ .getItem()).getmRotor();
+ } catch (Exception e) {
+ return 1f;
+ }
+ }
+
+ public int getSpeed(BW_RotorBlock rotorBlock) {
+ try {
+ return ((BW_Stonage_Rotors) rotorBlock.rotorSlot.get()
+ .getItem()).getSpeed();
+ } catch (Exception e) {
+ return 1;
+ }
+ }
+
+ public void setRotorDamage(BW_RotorBlock rotorBlock, int damage) {
+ try {
+ ((BW_Stonage_Rotors) rotorBlock.rotorSlot.get()
+ .getItem()).damageItemStack(rotorBlock.rotorSlot.get(), damage);
+ } catch (Exception e) {
+ rotorBlock.rotorSlot.damage(damage, false);
+ }
+ }
+
+ @Override
+ public GUITextureSet getGUITextureSet() {
+ 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);
+ }
+
+ @Override
+ public void addGregTechLogo(ModularWindow.Builder builder) {
+ builder.widget(
+ new DrawableWidget().setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setSize(47, 21)
+ .setPos(123, 59));
+ }
+
+ @Override
+ public int getTitleColor() {
+ return this.COLOR_TITLE_WHITE.get();
+ }
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ builder.widget(
+ new SlotWidget(this.inventoryHandler, 1).setBackground(
+ this.getGUITextureSet()
+ .getItemSlot())
+ .setPos(59, 35))
+ .widget(new DrawableWidget() {
+
+ private static final int DIVIDER = 125;
+
+ @Override
+ public void onScreenUpdate() {
+ super.onScreenUpdate();
+ if (GT_TileEntity_Windmill.this.mMaxProgresstime > 0) {
+ if (System.currentTimeMillis() / DIVIDER % 40 == 30)
+ this.setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[3]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 20)
+ this.setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[2]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 10)
+ this.setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[1]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 0)
+ this.setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[0]);
+ } else {
+ this.setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY);
+ }
+ }
+ }.setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY)
+ .setPos(85, 27)
+ .setSize(32, 32))
+ .widget(new FakeSyncWidget.IntegerSyncer(() -> this.mMaxProgresstime, val -> this.mMaxProgresstime = val))
+ .widget(
+ new ItemDrawable(
+ () -> this.mMachine && !this.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(
+ () -> this.getBaseMetaTileEntity()
+ .isActive(),
+ val -> this.getBaseMetaTileEntity()
+ .setActive(val)))
+ .widget(
+ new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
+ .setDefaultColor(this.COLOR_TEXT_WHITE.get())
+ .setMaxWidth(150)
+ .setEnabled(widget -> !this.mMachine)
+ .setPos(92, 22))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> this.mMachine, val -> this.mMachine = val));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
new file mode 100644
index 0000000000..c8ea85d182
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
@@ -0,0 +1,428 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.withChannel;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import javax.annotation.Nonnull;
+
+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.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IItemSource;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.HeatingCoilLevel;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.check.CheckRecipeResultRegistry;
+import gregtech.api.render.TextureFactory;
+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;
+
+public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaBlastFurnace>
+ 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)
+ .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.glassTier = t, te -> te.glassTier)))
+ .addElement(
+ 'b',
+ buildHatchAdder(GT_TileEntity_MegaBlastFurnace.class)
+ .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy.or(ExoticEnergy))
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
+ .build();
+
+ private static String[][] createShape() {
+ String[][] raw = new String[20][];
+
+ raw[0] = new String[15];
+ String topCasing = "ttttttttttttttt";
+ String middleTopCasing = "tttttttmttttttt";
+ raw[0][0] = topCasing;
+ for (int i = 1; i < 15; i++) {
+ raw[0][i] = topCasing;
+ }
+ raw[0][7] = middleTopCasing;
+
+ raw[1] = new String[15];
+ String allGlass = "ggggggggggggggg";
+ String allCoil = "gCCCCCCCCCCCCCg";
+ String middleLine = "gC===========Cg";
+ raw[1][0] = allGlass;
+ raw[1][1] = allCoil;
+ raw[1][13] = allCoil;
+ raw[1][14] = allGlass;
+ for (int i = 2; i < 13; i++) {
+ raw[1][i] = middleLine;
+ }
+ for (int i = 2; i < 19; i++) {
+ raw[i] = raw[1];
+ }
+ String bottomCasing = "bbbbbbbbbbbbbbb";
+ raw[19] = new String[15];
+ for (int i = 0; i < 15; i++) {
+ raw[19][i] = bottomCasing;
+ }
+
+ raw[17] = Arrays.copyOf(raw[17], raw[17].length);
+ raw[17][0] = "ggggggg~ggggggg";
+
+ return transpose(raw);
+ }
+
+ 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) };
+ private int mHeatingCapacity;
+ private byte glassTier;
+ private final static int polPtick = ConfigHandler.basePollutionMBFSecond / 20 * ConfigHandler.megaMachinesMax;
+
+ public GT_TileEntity_MegaBlastFurnace(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_MegaBlastFurnace(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_TileEntity_MegaBlastFurnace(this.mName);
+ }
+
+ @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")
+ .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 allows for an overclock to be upgraded to a perfect overclock.")
+ .addInfo("That means the EBF will reduce recipe time by a factor 4 instead of 2 (giving 100% efficiency).")
+ .addInfo("Additionally gives +100K for every tier past MV")
+ .addPollutionAmount(20 * this.getPollutionPerTick(null))
+ .addSeparator()
+ .beginStructureBlock(15, 20, 15, true)
+ .addController("3rd layer center")
+ .addCasingInfoRange("Heat Proof Machine Casing", 0, 279, false)
+ .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")
+ .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")
+ .addStructureHint("This Mega Multiblock is too big to have its structure hologram displayed fully.")
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.glassTier = aNBT.getByte("glasTier");
+ if (!aNBT.hasKey(INPUT_SEPARATION_NBT_KEY)) {
+ this.inputSeparation = aNBT.getBoolean("isBussesSeparate");
+ }
+ if (!aNBT.hasKey(BATCH_MODE_NBT_KEY)) {
+ this.batchMode = aNBT.getBoolean("mUseMultiparallelMode");
+ }
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (!aPlayer.isSneaking()) {
+ this.inputSeparation = !this.inputSeparation;
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + this.inputSeparation);
+ return true;
+ }
+ this.batchMode = !this.batchMode;
+ if (this.batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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] };
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setByte("glasTier", this.glassTier);
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return polPtick;
+ }
+
+ public boolean addOutputHatchToTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return this.mPollutionOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ @Override
+ protected String[] getExtendedInfoData() {
+ return new String[] { StatCollector.translateToLocal("GT5U.EBF.heat") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(this.mHeatingCapacity)
+ + EnumChatFormatting.RESET
+ + " K" };
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic() {
+
+ @Nonnull
+ @Override
+ protected GT_OverclockCalculator createOverclockCalculator(@Nonnull GT_Recipe recipe) {
+ return super.createOverclockCalculator(recipe).setRecipeHeat(recipe.mSpecialValue)
+ .setMachineHeat(GT_TileEntity_MegaBlastFurnace.this.mHeatingCapacity)
+ .setHeatOC(true)
+ .setHeatDiscount(true);
+ }
+
+ @Override
+ protected @Nonnull CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) {
+ return recipe.mSpecialValue <= GT_TileEntity_MegaBlastFurnace.this.mHeatingCapacity
+ ? CheckRecipeResultRegistry.SUCCESSFUL
+ : CheckRecipeResultRegistry.insufficientHeat(recipe.mSpecialValue);
+ }
+ }.setMaxParallel(ConfigHandler.megaMachinesMax);
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && f.isNotFlipped();
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_MegaBlastFurnace> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ this.buildPiece("main", stackSize, hintsOnly, 7, 17, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) {
+ if (this.mMachine) return -1;
+ int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
+ this.glassTier = 0;
+ this.setCoilLevel(HeatingCoilLevel.None);
+ return this.survivialBuildPiece("main", stackSize, 7, 17, 0, realBudget, source, actor, false, true);
+ }
+
+ public void setCoilLevel(HeatingCoilLevel aCoilLevel) {
+ this.mCoilLevel = aCoilLevel;
+ }
+
+ public HeatingCoilLevel getCoilLevel() {
+ return this.mCoilLevel;
+ }
+
+ @Override
+ public boolean addOutput(FluidStack aLiquid) {
+ if (aLiquid == null) return false;
+ FluidStack tLiquid = aLiquid.copy();
+ boolean isOutputPollution = false;
+ for (FluidStack pollutionFluidStack : this.pollutionFluidStacks) {
+ if (!tLiquid.isFluidEqual(pollutionFluidStack)) continue;
+
+ isOutputPollution = true;
+ break;
+ }
+ ArrayList<GT_MetaTileEntity_Hatch_Output> tOutputHatches;
+ if (isOutputPollution) {
+ tOutputHatches = this.mPollutionOutputHatches;
+ int pollutionReduction = 0;
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : filterValidMTEs(mMufflerHatches)) {
+ pollutionReduction = 100 - tHatch.calculatePollutionReduction(100);
+ break;
+ }
+ tLiquid.amount = tLiquid.amount * pollutionReduction / 100;
+ } else {
+ tOutputHatches = this.mOutputHatches;
+ }
+ return dumpFluid(tOutputHatches, tLiquid, true) || dumpFluid(tOutputHatches, tLiquid, false);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
+ this.mHeatingCapacity = 0;
+ this.glassTier = 0;
+
+ this.setCoilLevel(HeatingCoilLevel.None);
+
+ this.mPollutionOutputHatches.clear();
+
+ if (!this.checkPiece("main", 7, 17, 0) || this.getCoilLevel() == HeatingCoilLevel.None
+ || this.mMaintenanceHatches.size() != 1) return false;
+
+ if (this.glassTier < 8) {
+ for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
+ GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i);
+ if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) {
+ return false;
+ }
+ if (this.glassTier < hatch.mTier) {
+ return false;
+ }
+ }
+ for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
+ if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ return false;
+ }
+ }
+ }
+
+ this.mHeatingCapacity = (int) this.getCoilLevel()
+ .getHeat() + 100 * (BW_Util.getTier(this.getMaxInputEu()) - 2);
+
+ return true;
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return RecipeMaps.blastFurnaceRecipes;
+ }
+
+ @Override
+ public int getRecipeCatalystPriority() {
+ return -2;
+ }
+
+ @Override
+ public boolean supportsInputSeparation() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
new file mode 100644
index 0000000000..4b11f8d500
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+
+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.common.util.ForgeDirection;
+
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IItemSource;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+
+public class GT_TileEntity_MegaChemicalReactor
+ extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaChemicalReactor> implements ISurvivalConstructable {
+
+ private byte glassTier;
+
+ public GT_TileEntity_MegaChemicalReactor(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_MegaChemicalReactor(String aName) {
+ super(aName);
+ }
+
+ @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")
+ .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")
+ .addStructureInfo("46x Chemically Inert Machine Casing (minimum)")
+ .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)
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_TileEntity_MegaChemicalReactor(this.mName);
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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] };
+ }
+
+ @Override
+ public boolean supportsSingleRecipeLocking() {
+ return true;
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return RecipeMaps.multiblockChemicalReactorRecipes;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ if (!aNBT.hasKey(BATCH_MODE_NBT_KEY)) {
+ this.batchMode = aNBT.getBoolean("mUseMultiparallelMode");
+ }
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ inputSeparation = !inputSeparation;
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation);
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ this.batchMode = !this.batchMode;
+ if (this.batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic().enablePerfectOverclock()
+ .setMaxParallel(ConfigHandler.megaMachinesMax);
+ }
+
+ @Override
+ public void construct(ItemStack aStack, boolean aHintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, aStack, aHintsOnly, 2, 2, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) {
+ if (this.mMachine) return -1;
+ int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
+ return this
+ .survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 2, 2, 0, realBudget, source, actor, false, true);
+ }
+ // -------------- TEC TECH COMPAT ----------------
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ this.glassTier = 0;
+
+ if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 0) || this.mMaintenanceHatches.size() != 1) return false;
+
+ if (this.glassTier < 8) {
+ for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
+ GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i);
+ if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) {
+ return false;
+ }
+ if (this.glassTier < hatch.mTier) {
+ return false;
+ }
+ }
+ for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
+ if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ 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',
+ buildHatchAdder(GT_TileEntity_MegaChemicalReactor.class)
+ .atLeast(Energy.or(ExoticEnergy), InputHatch, InputBus, OutputHatch, OutputBus)
+ .casingIndex(CASING_INDEX)
+ .dot(3)
+ .buildAndChain(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.glassTier = t, te -> te.glassTier))
+ .build();
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_MegaChemicalReactor> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsInputSeparation() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
new file mode 100644
index 0000000000..80bc644e9e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
@@ -0,0 +1,449 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW;
+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.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+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 gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IHatchElement;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.fluid.IFluidStore;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME;
+
+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";
+ protected static final String STRUCTURE_PIECE_TOP_HINT = "top";
+ private static final IStructureDefinition<GT_TileEntity_MegaDistillTower> STRUCTURE_DEFINITION;
+
+ static {
+ 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" }, }))
+ .addElement('=', StructureElementAirNoHint.getInstance())
+ .addElement(
+ 'b',
+ buildHatchAdder(GT_TileEntity_MegaDistillTower.class)
+ .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy.or(ExoticEnergy))
+ .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, Energy.or(ExoticEnergy))
+ .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) {
+ t.mTopState = 0;
+ return true;
+ }
+ // definitely top - cannot be air
+ return false;
+ }
+ // from here on we must be looking at a top layer, since it's not air
+ if (t.mTopState == 0)
+ // must be air but failed, so no
+ return false;
+ t.mTopState = 1;
+ // hatch adder
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ if (tileEntity instanceof IGregTechTileEntity entity && t.addLayerOutputHatch(entity, CASING_INDEX)) {
+ t.onTopLayerFound(false);
+ return true;
+ }
+ // block adder
+ if (world.getBlock(x, y, z) == GregTech_API.sBlockCasings4 && world.getBlockMetadata(x, y, z) == 1) {
+ t.onTopLayerFound(true);
+ return true;
+ }
+ return false;
+ })
+ .build();
+ }
+
+ protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
+ protected int mHeight;
+ protected int mCasing;
+ protected boolean mTopLayerFound;
+
+ // -1 => maybe top, maybe not, 0 => definitely not top, 1 => definitely top
+ private int mTopState = -1;
+
+ public GT_TileEntity_MegaDistillTower(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ private GT_TileEntity_MegaDistillTower(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_TileEntity_MegaDistillTower(this.mName);
+ }
+
+ protected void onCasingFound() {
+ this.mCasing++;
+ }
+
+ protected int getCurrentLayerOutputHatchCount() {
+ return this.mOutputHatchesByLayer.size() < this.mHeight || this.mHeight <= 0 ? 0
+ : this.mOutputHatchesByLayer.get(this.mHeight - 1)
+ .size();
+ }
+
+ protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null || aTileEntity.isDead()
+ || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) return false;
+ while (this.mOutputHatchesByLayer.size() < this.mHeight) this.mOutputHatchesByLayer.add(new ArrayList<>());
+ GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
+ tHatch.updateTexture(aBaseCasingIndex);
+ return this.mOutputHatchesByLayer.get(this.mHeight - 1)
+ .add(tHatch);
+ }
+
+ protected void onTopLayerFound(boolean aIsCasing) {
+ this.mTopLayerFound = true;
+ if (aIsCasing) this.onCasingFound();
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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) };
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return RecipeMaps.distillationTowerRecipes;
+ }
+
+ @Override
+ public int getRecipeCatalystPriority() {
+ return -1;
+ }
+
+ @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")
+ .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")
+ .addOtherStructurePart("Clean Stainless Steel Machine Casing", "15 x h - 5 (minimum)")
+ .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!")
+ .addStructureHint("The interior of this Mega Multiblock's hologram is empty, it should be all air.")
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_MegaDistillTower> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ // reset
+ this.mOutputHatchesByLayer.forEach(List::clear);
+ this.mHeight = 1;
+ this.mTopLayerFound = false;
+ this.mTopState = -1;
+
+ // check base
+ if (!this.checkPiece(STRUCTURE_PIECE_BASE, 7, 0, 0)) return false;
+
+ // check each layer
+ while (this.mHeight < 12) {
+ if (!checkPiece(STRUCTURE_PIECE_LAYER, 7, mHeight * 5, 0)) {
+ return false;
+ }
+ if (this.mOutputHatchesByLayer.size() < this.mHeight || this.mOutputHatchesByLayer.get(this.mHeight - 1)
+ .isEmpty())
+ // layer without output hatch
+ return false;
+ if (mTopLayerFound) {
+ break;
+ }
+ this.mTopState = -1;
+ // not top
+ this.mHeight++;
+ }
+
+ // validate final invariants...
+ return this.mCasing >= 75 * this.mHeight + 10 && this.mHeight >= 2
+ && this.mTopLayerFound
+ && this.mMaintenanceHatches.size() == 1;
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_BASE, stackSize, hintsOnly, 7, 0, 0);
+ 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++) {
+ this.buildPiece(STRUCTURE_PIECE_LAYER, stackSize, hintsOnly, 7, 5 * i, 0);
+ }
+ this.buildPiece(STRUCTURE_PIECE_TOP_HINT, stackSize, hintsOnly, 7, 5 * (tTotalHeight - 1), 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) {
+ if (this.mMachine) return -1;
+ int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
+ this.mHeight = 0;
+ int built = this
+ .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++) {
+ this.mHeight = i;
+ built = this.survivialBuildPiece(
+ STRUCTURE_PIECE_LAYER,
+ stackSize,
+ 7,
+ 5 * this.mHeight,
+ 0,
+ realBudget,
+ source,
+ actor,
+ false,
+ true);
+ if (built >= 0) return built;
+ }
+ this.mHeight = tTotalHeight - 1;
+ return this.survivialBuildPiece(
+ STRUCTURE_PIECE_TOP_HINT,
+ stackSize,
+ 7,
+ 5 * this.mHeight,
+ 0,
+ realBudget,
+ source,
+ actor,
+ false,
+ true);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ if (!aNBT.hasKey(BATCH_MODE_NBT_KEY)) {
+ this.batchMode = aNBT.getBoolean("mUseMultiparallelMode");
+ }
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ this.batchMode = !this.batchMode;
+ if (this.batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic().setMaxParallel(ConfigHandler.megaMachinesMax);
+ }
+
+ @Override
+ public boolean canDumpFluidToME() {
+
+ // All fluids can be dumped to ME only if each layer contains a ME Output Hatch.
+ for (List<GT_MetaTileEntity_Hatch_Output> tLayerOutputHatches : this.mOutputHatchesByLayer) {
+
+ boolean foundMEHatch = false;
+
+ for (IFluidStore tHatch : tLayerOutputHatches) {
+ if (tHatch instanceof GT_MetaTileEntity_Hatch_Output_ME) {
+ foundMEHatch = true;
+ break;
+ }
+ }
+
+ // Exit if we didn't find a valid hatch on this layer.
+ if (!foundMEHatch) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ protected void addFluidOutputs(FluidStack[] mOutputFluids2) {
+ for (int i = 0; i < mOutputFluids2.length && i < this.mOutputHatchesByLayer.size(); i++) {
+ FluidStack tStack = mOutputFluids2[i].copy();
+ if (!dumpFluid(this.mOutputHatchesByLayer.get(i), tStack, true))
+ dumpFluid(this.mOutputHatchesByLayer.get(i), tStack, false);
+ }
+ }
+
+ @Override
+ public List<? extends IFluidStore> getFluidOutputSlots(FluidStack[] toOutput) {
+ return this.getFluidOutputSlotsByLayer(toOutput, this.mOutputHatchesByLayer);
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java
new file mode 100644
index 0000000000..223ef65f77
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaMultiBlockBase.java
@@ -0,0 +1,223 @@
+package com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega;
+
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import java.util.Arrays;
+
+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.util.BW_Tooltip_Reference;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_ExtendedPowerMultiBlockBase;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
+import gregtech.api.util.GT_Utility;
+
+public abstract class GT_TileEntity_MegaMultiBlockBase<T extends GT_TileEntity_MegaMultiBlockBase<T>>
+ extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T> {
+
+ protected GT_TileEntity_MegaMultiBlockBase(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_MegaMultiBlockBase(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ // Migration code
+ if (aNBT.hasKey("lEUt")) {
+ this.lEUt = aNBT.getLong("lEUt");
+ }
+ }
+
+ protected String[] getExtendedInfoData() {
+ return new String[0];
+ }
+
+ protected long[] getCurrentInfoData() {
+ long storedEnergy = 0, maxEnergy = 0;
+ for (GT_MetaTileEntity_Hatch hatch : this.getExoticAndNormalEnergyHatchList()) {
+ storedEnergy += hatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += hatch.getBaseMetaTileEntity()
+ .getEUCapacity();
+ }
+ return new long[] { storedEnergy, maxEnergy };
+ }
+
+ @Override
+ public String[] getInfoData() {
+ int mPollutionReduction = 0;
+
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : filterValidMTEs(mMufflerHatches)) {
+ mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction);
+ }
+
+ long[] ttHatches = this.getCurrentInfoData();
+ long storedEnergy = ttHatches[0];
+ long maxEnergy = ttHatches[1];
+
+ for (GT_MetaTileEntity_Hatch_Energy tHatch : filterValidMTEs(mEnergyHatches)) {
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
+ }
+
+ long nominalV = this.getMaxInputEu();
+ String tName = BW_Util.getTierNameFromVoltage(nominalV);
+ if ("MAX+".equals(tName)) tName = EnumChatFormatting.OBFUSCATED + "MAX+";
+
+ String[] extendedInfo = this.getExtendedInfoData();
+
+ String[] baseInfo = {
+ 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(this.getMaxInputAmps())
+ + "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
+ + this.mEfficiency / 100.0F
+ + EnumChatFormatting.RESET
+ + " %",
+ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": "
+ + EnumChatFormatting.GREEN
+ + mPollutionReduction
+ + EnumChatFormatting.RESET
+ + " %" };
+
+ String[] combinedInfo = Arrays.copyOf(baseInfo, baseInfo.length + extendedInfo.length + 1);
+
+ System.arraycopy(extendedInfo, 0, combinedInfo, baseInfo.length, extendedInfo.length);
+
+ combinedInfo[combinedInfo.length - 1] = BW_Tooltip_Reference.BW;
+
+ return combinedInfo;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return true;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ protected void setProcessingLogicPower(ProcessingLogic logic) {
+ logic.setAvailableVoltage(this.getMaxInputEu());
+ logic.setAvailableAmperage(1);
+ }
+
+ protected static class StructureElementAirNoHint<T> implements IStructureElement<T> {
+
+ private static final StructureElementAirNoHint<?> INSTANCE = new StructureElementAirNoHint<>();
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElement<T> getInstance() {
+ return (IStructureElement<T>) INSTANCE;
+ }
+
+ private StructureElementAirNoHint() {}
+
+ @Override
+ public boolean check(T o, World world, int x, int y, int z) {
+ return world.isAirBlock(x, y, z);
+ }
+
+ @Override
+ public boolean spawnHint(T o, World world, int x, int y, int z, ItemStack trigger) {
+ 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);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T o, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlockToAir(x, y, z);
+ return true;
+ }
+
+ @Override
+ 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) {
+ if (this.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);
+ return PlaceResult.ACCEPT;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
new file mode 100644
index 0000000000..40ec9f814b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
@@ -0,0 +1,459 @@
+/*
+ * 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.withChannel;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import static gregtech.api.util.GT_Utility.filterValidMTEs;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IItemSource;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.HeatingCoilLevel;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.recipe.maps.OilCrackerBackend;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME;
+import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch;
+
+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',
+ withChannel(
+ "coil",
+ 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(Energy.or(ExoticEnergy), Maintenance, InputBus)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(GregTech_API.sBlockCasings4, 1))
+ .addElement(
+ 'M',
+ InputHatch.withAdder(GT_TileEntity_MegaOilCracker::addMiddleInputToMachineList)
+ .newAny(CASING_INDEX, 4))
+ .addElement(
+ 'g',
+ withChannel(
+ "glass",
+ BorosilicateGlass
+ .ofBoroGlass((byte) 0, (byte) 1, Byte.MAX_VALUE, (te, t) -> te.glassTier = t, te -> te.glassTier)))
+ .build();
+ private byte glassTier;
+ private HeatingCoilLevel heatLevel;
+ protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>();
+ protected int mInputOnSide = -1;
+ protected int mOutputOnSide = -1;
+
+ public GT_TileEntity_MegaOilCracker(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_MegaOilCracker(String aName) {
+ super(aName);
+ }
+
+ @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")
+ .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 or an input bus")
+ .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)
+ .addInputBus("Optional, for programmed circuit automation. Hint block", 1)
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_TileEntity_MegaOilCracker(this.mName);
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ if (side == facing) {
+ 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] };
+ }
+
+ @Override
+ public RecipeMap<OilCrackerBackend> getRecipeMap() {
+ return RecipeMaps.crackingRecipes;
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic() {
+
+ @Override
+ @Nonnull
+ public CheckRecipeResult process() {
+ this.setEuModifier(
+ 1.0F - Math.min(0.1F * (GT_TileEntity_MegaOilCracker.this.heatLevel.getTier() + 1), 0.5F));
+ return super.process();
+ }
+ }.setMaxParallel(ConfigHandler.megaMachinesMax);
+ }
+
+ public HeatingCoilLevel getCoilLevel() {
+ return this.heatLevel;
+ }
+
+ public void setCoilLevel(HeatingCoilLevel aCoilLevel) {
+ this.heatLevel = aCoilLevel;
+ }
+
+ @Override
+ public void construct(ItemStack aStack, boolean aHintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, aStack, aHintsOnly, 6, 6, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) {
+ if (this.mMachine) return -1;
+ int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
+ return this
+ .survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 6, 6, 0, realBudget, source, actor, false, true);
+ }
+ // -------------- TEC TECH COMPAT ----------------
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ this.glassTier = 0;
+ this.mInputOnSide = -1;
+ this.mOutputOnSide = -1;
+ this.mMiddleInputHatches.clear();
+
+ if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 6, 6, 0) || this.mMaintenanceHatches.size() != 1) return false;
+
+ if (this.glassTier < 8) {
+ for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) {
+ GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i);
+ if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) {
+ return false;
+ }
+ if (this.glassTier < hatch.mTier) {
+ return false;
+ }
+ }
+ for (int i = 0; i < this.mEnergyHatches.size(); ++i) {
+ if (this.glassTier < this.mEnergyHatches.get(i).mTier) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ private boolean addLeftHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ if (this.mInputOnSide == 1) {
+ return false;
+ }
+ this.mInputOnSide = 0;
+ this.mOutputOnSide = 1;
+ GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity;
+ tHatch.updateTexture(aBaseCasingIndex);
+ tHatch.mRecipeMap = this.getRecipeMap();
+ return this.mInputHatches.add(tHatch);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ if (this.mOutputOnSide == 1) {
+ return false;
+ }
+ this.mInputOnSide = 1;
+ this.mOutputOnSide = 0;
+ GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity;
+ tHatch.updateTexture(aBaseCasingIndex);
+ return this.mOutputHatches.add(tHatch);
+ }
+ return false;
+ }
+
+ private boolean addRightHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ if (this.mInputOnSide == 0) {
+ return false;
+ }
+ this.mInputOnSide = 1;
+ this.mOutputOnSide = 0;
+ GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity;
+ tHatch.updateTexture(aBaseCasingIndex);
+ tHatch.mRecipeMap = this.getRecipeMap();
+ return this.mInputHatches.add(tHatch);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ if (this.mOutputOnSide == 0) {
+ return false;
+ }
+ this.mInputOnSide = 0;
+ this.mOutputOnSide = 1;
+ GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity;
+ tHatch.updateTexture(aBaseCasingIndex);
+ return this.mOutputHatches.add(tHatch);
+ }
+ return false;
+ }
+
+ private boolean addMiddleInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input tHatch) {
+ tHatch.updateTexture(aBaseCasingIndex);
+ tHatch.mRecipeMap = this.getRecipeMap();
+ return this.mMiddleInputHatches.add(tHatch);
+ }
+ return false;
+ }
+
+ @Override
+ public ArrayList<FluidStack> getStoredFluids() {
+ final ArrayList<FluidStack> rList = new ArrayList<>();
+ Map<Fluid, FluidStack> inputsFromME = new HashMap<>();
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : filterValidMTEs(mInputHatches)) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (tHatch instanceof GT_MetaTileEntity_Hatch_Input_ME meHatch) {
+ for (FluidStack tFluid : meHatch.getStoredFluids()) {
+ if (tFluid != null && !getRecipeMap().getBackend()
+ .isValidCatalystFluid(tFluid)) {
+ inputsFromME.put(tFluid.getFluid(), tFluid);
+ }
+ }
+ } else if (tHatch instanceof GT_MetaTileEntity_Hatch_MultiInput) {
+ for (final FluidStack tFluid : ((GT_MetaTileEntity_Hatch_MultiInput) tHatch).getStoredFluid()) {
+ if (tFluid != null && !getRecipeMap().getBackend()
+ .isValidCatalystFluid(tFluid)) {
+ rList.add(tFluid);
+ }
+ }
+ } else {
+ if (tHatch.getFillableStack() != null) {
+ if (!getRecipeMap().getBackend()
+ .isValidCatalystFluid(tHatch.getFillableStack())) rList.add(tHatch.getFillableStack());
+ }
+ }
+ }
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : filterValidMTEs(mMiddleInputHatches)) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (tHatch instanceof GT_MetaTileEntity_Hatch_Input_ME meHatch) {
+ for (FluidStack tFluid : meHatch.getStoredFluids()) {
+ if (tFluid != null && getRecipeMap().getBackend()
+ .isValidCatalystFluid(tFluid)) {
+ inputsFromME.put(tFluid.getFluid(), tFluid);
+ }
+ }
+ } else if (tHatch instanceof GT_MetaTileEntity_Hatch_MultiInput) {
+ for (final FluidStack tFluid : ((GT_MetaTileEntity_Hatch_MultiInput) tHatch).getStoredFluid()) {
+ if (tFluid != null && getRecipeMap().getBackend()
+ .isValidCatalystFluid(tFluid)) {
+ rList.add(tFluid);
+ }
+ }
+ } else {
+ if (tHatch.getFillableStack() != null) {
+ final FluidStack tStack = tHatch.getFillableStack();
+ if (getRecipeMap().getBackend()
+ .isValidCatalystFluid(tStack)) {
+ rList.add(tStack);
+ }
+ }
+ }
+ }
+ if (!inputsFromME.isEmpty()) {
+ rList.addAll(inputsFromME.values());
+ }
+ return rList;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_MegaOilCracker> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ batchMode = !batchMode;
+ if (batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+
+ @Override
+ protected void startRecipeProcessing() {
+ for (GT_MetaTileEntity_Hatch_Input hatch : filterValidMTEs(mMiddleInputHatches)) {
+ if (hatch instanceof IRecipeProcessingAwareHatch aware) {
+ aware.startRecipeProcessing();
+ }
+ }
+ super.startRecipeProcessing();
+ }
+
+ @Override
+ protected void endRecipeProcessing() {
+ super.endRecipeProcessing();
+ for (GT_MetaTileEntity_Hatch_Input hatch : filterValidMTEs(mMiddleInputHatches)) {
+ if (hatch instanceof IRecipeProcessingAwareHatch aware) {
+ setResultIfFailure(aware.endRecipeProcessing(this));
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
new file mode 100644
index 0000000000..0a2464de5e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTWORKS;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_HatchElement.*;
+import static gregtech.api.enums.GT_HatchElement.ExoticEnergy;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW;
+import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+
+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.common.util.ForgeDirection;
+
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IItemSource;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.logic.ProcessingLogic;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+
+public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaVacuumFreezer>
+ implements ISurvivalConstructable {
+
+ public GT_TileEntity_MegaVacuumFreezer(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_TileEntity_MegaVacuumFreezer(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_TileEntity_MegaVacuumFreezer(this.mName);
+ }
+
+ private int mCasing = 0;
+
+ 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(Energy.or(ExoticEnergy), 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")
+ .addCasingInfoMin("Frost Proof Machine Casing", 900, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ public IStructureDefinition<GT_TileEntity_MegaVacuumFreezer> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public void construct(ItemStack aStack, boolean aHintsOnly) {
+ this.buildPiece(STRUCTURE_PIECE_MAIN, aStack, aHintsOnly, 7, 7, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) {
+ if (this.mMachine) return -1;
+ int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5);
+ return this
+ .survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 7, 7, 0, realBudget, source, actor, false, true);
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return RecipeMaps.vacuumFreezerRecipes;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ if (!aNBT.hasKey(BATCH_MODE_NBT_KEY)) {
+ this.batchMode = aNBT.getBoolean("mUseMultiparallelMode");
+ }
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
+ float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ this.batchMode = !this.batchMode;
+ if (this.batchMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn"));
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff"));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected ProcessingLogic createProcessingLogic() {
+ return new ProcessingLogic().setMaxParallel(ConfigHandler.megaMachinesMax);
+ }
+
+ // -------------- TEC TECH COMPAT ----------------
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ this.mCasing = 0;
+ if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 7, 7, 0)) return false;
+ return this.mMaintenanceHatches.size() == 1 && this.mCasing >= 900;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ ITexture[] rTexture;
+ if (side == facing) {
+ 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() };
+ } 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() };
+ }
+ } else {
+ rTexture = new ITexture[] { casingTexturePages[0][17] };
+ }
+ return rTexture;
+ }
+
+ @Override
+ public boolean supportsBatchMode() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsVoidProtection() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java
new file mode 100644
index 0000000000..c50e6cbd12
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+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;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.render.TextureFactory;
+
+public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGenerator {
+
+ public GT_MetaTileEntity_AcidGenerator(int aID, String aName, String aNameRegional, int aTier,
+ ITexture... aTextures) {
+ super(aID, aName, aNameRegional, aTier, new String[] {}, aTextures);
+ }
+
+ public GT_MetaTileEntity_AcidGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public int getPollution() {
+ return 0;
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return BartWorksRecipeMaps.acidGenFuels;
+ }
+
+ @Override
+ public int getEfficiency() {
+ return 100 - 3 * this.mTier;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_MetaTileEntity_AcidGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ 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] };
+ }
+
+ @Override
+ public ITexture[] getBack(byte aColor) {
+ return new ITexture[] { super.getBack(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ public ITexture[] getBottom(byte aColor) {
+ return new ITexture[] { super.getBottom(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ 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() };
+ }
+
+ @Override
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[] { super.getSides(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ 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] };
+ }
+
+ @Override
+ public ITexture[] getBackActive(byte aColor) {
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ public ITexture[] getBottomActive(byte aColor) {
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ 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() };
+ }
+
+ @Override
+ public ITexture[] getSidesActive(byte aColor) {
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD) };
+ }
+
+ @Override
+ public boolean isOutputFacing(ForgeDirection side) {
+ return side == this.getBaseMetaTileEntity()
+ .getFrontFacing();
+ }
+
+ @Override
+ 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() };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java
new file mode 100644
index 0000000000..d2ef329066
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.Gendustry;
+
+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.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.common.items.LabModule;
+import com.github.bartimaeusnek.bartworks.common.items.LabParts;
+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.BW_Tooltip_Reference;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+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.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
+import gregtech.api.objects.XSTR;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.behaviors.Behaviour_DataOrb;
+
+public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine {
+
+ private static final int DNA_EXTRACTION_MODULE = 0;
+ private static final int PCR_THERMOCYCLE_MODULE = 1;
+ private static final int PLASMID_SYNTHESIS_MODULE = 2;
+ private static final int TRANSFORMATION_MODULE = 3;
+ private static final int CLONAL_CELLULAR_SYNTHESIS_MODULE = 4;
+ private static final int INCUBATION_MODULE = 5;
+
+ public GT_MetaTileEntity_BioLab(int aID, String aName, String aNameRegional, int aTier) {
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ 1,
+ (String) null,
+ 6,
+ 2,
+ 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")),
+ 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()
+ .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")),
+ 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()),
+ 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()));
+ }
+
+ public GT_MetaTileEntity_BioLab(String aName, int aTier, int aAmperage, String[] aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aAmperage, aDescription, aTextures, 6, 2);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_MetaTileEntity_BioLab(
+ this.mName,
+ this.mTier,
+ this.mAmperage,
+ this.mDescriptionArray,
+ this.mTextures);
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ return BartWorksRecipeMaps.bioLabRecipes;
+ }
+
+ @Override
+ public int getCapacity() {
+ return this.mTier * 1000;
+ }
+
+ @Override
+ public int checkRecipe(boolean skipOC) {
+
+ int rTier = 3;
+ FluidStack dnaFluid = Gendustry.isModLoaded() ? FluidRegistry.getFluidStack("liquiddna", 1000)
+ : Materials.Biomass.getFluid(1000L);
+
+ if (this.getSpecialSlot() != null && this.getSpecialSlot()
+ .getItem() instanceof LabModule) {
+ int damage = this.getSpecialSlot()
+ .getItemDamage();
+ switch (damage) {
+ case DNA_EXTRACTION_MODULE:
+ if (GT_Utility.isStackValid(this.mInventory[this.getInputSlot()])
+ && this.mInventory[this.getInputSlot()].getItem() instanceof LabParts
+ && this.mInventory[this.getInputSlot()].getItemDamage() == 0
+ && this.mInventory[this.getInputSlot()].getTagCompound() != null
+ && // checks if it is a Culture
+ GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 1])
+ && this.mInventory[this.getInputSlot() + 1].getItem() instanceof LabParts
+ && this.mInventory[this.getInputSlot() + 1].getItemDamage() == 1
+ && this.mInventory[this.getInputSlot() + 1].getTagCompound() == null
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 2])
+ && this.mInventory[this.getInputSlot() + 2].getItem() instanceof LabParts
+ && this.mInventory[this.getInputSlot() + 2].getItemDamage() == 3
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot() + 3], Materials.Ethanol.getCells(1))
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
+ && this.mFluid.amount >= 1000) {
+
+ NBTTagCompound DNABioDataTag = this.mInventory[this.getInputSlot()].getTagCompound()
+ .getCompoundTag("DNA");
+ if (DNABioDataTag == null) return super.checkRecipe(skipOC);
+ BioData cultureDNABioData = BioData.getBioDataFromName(
+ this.mInventory[this.getInputSlot()].getTagCompound()
+ .getCompoundTag("DNA")
+ .getString("Name"));
+ if (cultureDNABioData == null) return super.checkRecipe(skipOC);
+
+ if (this.mTier < rTier + cultureDNABioData.getTier())
+ return GT_MetaTileEntity_BasicMachine.FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+
+ for (int i = 0; i < 4; i++) {
+ if (this.mInventory[this.getInputSlot() + i] != null)
+ this.mInventory[this.getInputSlot() + i].stackSize--;
+ }
+
+ this.mFluid.amount -= 1000;
+
+ if (cultureDNABioData.getChance() > new XSTR().nextInt(10000)) {
+ 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);
+
+ return GT_MetaTileEntity_BasicMachine.FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ }
+ break;
+ case PCR_THERMOCYCLE_MODULE: {
+ if (GT_Utility.isStackValid(this.mInventory[this.getInputSlot()])
+ && this.mInventory[this.getInputSlot()].getItem() instanceof LabParts
+ && this.mInventory[this.getInputSlot()].getItemDamage() == 1
+ && this.mInventory[this.getInputSlot()].getTagCompound() != null
+ && // checks if it is a Culture
+ GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 3])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot() + 3], ItemList.Tool_DataOrb.get(1L))
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 1])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot() + 1], FluidLoader.BioLabFluidCells[0])
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 2])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot() + 2], FluidLoader.BioLabFluidCells[3])
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && this.mFluid.amount >= 1000) {
+ NBTTagCompound DNABioDataTag = this.mInventory[this.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;
+
+ for (int i = 0; i < 4; i++) {
+ if (this.mInventory[this.getInputSlot() + i] != null)
+ this.mInventory[this.getInputSlot() + i].stackSize--;
+ }
+
+ this.mFluid.amount -= 1000;
+
+ 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);
+
+ this.calculateOverclockedNess(
+ BW_Util.getMachineVoltageFromTier(1 + rTier + cultureDNABioData.getTier()),
+ 500);
+
+ 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[this.getInputSlot()])
+ && GT_Utility
+ .areStacksEqual(FluidLoader.BioLabFluidCells[1], this.mInventory[this.getInputSlot()])
+ && // checks
+ // if
+ // it
+ // is
+ // a
+ // Culture
+ GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 1])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot() + 1], BioItemList.getPlasmidCell(null))
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[this.getInputSlot() + 2],
+ ItemList.Tool_DataOrb.get(1L),
+ true)
+ && "DNA Sample".equals(Behaviour_DataOrb.getDataTitle(this.mInventory[this.getInputSlot() + 2]))
+ && !Behaviour_DataOrb.getDataName(this.mInventory[this.getInputSlot() + 2])
+ .isEmpty()
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 3])
+ && GT_Utility.areStacksEqual(this.mInventory[this.getInputSlot() + 3], inp2)
+ && this.mFluid != null
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && this.mFluid.amount >= 1000) {
+ BioData cultureDNABioData = BioData.getBioDataFromName(
+ Behaviour_DataOrb.getDataName(this.mInventory[this.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[this.getInputSlot() + i] != null)
+ this.mInventory[this.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[this.getInputSlot()])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot()], BioItemList.getPetriDish(null), true)
+ && this.mInventory[this.getInputSlot()].getTagCompound() != null
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[this.getInputSlot() + 1],
+ BioItemList.getPlasmidCell(null),
+ true)
+ && this.mInventory[this.getInputSlot() + 1].getTagCompound() != null
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 2])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.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[this.getInputSlot() + 1].getTagCompound());
+ BioCulture bioCulture = BioCulture
+ .getBioCultureFromNBTTag(this.mInventory[this.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[this.getInputSlot() + i] != null)
+ this.mInventory[this.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");
+
+ if (GT_Utility.isStackValid(this.mInventory[this.getInputSlot()])
+ && GT_Utility
+ .areStacksEqual(this.mInventory[this.getInputSlot()], BioItemList.getPetriDish(null))
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 1])
+ && GT_Utility.areStacksEqual(this.mInventory[this.getInputSlot() + 1], BioItemList.getOther(4))
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 2])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[this.getInputSlot() + 2],
+ ItemList.Circuit_Chip_Stemcell.get(2L))
+ && GT_Utility.isStackValid(this.mInventory[this.getInputSlot() + 3])
+ && GT_Utility.areStacksEqual(
+ this.mInventory[this.getInputSlot() + 3],
+ ItemList.Tool_DataOrb.get(1L),
+ true)
+ && "DNA Sample".equals(Behaviour_DataOrb.getDataTitle(this.mInventory[this.getInputSlot() + 3]))
+ && this.mFluid.isFluidEqual(dnaFluid)
+ && this.mFluid.amount >= 8000) {
+
+ BioData cultureDNABioData = BioData.getBioDataFromName(
+ Behaviour_DataOrb.getDataName(this.mInventory[this.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[this.getInputSlot() + i] != null)
+ this.mInventory[this.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:
+ break;
+ }
+ }
+ return super.checkRecipe(skipOC);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[] { StatCollector.translateToLocal("tooltip.tile.biolab.0.name"),
+ BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java
new file mode 100644
index 0000000000..e0903ce93c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.gtnewhorizons.modularui.common.widget.FluidSlotWidget;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.util.GT_Utility;
+
+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: 100,000,000L";
+ }
+
+ public GT_MetaTileEntity_CompressedFluidHatch(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public int getCapacity() {
+ return 100_000_000;
+ }
+
+ @Override
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ return GT_Utility.areFluidsEqual(aFluid, Materials.LiquidAir.getFluid(1));
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_CompressedFluidHatch(
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures);
+ }
+
+ @Override
+ protected FluidSlotWidget createFluidSlot() {
+ return super.createFluidSlot().setFilter(f -> f == Materials.LiquidAir.mFluid);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java
new file mode 100644
index 0000000000..76a9c1646e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+import org.apache.commons.lang3.ArrayUtils;
+
+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;
+
+public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull {
+
+ private long maxAmps;
+ private long aAmps;
+
+ public GT_MetaTileEntity_Diode(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, StatCollector.translateToLocal("tooltip.tile.diode.0.name"));
+ this.maxAmps = this.getAmpsfromMeta(aID);
+ this.aAmps = this.maxAmps;
+ }
+
+ public GT_MetaTileEntity_Diode(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 0, aDescription, aTextures);
+ }
+
+ @Override
+ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
+ super.onFirstTick(aBaseMetaTileEntity);
+ if (this.maxAmps == 0 && !this.getBaseMetaTileEntity()
+ .getWorld().isRemote) {
+ this.maxAmps = this.getAmpsfromMeta(
+ this.getBaseMetaTileEntity()
+ .getMetaTileID());
+ this.aAmps = this.maxAmps;
+ }
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
+
+ if (this.getBaseMetaTileEntity()
+ .getWorld().isRemote) return;
+ if (!aPlayer.isSneaking()) {
+ --this.aAmps;
+ if (this.aAmps < 0) this.aAmps = this.maxAmps;
+ } else {
+ ++this.aAmps;
+ if (this.aAmps > this.maxAmps) this.aAmps = 0;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, "Max Amps: " + this.aAmps);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setLong("maxAmp", this.maxAmps);
+ aNBT.setLong("Amps", this.aAmps);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.maxAmps = aNBT.getLong("maxAmp");
+ this.aAmps = aNBT.getLong("Amps");
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return this.aAmps;
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return this.aAmps;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Diode(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ private long getAmpsfromMeta(int meta) {
+ if (meta > ConfigHandler.IDOffset + GT_Values.VN.length
+ && meta <= ConfigHandler.IDOffset + GT_Values.VN.length * 2) return 2L;
+ if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 2
+ && 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;
+ else if (meta > ConfigHandler.IDOffset + GT_Values.VN.length * 4
+ && 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;
+ else return 0L;
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public String[] getDescription() {
+ return ArrayUtils.addAll(
+ this.mDescriptionArray,
+ 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/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java
new file mode 100644
index 0000000000..4431015ca8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Transformer {
+
+ public GT_MetaTileEntity_EnergyDistributor(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, null);
+ }
+
+ public GT_MetaTileEntity_EnergyDistributor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ public GT_MetaTileEntity_EnergyDistributor(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_EnergyDistributor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ public long maxEUInput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public long maxEUOutput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return 320;
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 320;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return 512L + GT_Values.V[this.mTier] * 320L;
+ }
+
+ @Override
+ 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() };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java
new file mode 100644
index 0000000000..8d5a756cb5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.tileentities.tiered;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+
+public class GT_MetaTileEntity_GiantOutputHatch extends GT_MetaTileEntity_Hatch_Output {
+
+ public GT_MetaTileEntity_GiantOutputHatch(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 0);
+ this.mDescriptionArray[1] = "Capacity: 100000000L";
+ }
+
+ public GT_MetaTileEntity_GiantOutputHatch(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_GiantOutputHatch(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ public int getCapacity() {
+ return 100000000;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_HumongousInputHatch.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_HumongousInputHatch.java
new file mode 100644
index 0000000000..e9db8ac2d5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_HumongousInputHatch.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.tileentities.tiered;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+
+public class GT_MetaTileEntity_HumongousInputHatch extends GT_MetaTileEntity_Hatch_Input {
+
+ public GT_MetaTileEntity_HumongousInputHatch(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 13);
+ this.mDescriptionArray[1] = "Capacity: 2,000,000,000L";
+ }
+
+ public GT_MetaTileEntity_HumongousInputHatch(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public int getCapacity() {
+ return 2_000_000_000;
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_HumongousInputHatch(
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
new file mode 100644
index 0000000000..6a66b5209f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
@@ -0,0 +1,499 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.github.bartimaeusnek.bartworks.util.MathUtils;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.drawable.ItemDrawable;
+import com.gtnewhorizons.modularui.api.drawable.shapes.Rectangle;
+import com.gtnewhorizons.modularui.api.math.Alignment;
+import com.gtnewhorizons.modularui.api.math.Color;
+import com.gtnewhorizons.modularui.api.math.Pos2d;
+import com.gtnewhorizons.modularui.api.math.Size;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
+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.NumericWidget;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.modularui.GT_UIInfos;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.gui.modularui.GUITextureSet;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.modularui.IAddGregtechLogo;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.interfaces.tileentity.RecipeMapWorkable;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.objects.ItemData;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.render.TextureFactory;
+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;
+
+public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch
+ implements RecipeMapWorkable, IAddGregtechLogo {
+
+ private final int cap;
+ public int sievert;
+ private long timer = 1;
+ private long decayTime = 1;
+ private short[] colorForGUI = { 0x02, 0x02, 0x02 };
+ private byte mass;
+ private String material;
+ private byte coverage;
+ private ItemStack lastUsedItem = null;
+ private boolean lastFail = false;
+ 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() });
+ this.cap = aTier - 2;
+ }
+
+ public GT_MetaTileEntity_RadioHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 1, aDescription, aTextures);
+ this.cap = aTier - 2;
+ }
+
+ public int getSievert() {
+ return this.sievert - MathUtils.ceilInt(this.sievert / 100f * this.coverage);
+ }
+
+ public short[] getColorForGUI() {
+ if (this.colorForGUI != null) return this.colorForGUI;
+ return this.colorForGUI = new short[] { 0xFA, 0xFA, 0xFF };
+ }
+
+ public byte getMass() {
+ return this.mass;
+ }
+
+ public byte getCoverage() {
+ return this.coverage;
+ }
+
+ public void setCoverage(short coverage) {
+ byte nu;
+ if (coverage > 100) nu = 100;
+ else if (coverage < 0) nu = 0;
+ else nu = (byte) coverage;
+ this.coverage = nu;
+ }
+
+ @Override
+ public ITexture[] getTexturesActive(ITexture aBaseTexture) {
+ 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) };
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_MetaTileEntity_RadioHatch(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
+ return true;
+ }
+
+ public void updateSlots() {
+ if (this.mInventory[0] != null && this.mInventory[0].stackSize <= 0) this.mInventory[0] = null;
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
+ BaseMetaTileEntity myMetaTileEntity = (BaseMetaTileEntity) this.getBaseMetaTileEntity();
+ if (myMetaTileEntity.isServerSide()) {
+
+ if (this.mass > 0) {
+ ++this.timer;
+ }
+
+ if (this.mass > 0 && (this.decayTime == 0 || this.decayTime > 0 && this.timer % this.decayTime == 0)) {
+ this.mass--;
+ if (this.mass == 0) {
+ this.material = StatCollector.translateToLocal("tooltip.bw.empty.name");
+ this.sievert = 0;
+ }
+ this.timer = 1;
+ }
+
+ if (myMetaTileEntity.mTickTimer > myMetaTileEntity.mLastSoundTick + ticksBetweenSounds
+ && this.sievert > 0) {
+ this.sendLoopStart((byte) 1);
+ myMetaTileEntity.mLastSoundTick = myMetaTileEntity.mTickTimer;
+ }
+
+ if (this.mass == 0) {
+ ItemStack lStack = this.mInventory[0];
+
+ if (lStack == null) {
+ this.colorForGUI = new short[] { 0x37, 0x37, 0x37 };
+ return;
+ }
+ ItemData itemData = GT_OreDictUnificator.getAssociation(lStack);
+ if (itemData != null) {
+ Materials mat = itemData.mMaterial.mMaterial;
+ this.colorForGUI = new short[] { mat.getRGBA()[0], mat.getRGBA()[1], mat.getRGBA()[2] };
+ } else {
+ this.colorForGUI = new short[] { 0x37, 0x37, 0x37 };
+ }
+
+ if (this.lastFail && GT_Utility.areStacksEqual(this.lastUsedItem, lStack, true)) {
+ return;
+ }
+
+ if (!this.lastFail && this.lastUsedItem != null && this.lastRecipe != null) {
+ if (GT_Utility.areStacksEqual(this.lastUsedItem, lStack, true)) {
+ this.mass = (byte) this.lastRecipe.mDuration;
+ this.decayTime = this.lastRecipe.mSpecialValue;
+ this.sievert = this.lastRecipe.mEUt;
+ this.material = this.lastUsedItem.getDisplayName();
+ lStack.stackSize--;
+ this.updateSlots();
+ } else {
+ this.lastRecipe = null;
+ }
+ }
+
+ if (this.lastRecipe == null || this.lastFail) {
+ this.lastRecipe = BartWorksRecipeMaps.radioHatchRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ false,
+ Integer.MAX_VALUE - 7,
+ null,
+ this.mInventory[0]);
+ if (this.lastRecipe == null) {
+ this.lastFail = true;
+ this.lastUsedItem = this.mInventory[0] == null ? null : this.mInventory[0].copy();
+ } else {
+ if (this.lastRecipe.mDuration > this.cap) {
+ this.lastFail = true;
+ this.lastUsedItem = this.mInventory[0].copy();
+ return;
+ }
+ this.lastFail = false;
+ this.lastUsedItem = this.mInventory[0].copy();
+ this.mass = (byte) this.lastRecipe.mDuration;
+ this.decayTime = this.lastRecipe.mSpecialValue;
+ this.sievert = this.lastRecipe.mEUt;
+ this.material = lStack.getDisplayName();
+ lStack.stackSize--;
+ this.updateSlots();
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return true;
+ }
+
+ @Override
+ public String[] getInfoData() {
+ 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,
+ StatCollector.translateToLocal("tooltip.tile.radhatch.4.name") + " " + this.mass,
+ StatCollector.translateToLocal("tooltip.tile.radhatch.5.name") + " "
+ + (this.decayTime - this.timer % (this.decayTime * 60))
+ + StatCollector.translateToLocal("tooltip.tile.radhatch.6.name")
+ + "/"
+ + (this.decayTime - this.timer % this.decayTime) / 20
+ + StatCollector.translateToLocal("tooltip.tile.radhatch.7.name")
+ + "/"
+ + (this.decayTime - this.timer % this.decayTime) / 20 / 60
+ + StatCollector.translateToLocal("tooltip.tile.radhatch.8.name")
+ + "/"
+ + (this.decayTime - this.timer % this.decayTime) / 20 / 60 / 60
+ + StatCollector.translateToLocal("tooltip.tile.radhatch.9.name") };
+ 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" };
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(ForgeDirection facing) {
+ return true;
+ }
+
+ @Override
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ return true;
+ }
+
+ @Override
+ public boolean isValidSlot(int aIndex) {
+ return true;
+ }
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
+ ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
+ ItemStack aStack) {
+ return side == this.getBaseMetaTileEntity()
+ .getFrontFacing() && BartWorksRecipeMaps.radioHatchRecipes.containsInput(aStack);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setByte("mMass", this.mass);
+ aNBT.setByte("mSv", (byte) (this.sievert - 100));
+ aNBT.setByte("mCoverage", this.coverage);
+ aNBT.setInteger("mTextColor", BW_ColorUtil.getColorFromRGBArray(this.getColorForGUI()));
+ if (this.material != null && !this.material.isEmpty()) aNBT.setString("mMaterial", this.material);
+ aNBT.setLong("timer", this.timer);
+ aNBT.setLong("decay", this.decayTime);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.timer = aNBT.getLong("timer");
+ this.mass = aNBT.getByte("mMass");
+ this.sievert = aNBT.getByte("mSv") + 100;
+ this.coverage = aNBT.getByte("mCoverage");
+ this.colorForGUI = BW_ColorUtil.splitColorToRBGArray(aNBT.getInteger("mTextColor"));
+ this.material = aNBT.getString("mMaterial");
+ this.decayTime = aNBT.getLong("decay");
+ super.loadNBTData(aNBT);
+ }
+
+ @Override
+ public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ ResourceLocation rl = new ResourceLocation(MainMod.MOD_ID, "hatch.RadOn");
+ if (aIndex == 1) {
+ GT_Utility.doSoundAtClient(rl, 10, 1.0F, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public RecipeMap<?> getRecipeMap() {
+ // Only for visual
+ return BartWorksRecipeMaps.radioHatchRecipes;
+ }
+
+ private static final int RADIATION_SHUTTER_WINDOW_ID = 999;
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ buildContext.addSyncedWindow(RADIATION_SHUTTER_WINDOW_ID, this::createShutterWindow);
+
+ this.getBaseMetaTileEntity()
+ .add1by1Slot(builder);
+ builder.widget(
+ new DrawableWidget().setBackground(BW_UITextures.PICTURE_SIEVERT_CONTAINER)
+ .setPos(61, 9)
+ .setSize(56, 24))
+ .widget(
+ new ProgressBar().setProgress(() -> this.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 (GT_MetaTileEntity_RadioHatch.this.decayTime > 0) {
+ int height = MathUtils.ceilInt(
+ 48 * ((GT_MetaTileEntity_RadioHatch.this.decayTime
+ - GT_MetaTileEntity_RadioHatch.this.timer % GT_MetaTileEntity_RadioHatch.this.decayTime)
+ / (float) GT_MetaTileEntity_RadioHatch.this.decayTime));
+ new Rectangle()
+ .setColor(
+ Color.argb(
+ GT_MetaTileEntity_RadioHatch.this.colorForGUI[0],
+ GT_MetaTileEntity_RadioHatch.this.colorForGUI[1],
+ GT_MetaTileEntity_RadioHatch.this.colorForGUI[2],
+ 255))
+ .draw(new Pos2d(0, 48 - height), new Size(16, height), partialTicks);
+ }
+ }
+ }.dynamicTooltip(
+ () -> Collections.singletonList(
+ StatCollector.translateToLocalFormatted(
+ "tooltip.tile.radhatch.10.name",
+ this.timer <= 1 ? 0 : (this.decayTime - this.timer) / 20,
+ this.timer <= 1 ? 0 : this.decayTime / 20)))
+ .setPos(124, 18)
+ .setSize(16, 48)
+ .attachSyncer(
+ new FakeSyncWidget.LongSyncer(() -> this.decayTime, val -> this.decayTime = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .attachSyncer(
+ new FakeSyncWidget.LongSyncer(() -> this.timer, val -> this.timer = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange()))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> this.colorForGUI[0], val -> this.colorForGUI[0] = val))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> this.colorForGUI[1], val -> this.colorForGUI[1] = val))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> this.colorForGUI[2], val -> this.colorForGUI[2] = val))
+ .widget(
+ new DrawableWidget().setBackground(BW_UITextures.PICTURE_DECAY_TIME_CONTAINER)
+ .setPos(120, 14)
+ .setSize(24, 56))
+ .widget(
+ new TextWidget()
+ .setStringSupplier(
+ () -> StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", this.mass))
+ .setTextAlignment(Alignment.Center)
+ .setPos(65, 62))
+ .widget(new FakeSyncWidget.ByteSyncer(() -> this.mass, val -> this.mass = val))
+ .widget(
+ new TextWidget()
+ .setStringSupplier(
+ () -> StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", this.getSievert()))
+ .setTextAlignment(Alignment.Center)
+ .setPos(60, 72))
+ .widget(new FakeSyncWidget.IntegerSyncer(() -> this.sievert, val -> this.sievert = val))
+ .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));
+ }
+
+ private ModularWindow createShutterWindow(EntityPlayer player) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 107);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.setGuiTint(this.getGUIColorization());
+
+ builder.widget(
+ new TextWidget("Radiation Shutter Control").setDefaultColor(this.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(() -> this.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 + this.coverage / 2)
+ .setSize(51, 50 - this.coverage / 2)))
+ .widget(
+ new NumericWidget().setSetter(val -> this.coverage = (byte) val)
+ .setGetter(() -> this.coverage)
+ .setBounds(0, 100)
+ .setScrollValues(1, 5, 50)
+ .setTextColor(Color.WHITE.dark(1))
+ .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();
+ }
+
+ @Override
+ public void addGregTechLogo(ModularWindow.Builder builder) {
+ 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)
+ .setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT);
+ }
+
+ @Override
+ public boolean useModularUI() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java
new file mode 100644
index 0000000000..46f20e441d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+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;
+
+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) {
+ super(aID, aName, aNameRegional, aTier, 0, aDescription, 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(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 0, aDescription, aTextures);
+ }
+
+ public GT_MetaTileEntity_Transistor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 0, aDescription, aTextures);
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ 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] };
+ }
+
+ return rTextures;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_MetaTileEntity_Transistor(this.mName, this.mTier, this.getDescription(), null);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound nbtTagCompound) {}
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ final ForgeDirection side = ForgeDirection.EAST;
+ if (aBaseMetaTileEntity.inputEnergyFrom(side)) {
+ TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(side);
+ if (!(tTileEntity instanceof IBasicEnergyContainer tileAtSide)) {
+ this.powered = false;
+ return;
+ }
+ if (!tileAtSide.outputsEnergyTo(ForgeDirection.WEST) || !tileAtSide.isUniversalEnergyStored(4L)
+ || !tileAtSide.decreaseStoredEnergyUnits(4, false)) {
+ this.powered = false;
+ return;
+ }
+ if (aBaseMetaTileEntity.injectEnergyUnits(side, 4L, 1L) == 4L) {
+ this.powered = true;
+ }
+ }
+
+ if (aBaseMetaTileEntity.isAllowedToWork()) this.powered = !this.powered;
+ }
+ }
+
+ @Override
+ public long maxEUInput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 1L;
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return this.powered ? 1L : 0;
+ }
+
+ @Override
+ public long maxEUOutput() {
+ return this.powered ? GT_Values.V[this.mTier] : 0;
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound nbtTagCompound) {}
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity iGregTechTileEntity, int i, ForgeDirection side,
+ ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity iGregTechTileEntity, int i, ForgeDirection side,
+ ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, ForgeDirection side, ForgeDirection facing,
+ int colorIndex, boolean b3, boolean b4) {
+ return new ITexture[0];
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java
new file mode 100644
index 0000000000..40233912e6
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.github.bartimaeusnek.bartworks.common.items.LabParts;
+
+import codechicken.nei.recipe.GuiCraftingRecipe;
+import codechicken.nei.recipe.GuiUsageRecipe;
+import codechicken.nei.recipe.TemplateRecipeHandler;
+import cpw.mods.fml.common.event.FMLInterModComms;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.recipe.RecipeCategory;
+import gregtech.nei.GT_NEI_DefaultHandler;
+
+public class BW_NEI_BioLabHandler extends GT_NEI_DefaultHandler {
+
+ public BW_NEI_BioLabHandler(RecipeCategory recipeCategory) {
+ super(recipeCategory);
+ if (!NEI_BW_Config.sIsAdded) {
+ FMLInterModComms.sendRuntimeMessage(
+ GT_Values.GT,
+ "NEIPlugins",
+ "register-crafting-handler",
+ "gregtech@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
+ GuiCraftingRecipe.craftinghandlers.add(this);
+ GuiUsageRecipe.usagehandlers.add(this);
+ }
+ }
+
+ @Override
+ public TemplateRecipeHandler newInstance() {
+ return new BW_NEI_BioLabHandler(this.recipeCategory);
+ }
+
+ @Override
+ public void loadCraftingRecipes(ItemStack aResult) {
+ if (aResult != null && aResult.getItem() instanceof LabParts
+ && aResult.getItemDamage() < 3
+ && aResult.getTagCompound() != null) {
+ for (CachedDefaultRecipe recipe : this.getCache())
+ if (NEI_BW_Config.checkRecipe(aResult, recipe.mOutputs)) this.arecipes.add(recipe);
+ } else {
+ super.loadCraftingRecipes(aResult);
+ }
+ }
+
+ @Override
+ public void loadUsageRecipes(ItemStack aResult) {
+ if (aResult != null && aResult.getItem() instanceof LabParts
+ && aResult.getItemDamage() < 3
+ && aResult.getTagCompound() != null) {
+ for (CachedDefaultRecipe recipe : this.getCache())
+ if (NEI_BW_Config.checkRecipe(aResult, recipe.mInputs)) this.arecipes.add(recipe);
+ } else {
+ super.loadUsageRecipes(aResult);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
new file mode 100644
index 0000000000..cddb16c6c8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.util.Collections;
+
+import net.minecraft.item.ItemStack;
+
+import com.github.bartimaeusnek.bartworks.common.items.LabParts;
+
+import codechicken.nei.PositionedStack;
+import codechicken.nei.recipe.GuiCraftingRecipe;
+import codechicken.nei.recipe.GuiUsageRecipe;
+import codechicken.nei.recipe.TemplateRecipeHandler;
+import cpw.mods.fml.common.event.FMLInterModComms;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.recipe.RecipeCategory;
+import gregtech.nei.GT_NEI_DefaultHandler;
+
+public class BW_NEI_BioVatHandler extends GT_NEI_DefaultHandler {
+
+ public BW_NEI_BioVatHandler(RecipeCategory recipeCategory) {
+ super(recipeCategory);
+ if (!NEI_BW_Config.sIsAdded) {
+ FMLInterModComms.sendRuntimeMessage(
+ GT_Values.GT,
+ "NEIPlugins",
+ "register-crafting-handler",
+ "gregtech@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
+ GuiCraftingRecipe.craftinghandlers.add(this);
+ GuiUsageRecipe.usagehandlers.add(this);
+ }
+ }
+
+ @Override
+ public TemplateRecipeHandler newInstance() {
+ return new BW_NEI_BioVatHandler(this.recipeCategory);
+ }
+
+ private void loadLabPartRecipes(ItemStack aResult) {
+ for (CachedDefaultRecipe recipe : this.getCache()) {
+ // dirty way of finding the special slot item
+ // see constructor of CachedDefaultRecipe on why relx==120 and rely==52 means special slot
+ for (PositionedStack stack : recipe.mInputs) {
+ if (stack.relx == 120 && stack.rely == 52
+ && NEI_BW_Config.checkRecipe(aResult, Collections.singletonList(stack))) this.arecipes.add(recipe);
+ }
+ }
+ }
+
+ @Override
+ public void loadUsageRecipes(ItemStack aResult) {
+ if (aResult != null && aResult.getItem() instanceof LabParts
+ && aResult.getItemDamage() < 3
+ && aResult.getTagCompound() != null) {
+ this.loadLabPartRecipes(aResult);
+ } else {
+ super.loadUsageRecipes(aResult);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java
new file mode 100644
index 0000000000..2b34250512
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Rectangle;
+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 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;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+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 codechicken.lib.gui.GuiDraw;
+import codechicken.nei.PositionedStack;
+import codechicken.nei.recipe.GuiCraftingRecipe;
+import codechicken.nei.recipe.TemplateRecipeHandler;
+import cpw.mods.fml.common.event.FMLInterModComms;
+import gregtech.api.enums.OrePrefixes;
+
+public class BW_NEI_OreHandler extends TemplateRecipeHandler {
+
+ public BW_NEI_OreHandler() {
+ if (!NEI_BW_Config.sIsAdded) {
+ FMLInterModComms.sendRuntimeMessage(
+ MainMod.MOD_ID,
+ "NEIPlugins",
+ "register-crafting-handler",
+ MainMod.MOD_ID + "@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
+ GuiCraftingRecipe.craftinghandlers.add(this);
+ }
+ }
+
+ @Override
+ public void drawBackground(int recipe) {
+ GuiDraw.drawRect(0, 0, 166, 65, 0x888888);
+ }
+
+ @Override
+ public void loadTransferRects() {
+ this.transferRects.add(
+ new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(0, 40, 40, 120), "quickanddirtyneihandler"));
+ }
+
+ @Override
+ public int recipiesPerPage() {
+ return 1;
+ }
+
+ @Override
+ public void loadCraftingRecipes(String outputId, Object... results) {
+ if ("quickanddirtyneihandler".equalsIgnoreCase(outputId)) {
+ HashSet<ItemStack> result = new HashSet<>();
+ 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))
+ .forEach(w -> result.add(w.get(OrePrefixes.oreSmall)));
+ result.forEach(this::loadCraftingRecipes);
+ result.clear();
+ HashSet<TemplateRecipeHandler.CachedRecipe> hashSet = new HashSet<>(this.arecipes);
+ this.arecipes.clear();
+ this.arecipes.addAll(hashSet);
+ }
+ if ("item".equals(outputId)) {
+ this.loadCraftingRecipes((ItemStack) results[0]);
+ HashSet<TemplateRecipeHandler.CachedRecipe> hashSet = new HashSet<>(this.arecipes);
+ this.arecipes.clear();
+ this.arecipes.addAll(hashSet);
+ }
+ }
+
+ @Override
+ public void drawExtras(int recipe) {
+ 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.small) {
+ if (cachedOreRecipe.getOtherStacks()
+ .get(0) == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(0).item == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(1) == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(2) == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(3) == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(1).item == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(2).item == null
+ || cachedOreRecipe.getOtherStacks()
+ .get(3).item == null)
+ return;
+ } else if (cachedOreRecipe.getOtherStacks()
+ .get(0) == null
+ || 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);
+
+ GuiDraw.drawString(ChatColorHelper.BOLD + "Primary:", 0, 50, 0, false);
+ GuiDraw.drawString(
+ cachedOreRecipe.getOtherStacks()
+ .get(0).item.getDisplayName(),
+ 0,
+ 60,
+ 0,
+ false);
+
+ if (!cachedOreRecipe.small) {
+ GuiDraw.drawString(ChatColorHelper.BOLD + "Secondary:", 0, 70, 0, false);
+ GuiDraw.drawString(
+ cachedOreRecipe.getOtherStacks()
+ .get(1).item.getDisplayName(),
+ 0,
+ 80,
+ 0,
+ false);
+ GuiDraw.drawString(ChatColorHelper.BOLD + "InBetween:", 0, 90, 0, false);
+ GuiDraw.drawString(
+ cachedOreRecipe.getOtherStacks()
+ .get(2).item.getDisplayName(),
+ 0,
+ 100,
+ 0,
+ false);
+ GuiDraw.drawString(ChatColorHelper.BOLD + "Sporadic:", 0, 110, 0, false);
+ GuiDraw.drawString(
+ cachedOreRecipe.getOtherStacks()
+ .get(3).item.getDisplayName(),
+ 0,
+ 120,
+ 0,
+ false);
+ } else if (cachedOreRecipe.worldGen != null) {
+ GuiDraw.drawString(ChatColorHelper.BOLD + "Amount per Chunk:", 0, 70, 0, false);
+ GuiDraw.drawString(cachedOreRecipe.worldGen.mDensity + "", 0, 80, 0, false);
+ }
+ }
+ super.drawExtras(recipe);
+ }
+
+ @Override
+ public void loadCraftingRecipes(ItemStack result) {
+ 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)));
+ }
+ }
+
+ @Override
+ public String getGuiTexture() {
+ return "textures/gui/container/brewing_stand.png";
+ }
+
+ @Override
+ public String getRecipeName() {
+ return "BartWorks Ores";
+ }
+
+ class CachedOreRecipe extends TemplateRecipeHandler.CachedRecipe {
+
+ public CachedOreRecipe(BW_OreLayer worldGen, ItemStack result, boolean smallOres) {
+ this.worldGen = worldGen;
+ this.stack = new PositionedStack(result, 0, 0);
+ this.small = smallOres;
+ }
+
+ boolean small;
+ BW_OreLayer worldGen;
+ PositionedStack stack;
+
+ @Override
+ public PositionedStack getResult() {
+ return this.stack;
+ }
+
+ @Override
+ public List<PositionedStack> getOtherStacks() {
+ List<PositionedStack> ret = new ArrayList<>();
+ int x = 0;
+ for (int i = 0; i < (this.small ? 1 : 4); i++) {
+ x += 20;
+ ret.add(
+ new PositionedStack(
+ this.worldGen.getStacks()
+ .get(i),
+ x,
+ 12));
+ }
+ return ret;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof CachedOreRecipe that)) return false;
+ return Objects.equals(this.worldGen, that.worldGen);
+ }
+
+ @Override
+ public int hashCode() {
+ return this.worldGen.hashCode();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java
new file mode 100644
index 0000000000..a6efebeb83
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+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 codechicken.nei.PositionedStack;
+import codechicken.nei.api.API;
+import codechicken.nei.api.IConfigureNEI;
+import gregtech.api.enums.OrePrefixes;
+
+public class NEI_BW_Config implements IConfigureNEI {
+
+ static boolean sIsAdded = true;
+
+ static boolean checkRecipe(ItemStack labPart, Iterable<? extends PositionedStack> stacks) {
+ for (PositionedStack stack : stacks) {
+ for (ItemStack item : stack.items) {
+ if (labPart.getTagCompound()
+ .equals(item.getTagCompound())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void loadConfig() {
+ API.hideItem(new ItemStack(ItemRegistry.TAB));
+ API.hideItem(new ItemStack(FluidLoader.bioFluidBlock));
+ 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(), };
+ for (ItemStack stack : prefixesToHide) {
+ stack.setItemDamage(Short.MAX_VALUE);
+ API.hideItem(stack);
+ }
+
+ NEI_BW_Config.sIsAdded = false;
+ new BW_NEI_OreHandler();
+ new BW_NEI_BioVatHandler(BartWorksRecipeMaps.bacterialVatRecipes.getDefaultRecipeCategory());
+ new BW_NEI_BioLabHandler(BartWorksRecipeMaps.bioLabRecipes.getDefaultRecipeCategory());
+ NEI_BW_Config.sIsAdded = true;
+ }
+
+ @Override
+ public String getName() {
+ return "BartWorks NEI Plugin";
+ }
+
+ @Override
+ public String getVersion() {
+ return MainMod.APIVERSION;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java
new file mode 100644
index 0000000000..3ea2f28cb9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/server/EventHandler/ServerEventHandler.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public class ServerEventHandler {
+
+ // MinecraftForge.EVENT_BUS
+ @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 ServerJoinedPackage(null), (EntityPlayerMP) event.entity);
+ }
+
+ // FMLCommonHandler.instance().bus()
+ @SubscribeEvent(priority = EventPriority.HIGHEST)
+ public void onPlayerTickEventServer(TickEvent.PlayerTickEvent event) {
+ if (event == null || !(event.player instanceof EntityPlayerMP)
+ || event.player.worldObj.getTotalWorldTime() % 20 != 0) return;
+
+ boolean replace = false;
+ ItemStack toReplace = null;
+ for (int i = 0; i < event.player.inventory.mainInventory.length; i++) {
+ ItemStack stack = event.player.inventory.mainInventory[i];
+ if (stack == null) continue;
+ int[] oreIDs = OreDictionary.getOreIDs(stack);
+
+ if (oreIDs.length > 0) {
+ loop: for (int oreID : oreIDs) {
+ String oreDictName = OreDictionary.getOreName(oreID);
+ for (Werkstoff e : Werkstoff.werkstoffHashSet) {
+ replace = e.getGenerationFeatures().enforceUnification;
+ if (replace) {
+ if (oreDictName.contains(e.getVarName())) {
+ String prefix = oreDictName.replace(e.getVarName(), "");
+ OrePrefixes prefixes = OrePrefixes.getPrefix(prefix);
+ if (prefixes == null) {
+ continue;
+ }
+ toReplace = GT_OreDictUnificator.get(prefixes, e.getVarName(), stack.stackSize);
+ break loop;
+ }
+ for (String s : e.getADDITIONAL_OREDICT()) {
+ if (oreDictName.contains(s)) {
+ String prefix = oreDictName.replace(s, "");
+ OrePrefixes prefixes = OrePrefixes.getPrefix(prefix);
+ if (prefixes == null) {
+ continue;
+ }
+ toReplace = GT_OreDictUnificator.get(prefixes, e.getVarName(), stack.stackSize);
+ break loop;
+ }
+ }
+ }
+ replace = false;
+ }
+ }
+ }
+ if (replace && toReplace != null) {
+ event.player.inventory.setInventorySlotContents(i, toReplace);
+ replace = false;
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java
new file mode 100644
index 0000000000..87ee19833d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Types.BIOLOGICAL;
+import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.COMPOUND;
+import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.ELEMENT;
+import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.ISOTOPE;
+import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.MIXTURE;
+
+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();
+
+ 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 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 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 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 Dysprosium = new Werkstoff(Materials.Dysprosium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 73);
+ 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 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 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);
+ public static Werkstoff Lanthanum = new Werkstoff(Materials.Lanthanum, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 64);
+ public static Werkstoff Lead = new Werkstoff(Materials.Lead, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 89);
+ public static Werkstoff Lithium = new Werkstoff(Materials.Lithium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 6);
+ 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 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 Osmium = new Werkstoff(Materials.Osmium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 83);
+ 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 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 Promethium = new Werkstoff(Materials.Promethium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 68);
+ 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);
+ public static Werkstoff Silicon = new Werkstoff(Materials.Silicon, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 20);
+ public static Werkstoff Silver = new Werkstoff(Materials.Silver, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 54);
+ public static Werkstoff Sodium = new Werkstoff(Materials.Sodium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 17);
+ 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 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);
+ public static Werkstoff Tin = new Werkstoff(Materials.Tin, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 57);
+ public static Werkstoff Titanium = new Werkstoff(Materials.Titanium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 28);
+ public static Werkstoff Tritanium = new Werkstoff(Materials.Tritanium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 329);
+ public static Werkstoff Tritium = new Werkstoff(Materials.Tritium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 3);
+ public static Werkstoff Tungsten = new Werkstoff(Materials.Tungsten, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 81);
+ public static Werkstoff Uranium = new Werkstoff(Materials.Uranium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 98);
+ public static Werkstoff Uranium235 = new Werkstoff(Materials.Uranium235, ADD_CASINGS_ONLY, ISOTOPE, 31_766 + 97);
+ public static Werkstoff Vanadium = new Werkstoff(Materials.Vanadium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 29);
+ public static Werkstoff Ytterbium = new Werkstoff(Materials.Ytterbium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 77);
+ public static Werkstoff Yttrium = new Werkstoff(Materials.Yttrium, ADD_CASINGS_ONLY, ELEMENT, 31_766 + 45);
+ 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 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 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 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 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 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 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 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);
+
+ public static Werkstoff Wood = new Werkstoff(Materials.Wood, ADD_CASINGS_ONLY, BIOLOGICAL, 31_766 + 809);
+
+ 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 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(
+ Materials.Magnesia,
+ new Werkstoff.GenerationFeatures().disable()
+ .addMetalItems()
+ .addMolten(),
+ COMPOUND,
+ 31_766 + 471);
+
+ public static void init() {
+ MainMod.LOGGER.info("Load Elements from GT");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java
new file mode 100644
index 0000000000..41f28d033a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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);
+ }
+
+ @Override
+ 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;
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack aStack) {
+ return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack);
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack aStack) {
+ Block block = Block.getBlockFromItem(aStack.getItem());
+ if (block instanceof BW_MetaGenerated_Blocks metaBlock) {
+ int aMetaData = aStack.getItemDamage();
+ Werkstoff werkstoff = werkstoffHashMap.get((short) aMetaData);
+ if (werkstoff == null) werkstoff = Werkstoff.default_null_Werkstoff;
+ return metaBlock.blockTypeLocalizedName.replace("%material", werkstoff.getLocalizedName());
+ }
+ return GT_LanguageManager.getTranslation(this.getUnlocalizedName(aStack) + ".name");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List<String> aList, boolean aF3_H) {
+ if (!GT_Utility.isStackValid(aStack) || aPlayer == null || aStack.getItemDamage() <= 0) {
+ return;
+ }
+ if (aList == null) {
+ aList = new ArrayList<>();
+ }
+ Werkstoff werkstoff = Werkstoff.werkstoffHashMap.get((short) aStack.getItemDamage());
+ if (werkstoff != null) {
+ String tooltip = werkstoff.getLocalizedToolTip();
+ if (!tooltip.isEmpty()) {
+ aList.add(tooltip);
+ }
+
+ String owner = werkstoff.getOwner();
+ if (owner != null) {
+ aList.add(BW_Tooltip_Reference.ADDED_VIA_BARTWORKS.apply(owner));
+ } else {
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+ } else {
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+ }
+
+ @Override
+ public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side,
+ float hitX, float hitY, float hitZ, int aMeta) {
+ short tDamage = (short) this.getDamage(aStack);
+ if (tDamage > 0) {
+ if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) {
+ return false;
+ }
+ BW_MetaGenerated_Block_TE tTileEntity = (BW_MetaGenerated_Block_TE) aWorld.getTileEntity(aX, aY, aZ);
+ tTileEntity.mMetaData = tDamage;
+ } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, 0, 3)) return false;
+ if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) {
+ this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack);
+ this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, tDamage);
+ }
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java
new file mode 100644
index 0000000000..6fb1650c1f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.List;
+import java.util.Optional;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+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) {
+ super(p_i45386_1_, tileEntity, blockName, prefixes);
+ }
+
+ @Override
+ public String getHarvestTool(int aMeta) {
+ return "wrench";
+ }
+
+ @Override
+ public int getHarvestLevel(int aMeta) {
+ return 2;
+ }
+
+ @Override
+ public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
+ return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ @Override
+ public float getExplosionResistance(Entity aTNT) {
+ return Blocks.iron_block.getExplosionResistance(aTNT);
+ }
+
+ @Override
+ protected boolean canSilkHarvest() {
+ return false;
+ }
+
+ @Override
+ public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ super.breakBlock(aWorld, aX, aY, aZ, aBlock, aMetaData);
+ }
+
+ @Override
+ public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
+ super.onBlockAdded(aWorld, aX, aY, aZ);
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+
+ @Override
+ protected void doRegistrationStuff(Werkstoff tMaterial) {
+ GregTech_API.registerMachineBlock(this, -1);
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ if (this._prefixes == OrePrefixes.blockCasing) return "bw.werkstoffblockscasing.01";
+ if (this._prefixes == OrePrefixes.blockCasingAdvanced) return "bw.werkstoffblockscasingadvanced.01";
+ return "";
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item aItem, CreativeTabs aTab, List<ItemStack> aList) {
+ Werkstoff.werkstoffHashSet.stream()
+ .filter(
+ pMaterial -> Werkstoff.Types.BIOLOGICAL.equals(pMaterial.getType())
+ && pMaterial.hasGenerationFeature(OrePrefixes.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);
+ }
+
+ /**
+ * ICustomBlockSetting setBlock override
+ */
+ public void setBlock(World world, int x, int y, int z, int meta) {
+ world.setBlock(x, y, z, this, meta, 2);
+ 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);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java
new file mode 100644
index 0000000000..02dd3c8f58
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public class BW_MetaGeneratedBlocks_CasingAdvanced_TE extends BW_MetaGenerated_Block_TE {
+
+ @Override
+ protected Block GetProperBlock() {
+ return WerkstoffLoader.BWBlockCasingsAdvanced;
+ }
+
+ @Override
+ public ITexture[] getTexture(Block aBlock, ForgeDirection side) {
+ if (SideReference.Side.Client) {
+ Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
+ if (aMaterial != null) {
+ TextureSet set = aMaterial.getTexSet();
+ ITexture aIconSet = TextureFactory.of(
+ PrefixTextureLinker.texMapBlocks.get(OrePrefixes.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),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java
new file mode 100644
index 0000000000..af61e1a68a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public class BW_MetaGeneratedBlocks_Casing_TE extends BW_MetaGenerated_Block_TE {
+
+ @Override
+ protected Block GetProperBlock() {
+ return WerkstoffLoader.BWBlockCasings;
+ }
+
+ @Override
+ public ITexture[] getTexture(Block aBlock, ForgeDirection side) {
+ if (SideReference.Side.Client) {
+ Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
+ if (aMaterial != null) {
+ TextureSet set = aMaterial.getTexSet();
+ ITexture aIconSet = TextureFactory.of(
+ PrefixTextureLinker.texMapBlocks.get(OrePrefixes.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),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java
new file mode 100644
index 0000000000..ee5a0a1511
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaPipeEntity;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_ModHandler.RecipeBits;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class BW_MetaGeneratedFrames extends MetaPipeEntity {
+
+ public final Werkstoff mMaterial;
+
+ public BW_MetaGeneratedFrames(int aID, String aName, String aNameRegional, Werkstoff aMaterial) {
+ super(aID, aName, aNameRegional, 0);
+ this.mMaterial = aMaterial;
+
+ GT_OreDictUnificator.registerOre(OrePrefixes.frameGt, aMaterial, this.getStackForm(1));
+ GT_ModHandler.addCraftingRecipe(
+ this.getStackForm(2),
+ RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[] { "SSS", "SwS", "SSS", 'S', this.mMaterial.get(OrePrefixes.stick) });
+
+ RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.getVarName(), 4),
+ ItemList.Circuit_Integrated.getWithDamage(0, 4))
+ .itemOutputs(getStackForm(1))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(8)
+ .addTo(assemblerRecipes);
+ }
+
+ private BW_MetaGeneratedFrames(String aName, Werkstoff aMaterial) {
+ super(aName, 0);
+ this.mMaterial = aMaterial;
+ }
+
+ @Override
+ public byte getTileEntityBaseType() {
+ return 4;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new BW_MetaGeneratedFrames(this.mName, this.mMaterial);
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, byte aConnections,
+ int 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." };
+ }
+
+ @Override
+ public final boolean isSimpleMachine() {
+ return true;
+ }
+
+ @Override
+ public final boolean isFacingValid(ForgeDirection facing) {
+ return false;
+ }
+
+ @Override
+ public final boolean isValidSlot(int aIndex) {
+ return false;
+ }
+
+ @Override
+ public final boolean renderInside(ForgeDirection side) {
+ return true;
+ }
+
+ @Override
+ public final float getThickNess() {
+ return 1.0F;
+ }
+
+ @Override
+ public final void saveNBTData(NBTTagCompound aNBT) {
+ /* Do nothing */
+ }
+
+ @Override
+ public final void loadNBTData(NBTTagCompound aNBT) {
+ /* Do nothing */
+ }
+
+ @Override
+ public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
+ ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
+ ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int connect(ForgeDirection side) {
+ return 0;
+ }
+
+ @Override
+ public void disconnect(ForgeDirection side) {
+ /* Do nothing */
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java
new file mode 100644
index 0000000000..9b393dff0f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import gregtech.GT_Mod;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class BW_MetaGeneratedOreTE extends BW_MetaGenerated_Block_TE {
+
+ protected static boolean shouldFortune = false;
+ protected static boolean shouldSilkTouch = false;
+ public boolean mNatural = false;
+
+ @Override
+ public void readFromNBT(NBTTagCompound aNBT) {
+ super.readFromNBT(aNBT);
+ this.mNatural = aNBT.getBoolean("n");
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound aNBT) {
+ super.writeToNBT(aNBT);
+ aNBT.setBoolean("n", this.mNatural);
+ }
+
+ @Override
+ public ITexture[] getTexture(Block aBlock, ForgeDirection side) {
+ 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 };
+ }
+ return new ITexture[] { TextureFactory.of(Blocks.stone),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) };
+ }
+
+ @Override
+ protected Block GetProperBlock() {
+ return WerkstoffLoader.BWOres;
+ }
+
+ @Override
+ public ArrayList<ItemStack> getDrops(int aFortune) {
+ ArrayList<ItemStack> rList = new ArrayList<>();
+ if (this.mMetaData <= 0) {
+ rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
+ return rList;
+ }
+ Materials aOreMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData)
+ .getBridgeMaterial();
+ if (shouldSilkTouch) {
+ rList.add(new ItemStack(this.GetProperBlock(), 1, this.mMetaData));
+ } else {
+ switch (GT_Mod.gregtechproxy.oreDropSystem) {
+ case Item -> {
+ rList.add(GT_OreDictUnificator.get(OrePrefixes.rawOre, aOreMaterial, 1));
+ }
+ case FortuneItem -> {
+ // if shouldFortune and isNatural then get fortune drops
+ // if not shouldFortune or not isNatural then get normal drops
+ // if not shouldFortune and isNatural then get normal drops
+ // if shouldFortune and not isNatural then get normal drops
+ if (shouldFortune && this.mNatural && aFortune > 0) {
+ int aMinAmount = 1;
+ // Max applicable fortune
+ if (aFortune > 3) aFortune = 3;
+ long amount = (long) new Random().nextInt(aFortune) + aMinAmount;
+ for (int i = 0; i < amount; i++) {
+ rList.add(GT_OreDictUnificator.get(OrePrefixes.rawOre, aOreMaterial, 1));
+ }
+ } else {
+ rList.add(GT_OreDictUnificator.get(OrePrefixes.rawOre, aOreMaterial, 1));
+ }
+ }
+ case UnifiedBlock -> {
+ // Unified ore
+ rList.add(new ItemStack(this.GetProperBlock(), 1, this.mMetaData));
+ }
+ case PerDimBlock -> {
+ // Per Dimension ore
+ rList.add(new ItemStack(this.GetProperBlock(), 1, this.mMetaData));
+ }
+ case Block -> {
+ // Regular ore
+ rList.add(new ItemStack(this.GetProperBlock(), 1, this.mMetaData));
+ }
+ }
+ }
+ return rList;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java
new file mode 100644
index 0000000000..110b17321f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.objects.XSTR;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+
+public class BW_MetaGeneratedSmallOreTE extends BW_MetaGeneratedOreTE {
+
+ @Override
+ public ArrayList<ItemStack> getDrops(int aFortune) {
+ ArrayList<ItemStack> rList = new ArrayList<>();
+ Materials aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData)
+ .getBridgeMaterial();
+
+ if (aMaterial != null) {
+ Random tRandom = new XSTR(this.xCoord ^ this.yCoord ^ this.zCoord);
+ ArrayList<ItemStack> tSelector = new ArrayList<>();
+
+ ItemStack tStack = GT_OreDictUnificator
+ .get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 1; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator
+ .get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 2; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 12; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(
+ OrePrefixes.gemFlawed,
+ aMaterial,
+ GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L),
+ 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 5; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 10; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(
+ OrePrefixes.gemChipped,
+ aMaterial,
+ GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
+ 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 5; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 10; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ if (tSelector.size() > 0) {
+ int i = 0;
+
+ for (int j = Math.max(1, aFortune > 0 ? tRandom.nextInt(1 + aFortune) : 0); i < j; ++i) {
+ rList.add(GT_Utility.copyAmount(1L, tSelector.get(tRandom.nextInt(tSelector.size()))));
+ }
+ }
+ if (tRandom.nextInt(3 + aFortune) > 1) {
+ rList.add(
+ GT_OreDictUnificator
+ .get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L));
+ }
+ }
+ return rList;
+ }
+
+ @Override
+ public ITexture[] getTexture(Block aBlock, ForgeDirection side) {
+ 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 };
+ }
+ return new ITexture[] { TextureFactory.of(Blocks.stone),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.oreSmall.mTextureIndex]) };
+ }
+
+ @Override
+ protected Block GetProperBlock() {
+ return WerkstoffLoader.BWSmallOres;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java
new file mode 100644
index 0000000000..77d3c23fbc
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+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;
+
+ @Override
+ public boolean canUpdate() {
+ return false;
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound aNBT) {
+ super.readFromNBT(aNBT);
+ this.mMetaData = aNBT.getShort("m");
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound aNBT) {
+ super.writeToNBT(aNBT);
+ aNBT.setShort("m", this.mMetaData);
+ }
+
+ @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);
+ return null;
+ }
+
+ protected abstract Block GetProperBlock();
+
+ public ArrayList<ItemStack> getDrops(int aFortune) {
+ ArrayList<ItemStack> rList = new ArrayList<>();
+ if (this.mMetaData <= 0) {
+ rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
+ return rList;
+ }
+ rList.add(new ItemStack(this.GetProperBlock(), 1, this.mMetaData));
+ return rList;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java
new file mode 100644
index 0000000000..84a498070a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.ITileEntityProvider;
+import net.minecraft.block.material.Material;
+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<>();
+ protected OrePrefixes _prefixes;
+ protected String blockTypeLocalizedName;
+
+ public BW_MetaGenerated_Blocks(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName) {
+ this(p_i45386_1_, tileEntity, blockName, null);
+ }
+
+ 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);
+ this.setBlockTextureName("stone");
+ this.setCreativeTab(metaTab);
+ this._prefixes = types;
+ if (this._prefixes != null) {
+ this.blockTypeLocalizedName = GT_LanguageManager.addStringLocalization(
+ "bw.blocktype." + this._prefixes,
+ this._prefixes.mLocalizedMaterialPre + "%material" + this._prefixes.mLocalizedMaterialPost);
+ }
+ Werkstoff.werkstoffHashSet.forEach(this::doRegistrationStuff);
+ }
+
+ @Override
+ public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
+ super.onBlockAdded(aWorld, aX, aY, aZ);
+ // Waste some time to allow the TE to be set, do not use thread sleep here, it doesnt allow for nanoseconds.
+ // This will just waste a few cpu cycles to allow the TE to be set
+ BW_Util.shortSleep(0);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public final BW_MetaGenerated_Block_TE getProperTileEntityForRendering() {
+ return (BW_MetaGenerated_Block_TE) this.createNewTileEntity(null, 0);
+ }
+
+ protected abstract void doRegistrationStuff(Werkstoff w);
+
+ @Override
+ public String getHarvestTool(int metadata) {
+ return "pickaxe";
+ }
+
+ @Override
+ protected boolean canSilkHarvest() {
+ return false;
+ }
+
+ @Override
+ public int getRenderType() {
+ if (BW_Renderer_Block_Ores.INSTANCE == null) return super.getRenderType();
+ return BW_Renderer_Block_Ores.INSTANCE.renderID;
+ }
+
+ @Override
+ public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (tTileEntity instanceof BW_MetaGenerated_Block_TE metaTE) {
+ return metaTE.mMetaData;
+ }
+ return 0;
+ }
+
+ @Override
+ public TileEntity createTileEntity(World world, int metadata) {
+ return ((ITileEntityProvider) this).createNewTileEntity(world, metadata);
+ }
+
+ @Override
+ public boolean hasTileEntity(int metadata) {
+ return true;
+ }
+
+ @Override
+ public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
+ TileEntity tTileEntity = world.getTileEntity(x, y, z);
+ if (tTileEntity instanceof BW_MetaGenerated_Block_TE metaTE) {
+ mTemporaryTileEntity.set(metaTE);
+ }
+ super.breakBlock(world, x, y, z, block, meta);
+ }
+
+ @Override
+ public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (tTileEntity instanceof BW_MetaGenerated_Block_TE metaTE) {
+ return metaTE.getDrops(aFortune);
+ }
+ return mTemporaryTileEntity.get() == null ? new ArrayList<>()
+ : mTemporaryTileEntity.get()
+ .getDrops(aFortune);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java
new file mode 100644
index 0000000000..4c355284ae
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.werkstoffHashSet;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+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") {
+
+ @Override
+ public Item getTabIconItem() {
+ return new ItemStack(Blocks.iron_ore).getItem();
+ }
+ };
+
+ protected final OrePrefixes orePrefixes;
+ protected final String itemTypeLocalizedName;
+
+ public BW_MetaGenerated_Items(OrePrefixes orePrefixes, Object unused) {
+ super("bwMetaGeneratedGTEnhancement" + orePrefixes.name(), (short) 32766, (short) 0);
+ this.orePrefixes = orePrefixes;
+ this.itemTypeLocalizedName = GT_LanguageManager.addStringLocalization(
+ "bw.itemtype." + orePrefixes,
+ orePrefixes.mLocalizedMaterialPre + "%material" + orePrefixes.mLocalizedMaterialPost);
+ }
+
+ public BW_MetaGenerated_Items(OrePrefixes orePrefixes) {
+ super("bwMetaGenerated" + orePrefixes.name(), (short) 32766, (short) 0);
+ this.orePrefixes = orePrefixes;
+ this.itemTypeLocalizedName = GT_LanguageManager.addStringLocalization(
+ "bw.itemtype." + orePrefixes,
+ orePrefixes.mLocalizedMaterialPre + "%material" + orePrefixes.mLocalizedMaterialPost);
+ this.setCreativeTab(BW_MetaGenerated_Items.metaTab);
+ for (Werkstoff w : werkstoffHashSet) {
+ ItemStack tStack = new ItemStack(this, 1, w.getmID());
+ if (!w.hasItemType(this.orePrefixes)) continue;
+ GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.getVarName(), tStack);
+ }
+ }
+
+ @Override
+ public boolean onEntityItemUpdate(EntityItem aItemEntity) {
+ if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure
+ || this.orePrefixes == OrePrefixes.crushed) {
+ int aDamage = aItemEntity.getEntityItem()
+ .getItemDamage();
+ if (aDamage >= 0 && !aItemEntity.worldObj.isRemote) {
+ Werkstoff aMaterial = werkstoffHashMap.get((short) aDamage);
+ if (aMaterial != null && aMaterial != Werkstoff.default_null_Werkstoff) {
+ int tX = MathHelper.floor_double(aItemEntity.posX);
+ int tY = MathHelper.floor_double(aItemEntity.posY);
+ int tZ = MathHelper.floor_double(aItemEntity.posZ);
+ Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
+ byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
+ if (tBlock == Blocks.cauldron && tMetaData > 0) {
+ if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure) {
+ aItemEntity.setEntityItemStack(
+ WerkstoffLoader.getCorrespondingItemStack(
+ OrePrefixes.dust,
+ aMaterial,
+ aItemEntity.getEntityItem().stackSize));
+ aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
+ return true;
+ } else {
+ aItemEntity.setEntityItemStack(
+ WerkstoffLoader.getCorrespondingItemStack(
+ OrePrefixes.crushedPurified,
+ aMaterial,
+ aItemEntity.getEntityItem().stackSize));
+ aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) {
+ 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
+ && aStack.getItemDamage() == WerkstoffLoader.Tiberium.getmID())
+ aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.nqgen"));
+
+ Werkstoff werkstoff = werkstoffHashMap.get((short) this.getDamage(aStack));
+ if (werkstoff != null) {
+ String tooltip = werkstoff.getLocalizedToolTip();
+ if (!tooltip.isEmpty()) {
+ aList.add(tooltip);
+ }
+
+ String owner = werkstoff.getOwner();
+ if (owner != null) {
+ aList.add(BW_Tooltip_Reference.ADDED_VIA_BARTWORKS.apply(owner));
+ } else {
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+ } else {
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack aStack) {
+ int aMetaData = aStack.getItemDamage();
+ Werkstoff werkstoff = werkstoffHashMap.get((short) aMetaData);
+ if (werkstoff == null) werkstoff = Werkstoff.default_null_Werkstoff;
+ return this.itemTypeLocalizedName.replace("%material", werkstoff.getLocalizedName());
+ }
+
+ @Override
+ public IIconContainer getIconContainer(int aMetaData) {
+ if (werkstoffHashMap.get((short) aMetaData) == null) return null;
+ if (this.orePrefixes.mTextureIndex == -1) return this.getIconContainerBartWorks(aMetaData);
+ return werkstoffHashMap.get((short) aMetaData)
+ .getTexSet().mTextures[this.orePrefixes.mTextureIndex];
+ }
+
+ protected IIconContainer getIconContainerBartWorks(int aMetaData) {
+ if (SideReference.Side.Client) return PrefixTextureLinker.texMap.get(this.orePrefixes)
+ .get(
+ werkstoffHashMap.get((short) aMetaData)
+ .getTexSet());
+ return null;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item var1, CreativeTabs aCreativeTab, List<ItemStack> aList) {
+ for (Werkstoff werkstoff : werkstoffHashSet) {
+ if (werkstoff != null && werkstoff.hasItemType(this.orePrefixes)) {
+ ItemStack tStack = new ItemStack(this, 1, werkstoff.getmID());
+ aList.add(tStack);
+ }
+ }
+ // super.getSubItems(var1, aCreativeTab, aList);
+ }
+
+ @Override
+ public short[] getRGBa(ItemStack aStack) {
+ Werkstoff werkstoff = werkstoffHashMap.get((short) this.getDamage(aStack));
+ return werkstoff == null ? Materials._NULL.mRGBa : werkstoff.getRGBA();
+ }
+
+ @Override
+ public void onUpdate(ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {
+ super.onUpdate(aStack, aWorld, aPlayer, aTimer, aIsInHand);
+ if (aStack == null || aStack.getItem() == null || !(aPlayer instanceof EntityLivingBase)) return;
+
+ EntityLivingBase bPlayer = (EntityPlayer) aPlayer;
+ Werkstoff w = werkstoffHashMap.get((short) aStack.getItemDamage());
+ if (w == null || w.getStats() == null) return;
+
+ if (w.getStats()
+ .isToxic() && !GT_Utility.isWearingFullBioHazmat(bPlayer)) {
+ bPlayer.addPotionEffect(new PotionEffect(Potion.poison.getId(), 80, 4));
+ }
+
+ if (w.getStats()
+ .isRadioactive() && !GT_Utility.isWearingFullRadioHazmat(bPlayer)) {
+ bPlayer.addPotionEffect(new PotionEffect(IC2Potion.radiation.id, 80, 4));
+ }
+ }
+
+ @Override
+ public IIcon getIconFromDamage(int aMetaData) {
+ if (aMetaData < 0) return null;
+ Werkstoff tMaterial = werkstoffHashMap.get((short) aMetaData);
+ if (tMaterial == null) return null;
+ IIconContainer tIcon = this.getIconContainer(aMetaData);
+ if (tIcon != null) return tIcon.getIcon();
+ return null;
+ }
+
+ @Override
+ public int getItemStackLimit(ItemStack aStack) {
+ return this.orePrefixes.mDefaultStackSize;
+ }
+
+ @Override
+ public int getRadiationLevel(ItemStack aStack) {
+ Werkstoff w = werkstoffHashMap.get((short) aStack.getItemDamage());
+ return w.getStats()
+ .isRadioactive()
+ ? (int) w.getStats()
+ .getProtons()
+ : 0;
+ }
+
+ @Override
+ public byte getAmountOfMaterial(ItemStack aStack) {
+ return (byte) (this.orePrefixes == OrePrefixes.stick ? 1 : this.orePrefixes == OrePrefixes.stickLong ? 2 : 0);
+ }
+
+ @Override
+ public short[] getColorForGUI(ItemStack aStack) {
+ Werkstoff w = werkstoffHashMap.get((short) aStack.getItemDamage());
+ return w.getRGBA();
+ }
+
+ @Override
+ public String getNameForGUI(ItemStack aStack) {
+ Werkstoff w = werkstoffHashMap.get((short) aStack.getItemDamage());
+ return w.getDefaultName();
+ }
+
+ @Override
+ public int getCapacity(ItemStack aStack) {
+ return this.orePrefixes == OrePrefixes.capsule || this.orePrefixes == OrePrefixes.cell
+ || this.orePrefixes == OrePrefixes.cellPlasma ? 1000
+ : this.orePrefixes == OrePrefixes.cellMolten || this.orePrefixes == OrePrefixes.capsuleMolten ? 144 : 0;
+ }
+
+ @Override
+ public ItemStack getContainerItem(ItemStack aStack) {
+ return this.orePrefixes == OrePrefixes.cell || this.orePrefixes == OrePrefixes.cellPlasma
+ || this.orePrefixes == OrePrefixes.cellMolten ? Materials.Empty.getCells(1) : null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java
new file mode 100644
index 0000000000..2adb0d3d35
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Ores.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Arrays;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.FakePlayer;
+
+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) {
+ super(p_i45386_1_, tileEntity, blockName);
+ this.blockTypeLocalizedName = GT_LanguageManager.addStringLocalization(
+ "bw.blocktype." + OrePrefixes.ore,
+ OrePrefixes.ore.mLocalizedMaterialPre + "%material" + OrePrefixes.ore.mLocalizedMaterialPost);
+ }
+
+ @Override
+ protected void doRegistrationStuff(Werkstoff w) {
+ if (w != null) {
+ if (!w.hasItemType(OrePrefixes.ore) || (w.getGenerationFeatures().blacklist & 0b1000) != 0) return;
+ GT_ModHandler.addValuableOre(this, w.getmID(), 1);
+ }
+ }
+
+ 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());
+ }
+
+ Block tBlock = aWorld.getBlock(aX, aY, aZ);
+ Block tOreBlock = WerkstoffLoader.BWOres;
+ if (aMetaData < 0 || tBlock == Blocks.air && !air
+ || Block.getIdFromBlock(tBlock) != Block.getIdFromBlock(block)) {
+ return false;
+ }
+ final int aaY = aY;
+ if (Arrays.stream(aBlockMeta)
+ .noneMatch(e -> e == aWorld.getBlockMetadata(aX, aaY, aZ))) {
+ return false;
+ }
+
+ aWorld.setBlock(aX, aY, aZ, tOreBlock, aMetaData, 0);
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (tTileEntity instanceof BW_MetaGeneratedOreTE metaTE) {
+ metaTE.mMetaData = (short) aMetaData;
+ metaTE.mNatural = true;
+ }
+
+ return true;
+ }
+
+ @Override
+ public IIcon getIcon(int side, int meta) {
+ return Blocks.stone.getIcon(0, 0);
+ }
+
+ @Override
+ public IIcon getIcon(IBlockAccess worldIn, int x, int y, int z, int side) {
+ return Blocks.stone.getIcon(0, 0);
+ }
+
+ @Override
+ public int getHarvestLevel(int metadata) {
+ return 3;
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return "bw.blockores.01";
+ }
+
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs aTab, List<ItemStack> aList) {
+ for (Werkstoff tMaterial : Werkstoff.werkstoffHashSet) {
+ if (tMaterial != null && tMaterial.hasItemType(OrePrefixes.ore)
+ && (tMaterial.getGenerationFeatures().blacklist & 0x8) == 0) {
+ aList.add(new ItemStack(aItem, 1, tMaterial.getmID()));
+ }
+ }
+ }
+
+ @Override
+ public void harvestBlock(World worldIn, EntityPlayer player, int x, int y, int z, int meta) {
+ if (EnchantmentHelper.getSilkTouchModifier(player)) {
+ BW_MetaGeneratedOreTE.shouldSilkTouch = true;
+ super.harvestBlock(worldIn, player, x, y, z, meta);
+
+ if (BW_MetaGeneratedOreTE.shouldSilkTouch) {
+ BW_MetaGeneratedOreTE.shouldSilkTouch = false;
+ }
+ return;
+ }
+
+ if (!(player instanceof FakePlayer)) {
+ BW_MetaGeneratedOreTE.shouldFortune = true;
+ }
+ super.harvestBlock(worldIn, player, x, y, z, meta);
+ if (BW_MetaGeneratedOreTE.shouldFortune) {
+ BW_MetaGeneratedOreTE.shouldFortune = false;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java
new file mode 100644
index 0000000000..0778645cb5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_SmallOres.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.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(
+ "bw.blocktype." + OrePrefixes.oreSmall,
+ OrePrefixes.oreSmall.mLocalizedMaterialPre + "%material" + OrePrefixes.oreSmall.mLocalizedMaterialPost);
+ }
+
+ @Override
+ protected void doRegistrationStuff(Werkstoff w) {
+ if (w != null) {
+ if (!w.hasItemType(OrePrefixes.ore) || (w.getGenerationFeatures().blacklist & 0b1000) != 0) return;
+ GT_ModHandler.addValuableOre(this, w.getmID(), 1);
+ }
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return "bw.blockores.02";
+ }
+
+ 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));
+ }
+
+ Block tBlock = aWorld.getBlock(aX, aY, aZ);
+ Block tOreBlock = WerkstoffLoader.BWSmallOres;
+ if (aMetaData < 0 || tBlock == Blocks.air && !air
+ || Block.getIdFromBlock(tBlock) != Block.getIdFromBlock(block)) {
+ return false;
+ }
+ final int aaY = aY;
+ if (Arrays.stream(aBlockMeta)
+ .noneMatch(e -> e == aWorld.getBlockMetadata(aX, aaY, aZ))) {
+ return false;
+ }
+
+ aWorld.setBlock(aX, aY, aZ, tOreBlock, aMetaData, 0);
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (tTileEntity instanceof BW_MetaGeneratedOreTE metaTE) {
+ metaTE.mMetaData = (short) aMetaData;
+ }
+
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java
new file mode 100644
index 0000000000..4456a66535
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlock_TE.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public class BW_MetaGenerated_WerkstoffBlock_TE extends BW_MetaGenerated_Block_TE {
+
+ @Override
+ public ITexture[] getTexture(Block aBlock, ForgeDirection side) {
+ if (SideReference.Side.Client) {
+ Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
+ if (aMaterial != null) {
+ TextureSet set = aMaterial.getTexSet();
+ ITexture aIconSet = TextureFactory.of(
+ 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),
+ TextureFactory.of(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]) };
+ }
+
+ @Override
+ protected Block GetProperBlock() {
+ return WerkstoffLoader.BWBlocks;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java
new file mode 100644
index 0000000000..648f9a0027
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_WerkstoffBlocks.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.List;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+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) {
+ super(p_i45386_1_, tileEntity, blockName);
+ this.blockTypeLocalizedName = GT_LanguageManager.addStringLocalization(
+ "bw.blocktype." + OrePrefixes.block,
+ OrePrefixes.block.mLocalizedMaterialPre + "%material" + OrePrefixes.block.mLocalizedMaterialPost);
+ }
+
+ @Override
+ protected void doRegistrationStuff(Werkstoff tMaterial) {}
+
+ @Override
+ public String getUnlocalizedName() {
+ return "bw.werkstoffblocks.01";
+ }
+
+ @Override
+ public IIcon getIcon(int side, int meta) {
+ return Blocks.iron_block.getIcon(0, 0);
+ }
+
+ @Override
+ public IIcon getIcon(IBlockAccess worldIn, int x, int y, int z, int side) {
+ return Blocks.iron_block.getIcon(0, 0);
+ }
+
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs tab, List<ItemStack> 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);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java
new file mode 100644
index 0000000000..db53437858
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public enum BW_NonMeta_MaterialItems implements IItemContainer {
+
+ Depleted_Tiberium_1,
+ Depleted_Tiberium_2,
+ Depleted_Tiberium_4,
+ TiberiumCell_1,
+ TiberiumCell_2,
+ TiberiumCell_4,
+ TheCoreCell,
+ Depleted_TheCoreCell;
+
+ private ItemStack mStack;
+ private boolean mHasNotBeenSet = true;
+
+ @Override
+ public IItemContainer set(Item aItem) {
+ this.mHasNotBeenSet = false;
+ if (aItem == null) return this;
+ ItemStack aStack = new ItemStack(aItem, 1, 0);
+ this.mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public IItemContainer set(ItemStack aStack) {
+ this.mHasNotBeenSet = false;
+ this.mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public Item getItem() {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return null;
+ return this.mStack.getItem();
+ }
+
+ @Override
+ public Block getBlock() {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ return GT_Utility.getBlockFromItem(this.getItem());
+ }
+
+ @Override
+ public final boolean hasBeenSet() {
+ return !this.mHasNotBeenSet;
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack) {
+ return this.isStackEqual(aStack, false, false);
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
+ if (GT_Utility.isStackInvalid(aStack)) return false;
+ return GT_Utility
+ .areUnificationsEqual((ItemStack) aStack, aWildcard ? this.getWildcard(1) : this.get(1), aIgnoreNBT);
+ }
+
+ @Override
+ public ItemStack get(long aAmount, Object... aReplacements) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(this.mStack));
+ }
+
+ @Override
+ public ItemStack getWildcard(long aAmount, Object... aReplacements) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(this.mStack));
+ }
+
+ @Override
+ public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(this.mStack));
+ }
+
+ @Override
+ public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility
+ .copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(this.mStack));
+ }
+
+ @Override
+ public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
+ ItemStack rStack = this.get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) return null;
+ rStack.setStackDisplayName(aDisplayName);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
+ ItemStack rStack = this.get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) return null;
+ GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(this.mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(this.mStack));
+ }
+
+ @Override
+ public IItemContainer registerOre(Object... aOreNames) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, this.get(1));
+ return this;
+ }
+
+ @Override
+ public IItemContainer registerWildcardAsOre(Object... aOreNames) {
+ if (this.mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!");
+ for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, this.getWildcard(1));
+ return this;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java
new file mode 100644
index 0000000000..6bd186a050
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_CircuitsLoader.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration;
+
+public class BW_CircuitsLoader {
+
+ private static final BW_Meta_Items NEW_CIRCUITS = new BW_Meta_Items();
+
+ private BW_CircuitsLoader() {}
+
+ public static BW_Meta_Items getNewCircuits() {
+ return BW_CircuitsLoader.NEW_CIRCUITS;
+ }
+
+ public static void initNewCircuits() {
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(0, 4, "Primitive Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(1, 5, "Basic Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(2, 6, "Good Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(3, 7, "Advanced Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(4, 8, "Data Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(5, 9, "Elite Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(6, 10, "Master Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(7, 11, "Ultimate Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(8, 12, "Superconductor Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(9, 13, "Infinite Magneto Resonatic Circuit");
+ BW_CircuitsLoader.NEW_CIRCUITS.addNewCircuit(10, 14, "Bio Magneto Resonatic Circuit");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java
new file mode 100644
index 0000000000..99eb6e7d7e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java
@@ -0,0 +1,396 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.recipe.RecipeMaps.formingPressRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+
+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.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;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TC_Aspects;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.IItemBehaviour;
+import gregtech.api.interfaces.IItemContainer;
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.objects.ItemData;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class BW_Meta_Items {
+
+ public static BW_Meta_Items.BW_GT_MetaGenCircuits getNEWCIRCUITS() {
+ return BW_Meta_Items.NEWCIRCUITS;
+ }
+
+ private static final BW_Meta_Items.BW_GT_MetaGenCircuits NEWCIRCUITS = new BW_Meta_Items.BW_GT_MetaGenCircuits();
+
+ static {
+ BW_Meta_Items.NEWCIRCUITS.addItem(0, "Circuit Imprint", "", SubTag.NO_UNIFICATION, SubTag.NO_RECYCLING);
+ BW_Meta_Items.NEWCIRCUITS.addItem(1, "Sliced Circuit", "", SubTag.NO_UNIFICATION, SubTag.NO_RECYCLING);
+ BW_Meta_Items.NEWCIRCUITS.addItem(2, "Raw Imprint supporting Board", "A Raw Board needed for Circuit Imprints");
+ BW_Meta_Items.NEWCIRCUITS.addItem(3, "Imprint supporting Board", "A Board needed for Circuit Imprints");
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ WerkstoffLoader.MagnetoResonaticDust.get(OrePrefixes.dust, 1),
+ WerkstoffLoader.ArInGaPhoBiBoTe.get(OrePrefixes.dust, 4))
+ .itemOutputs(BW_Meta_Items.NEWCIRCUITS.getStack(2))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(formingPressRecipes);
+
+ RecipeMaps.autoclaveRecipes.add(
+ new GT_Recipe(
+ 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,
+ (int) TierEU.RECIPE_EV,
+ BW_Util.CLEANROOM));
+ }
+
+ public void addNewCircuit(int aTier, int aID, String aName) {
+
+ String additionalOreDictData = "";
+ String tooltip = "";
+ String aOreDictPrefix = OrePrefixes.circuit.toString();
+ switch (aTier) {
+ case 0:
+ additionalOreDictData = Materials.Primitive.toString();
+ tooltip = Materials.Primitive.getToolTip();
+ break;
+ case 1:
+ additionalOreDictData = Materials.Basic.toString();
+ tooltip = Materials.Basic.getToolTip();
+ break;
+ case 2:
+ additionalOreDictData = Materials.Good.toString();
+ tooltip = Materials.Good.getToolTip();
+ break;
+ case 3:
+ additionalOreDictData = Materials.Advanced.toString();
+ tooltip = Materials.Advanced.getToolTip();
+ break;
+ case 4:
+ additionalOreDictData = Materials.Data.toString();
+ tooltip = Materials.Data.getToolTip();
+ break;
+ case 5:
+ additionalOreDictData = Materials.Elite.toString();
+ tooltip = Materials.Elite.getToolTip();
+ break;
+ case 6:
+ additionalOreDictData = Materials.Master.toString();
+ tooltip = Materials.Master.getToolTip();
+ break;
+ case 7:
+ additionalOreDictData = Materials.Ultimate.toString();
+ tooltip = Materials.Ultimate.getToolTip();
+ break;
+ case 8:
+ additionalOreDictData = Materials.SuperconductorUHV.toString();
+ tooltip = Materials.SuperconductorUHV.getToolTip();
+ break;
+ case 9:
+ additionalOreDictData = "Infinite";
+ tooltip = "An Infinite Circuit";
+ break;
+ case 10:
+ additionalOreDictData = "Bio";
+ tooltip = "A Bio Circuit";
+ break;
+ }
+
+ ItemStack tStack = BW_Meta_Items.NEWCIRCUITS.addCircuit(aID, aName, tooltip, aTier);
+
+ GT_OreDictUnificator.registerOre((aOreDictPrefix + additionalOreDictData).replace(" ", ""), tStack);
+ }
+
+ public static class BW_GT_MetaGenCircuits extends BW_Meta_Items.BW_GT_MetaGen_Item_Hook {
+
+ public BW_GT_MetaGenCircuits() {
+ super("bwMetaGeneratedItem0");
+ }
+
+ public final ItemStack addCircuit(int aID, String aEnglish, String aToolTip, int tier) {
+ CircuitImprintLoader.bwCircuitTagMap.put(
+ new CircuitData(
+ BW_Util.getMachineVoltageFromTier(Math.min(1, tier - 2)),
+ tier > 2 ? BW_Util.CLEANROOM : 0,
+ (byte) tier),
+ new ItemStack(BW_Meta_Items.NEWCIRCUITS, 1, aID));
+ return this.addItem(aID, aEnglish, aToolTip, SubTag.NO_UNIFICATION);
+ }
+
+ public final ItemStack getStack(int... meta_amount) {
+ ItemStack ret = new ItemStack(this);
+ if (meta_amount.length <= 0 || meta_amount.length > 2) return ret;
+ if (meta_amount.length == 1) {
+ ret.setItemDamage(meta_amount[0]);
+ return ret;
+ }
+ ret.setItemDamage(meta_amount[0]);
+ ret.stackSize = meta_amount[1];
+ return ret;
+ }
+
+ public final ItemStack getStackWithNBT(NBTTagCompound tag, int... meta_amount) {
+ ItemStack ret = this.getStack(meta_amount);
+ ret.setTagCompound(tag);
+ return ret;
+ }
+
+ @Override
+ public void getSubItems(Item var1, CreativeTabs aCreativeTab, List<ItemStack> aList) {
+ if (aCreativeTab == this.getCreativeTab())
+ for (NBTTagCompound tag : CircuitImprintLoader.recipeTagMap.keySet()) {
+ ItemStack stack = new ItemStack(BW_Meta_Items.NEWCIRCUITS, 1, 0);
+ stack.setTagCompound(tag);
+ aList.add(stack);
+ }
+ super.getSubItems(var1, aCreativeTab, aList);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public final void registerIcons(IIconRegister aIconRegister) {
+
+ for (short i = 0; i < CircuitImprintLoader.reverseIDs; ++i) {
+ if (this.mEnabledItems.get(i)) {
+ BW_Util.set2DCoordTo1DArray(
+ i,
+ 0,
+ 2,
+ aIconRegister.registerIcon(
+ "gregtech:" + (GT_Config.troll ? "troll" : this.getUnlocalizedName() + "/" + i)),
+ this.mIconList);
+ }
+ }
+
+ for (short i = CircuitImprintLoader.reverseIDs; i < Short.MAX_VALUE; i++) {
+ if (this.mEnabledItems.get(i)) {
+ BW_Util.set2DCoordTo1DArray(
+ i,
+ 0,
+ 2,
+ 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);
+ }
+ }
+ }
+
+ @Override
+ protected void addAdditionalToolTips(List<String> 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");
+ 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;
+
+ {
+ this.mIconList = new IIcon[Short.MAX_VALUE * 2];
+ this.mEnabledItems = new BitSet(Short.MAX_VALUE);
+ }
+
+ private BW_GT_MetaGen_Item_Hook(String aUnlocalized) {
+ super(aUnlocalized);
+
+ this.setCreativeTab(new CreativeTabs("bw.MetaItems.0") {
+
+ @Override
+ public Item getTabIconItem() {
+ return ItemRegistry.TAB;
+ }
+ });
+ this.setHasSubtypes(true);
+ this.setMaxDamage(0);
+ BW_Meta_Items.BW_GT_MetaGen_Item_Hook.sInstances.add(this);
+ }
+
+ @Override
+ public Long[] getElectricStats(ItemStack itemStack) {
+ return null;
+ }
+
+ @Override
+ public Long[] getFluidContainerStats(ItemStack itemStack) {
+ return null;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public final ItemStack addItem(int aID, String aEnglish, String aToolTip, Object... aRandomData) {
+ if (aToolTip == null) {
+ aToolTip = "";
+ }
+ ItemStack rStack = new ItemStack(this, 1, aID);
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish);
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip);
+ List<TC_Aspects.TC_AspectStack> tAspects = new ArrayList<>();
+ this.mEnabledItems.set(aID);
+ Object[] var7 = aRandomData;
+ int var8 = aRandomData.length;
+
+ int var9;
+ Object tRandomData;
+ for (var9 = 0; var9 < var8; ++var9) {
+ tRandomData = var7[var9];
+ if (tRandomData instanceof SubTag && tRandomData == SubTag.NO_UNIFICATION) {
+ GT_OreDictUnificator.addToBlacklist(rStack);
+ }
+ }
+
+ var7 = aRandomData;
+ var8 = aRandomData.length;
+
+ for (var9 = 0; var9 < var8; ++var9) {
+ tRandomData = var7[var9];
+ if (tRandomData != null) {
+ boolean tUseOreDict = true;
+
+ if (tRandomData instanceof IItemBehaviour) {
+ this.addItemBehavior(aID, (IItemBehaviour) tRandomData);
+ tUseOreDict = false;
+ }
+
+ if (tRandomData instanceof IItemContainer) {
+ ((IItemContainer) tRandomData).set(rStack);
+ tUseOreDict = false;
+ }
+
+ if (!(tRandomData instanceof SubTag)) {
+ if (tRandomData instanceof TC_Aspects.TC_AspectStack) {
+ ((TC_Aspects.TC_AspectStack) tRandomData).addToAspectList(tAspects);
+ } else if (tRandomData instanceof ItemData) {
+ if (GT_Utility.isStringValid(tRandomData)) {
+ GT_OreDictUnificator.registerOre(tRandomData, rStack);
+ } else {
+ GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData);
+ }
+ } else if (tUseOreDict) {
+ GT_OreDictUnificator.registerOre(tRandomData, rStack);
+ }
+ }
+ }
+ }
+
+ if (GregTech_API.sThaumcraftCompat != null) {
+ GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false);
+ }
+
+ return rStack;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item var1, CreativeTabs aCreativeTab, List<ItemStack> aList) {
+ int j = this.mEnabledItems.length();
+
+ for (int i = 0; i < j; ++i) {
+ if (this.mEnabledItems.get(i)) {
+ ItemStack tStack = new ItemStack(this, 1, i);
+ this.isItemStackUsable(tStack);
+ aList.add(tStack);
+ }
+ }
+ }
+
+ @Override
+ protected void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) {
+ super.addAdditionalToolTips(aList, aStack, aPlayer);
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack aStack) {
+ return this.getUnlocalizedName() + "." + aStack.getItemDamage();
+ }
+
+ @Override
+ public IIcon getIconFromDamage(int i) {
+ if (this.mEnabledItems.get(i)) return (IIcon) BW_Util.get2DCoordFrom1DArray(i, 0, 2, this.mIconList);
+ return null;
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem,
+ int useRemaining) {
+ return this.getIconFromDamage(stack.getItemDamage());
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return this.getIconFromDamage(stack.getItemDamage());
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java
new file mode 100644
index 0000000000..874ae202f1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.nio.ByteBuffer;
+
+import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
+
+public class CircuitData {
+
+ private long aVoltage;
+ private int aSpecial;
+ private byte aTier;
+
+ public CircuitData(long aVoltage, int aSpecial, byte aTier) {
+ this.aVoltage = aVoltage;
+ this.aSpecial = aSpecial;
+ this.aTier = aTier;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof CircuitData that)) return false;
+ if (this.getaVoltage() != that.getaVoltage() || this.getaSpecial() != that.getaSpecial()) return false;
+ return this.getaTier() == that.getaTier();
+ }
+
+ @Override
+ public int hashCode() {
+ return MurmurHash3.murmurhash3_x86_32(
+ ByteBuffer.allocate(13)
+ .put(this.aTier)
+ .putInt(this.aSpecial)
+ .putLong(this.aVoltage)
+ .array(),
+ 0,
+ 13,
+ 31);
+ }
+
+ public long getaVoltage() {
+ return this.aVoltage;
+ }
+
+ public void setaVoltage(long aVoltage) {
+ this.aVoltage = aVoltage;
+ }
+
+ public int getaSpecial() {
+ return this.aSpecial;
+ }
+
+ public void setaSpecial(int aSpecial) {
+ this.aSpecial = aSpecial;
+ }
+
+ public byte getaTier() {
+ return this.aTier;
+ }
+
+ public void setaTier(byte aTier) {
+ this.aTier = aTier;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
new file mode 100644
index 0000000000..5d3886b9e9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
@@ -0,0 +1,368 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.API.recipe.BWNBTDependantCraftingRecipe;
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.ASM.BWCoreStaticReplacementMethodes;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+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;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class CircuitImprintLoader {
+
+ public static short reverseIDs = Short.MAX_VALUE - 1;
+
+ public static final ArrayListMultimap<NBTTagCompound, GT_Recipe> recipeTagMap = ArrayListMultimap.create();
+ public static final HashBiMap<Short, ItemList> circuitIIconRefs = HashBiMap.create(20);
+ public static final HashSet<ItemStack> blacklistSet = new HashSet<>();
+ static final HashBiMap<CircuitData, ItemStack> bwCircuitTagMap = HashBiMap.create(20);
+ private static final HashSet<IRecipe> recipeWorldCache = new HashSet<>();
+ private static final HashSet<GT_Recipe> gtrecipeWorldCache = new HashSet<>();
+ private static final HashSet<GT_Recipe> ORIGINAL_CAL_RECIPES = new HashSet<>();
+ private static final HashSet<GT_Recipe> MODIFIED_CAL_RECIPES = new HashSet<>();
+
+ public static void run() {
+ HashSet<GT_Recipe> toRem = new HashSet<>();
+ HashSet<GT_Recipe> toAdd = new HashSet<>();
+
+ deleteCALRecipesAndTags();
+ rebuildCircuitAssemblerMap(toRem, toAdd);
+ exchangeRecipesInList(toRem, toAdd);
+ makeCircuitImprintRecipes();
+
+ toRem = null;
+ toAdd = null;
+ }
+
+ private static void reAddOriginalRecipes() {
+ RecipeMaps.circuitAssemblerRecipes.getBackend()
+ .removeRecipes(MODIFIED_CAL_RECIPES);
+ ORIGINAL_CAL_RECIPES.forEach(RecipeMaps.circuitAssemblerRecipes::add);
+ ORIGINAL_CAL_RECIPES.clear();
+ MODIFIED_CAL_RECIPES.clear();
+ }
+
+ private static void rebuildCircuitAssemblerMap(HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd) {
+ reAddOriginalRecipes();
+ RecipeMaps.circuitAssemblerRecipes.getAllRecipes()
+ .forEach(e -> CircuitImprintLoader.handleCircuitRecipeRebuilding(e, toRem, 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());
+
+ Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
+ ? FluidRegistry.getFluid("molten.indalloy140")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+
+ Fluid solderUEV = FluidRegistry.getFluid("molten.mutatedlivingsolder") != null
+ ? FluidRegistry.getFluid("molten.mutatedlivingsolder")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+
+ if (circuitRecipe.mFluidInputs[0].isFluidEqual(Materials.SolderingAlloy.getMolten(0))
+ || circuitRecipe.mFluidInputs[0].isFluidEqual(new FluidStack(solderIndalloy, 0))
+ || circuitRecipe.mFluidInputs[0].isFluidEqual(new FluidStack(solderUEV, 0))) {
+ GT_Recipe newRecipe = CircuitImprintLoader.reBuildRecipe(circuitRecipe);
+ if (newRecipe != null) BartWorksRecipeMaps.circuitAssemblyLineRecipes.addRecipe(newRecipe);
+ addCutoffRecipeToSets(toRem, toAdd, circuitRecipe);
+ } else if (circuitRecipe.mEUt > BW_Util.getTierVoltage(ConfigHandler.cutoffTier)) toRem.add(circuitRecipe);
+ }
+ }
+
+ private static boolean isCircuitOreDict(ItemStack item) {
+ return BW_Util.isTieredCircuit(item) || BW_Util.getOreNames(item)
+ .stream()
+ .anyMatch(s -> "circuitPrimitiveArray".equals(s));
+ }
+
+ private static void exchangeRecipesInList(HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd) {
+ toAdd.forEach(RecipeMaps.circuitAssemblerRecipes::add);
+ RecipeMaps.circuitAssemblerRecipes.getBackend()
+ .removeRecipes(toRem);
+ ORIGINAL_CAL_RECIPES.addAll(toRem);
+ MODIFIED_CAL_RECIPES.addAll(toAdd);
+ }
+
+ 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));
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ public static GT_Recipe makeMoreExpensive(GT_Recipe original) {
+ GT_Recipe newRecipe = original.copy();
+ for (ItemStack is : newRecipe.mInputs) {
+ if (!BW_Util.isTieredCircuit(is)) {
+ is.stackSize = Math.min(is.stackSize * 6, 64);
+ if (is.stackSize > is.getItem()
+ .getItemStackLimit() || is.stackSize > is.getMaxStackSize()) is.stackSize = is.getMaxStackSize();
+ }
+ }
+ newRecipe.mFluidInputs[0].amount *= 4;
+ newRecipe.mDuration *= 4;
+ return newRecipe;
+ }
+
+ public static GT_Recipe reBuildRecipe(GT_Recipe original) {
+ ItemStack[] in = new ItemStack[6];
+ BiMap<ItemList, Short> inversed = CircuitImprintLoader.circuitIIconRefs.inverse();
+
+ for (int i = 0; i < 6; i++) {
+ try {
+ replaceCircuits(inversed, original, in, i);
+ replaceComponents(in, original, i);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ break;
+ } catch (NullPointerException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (CircuitImprintLoader.checkForBlacklistedComponents(in)) {
+ return null;
+ }
+
+ return new GT_Recipe(
+ false,
+ in,
+ new ItemStack[] { getOutputMultiplied(original) },
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStackWithNBT(CircuitImprintLoader.getTagFromStack(original.mOutputs[0]), 0, 0),
+ null,
+ original.mFluidInputs,
+ null,
+ original.mDuration * 12,
+ original.mEUt,
+ 0);
+ }
+
+ private static ItemStack getOutputMultiplied(GT_Recipe original) {
+ ItemStack out = original.copy()
+ .getOutput(0);
+ out.stackSize *= 16;
+ return out;
+ }
+
+ 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);
+ }
+ }
+ }
+
+ 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)),
+ new Pair<>(ItemList.Circuit_Parts_Capacitor.get(1), ItemList.Circuit_Parts_CapacitorSMD.get(1)),
+ new Pair<>(ItemList.Circuit_Parts_Coil.get(1), ItemList.Circuit_Parts_InductorSMD.get(1))));
+
+ private static ItemStack replaceCircuitParts(ItemStack stack) {
+ for (Pair<ItemStack, ItemStack> pair : circuitPartsToReplace) {
+ if (GT_Utility.areStacksEqual(pair.getKey(), stack)) {
+ ItemStack newStack = pair.getValue();
+ newStack.stackSize = stack.stackSize;
+ return newStack;
+ }
+ }
+ return stack;
+ }
+
+ @SuppressWarnings("deprecation")
+ private static void replaceComponents(ItemStack[] in, GT_Recipe original, int index)
+ throws ArrayIndexOutOfBoundsException {
+ if (original.mInputs[index] != null && in[index] == null) {
+ // big wires
+ if (BW_Util.checkStackAndPrefix(original.mInputs[index])
+ && GT_OreDictUnificator.getAssociation(original.mInputs[index]).mPrefix == OrePrefixes.wireGt01) {
+ in[index] = GT_OreDictUnificator.get(
+ OrePrefixes.wireGt16,
+ GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial,
+ original.mInputs[index].stackSize);
+ // 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();
+ }
+ }
+ }
+
+ private static void makeCircuitImprintRecipes() {
+ removeOldRecipesFromRegistries();
+ CircuitImprintLoader.recipeTagMap.keySet()
+ .forEach(e -> {
+ makeAndAddSlicingRecipe(e);
+ makeAndAddCraftingRecipes(e);
+ });
+ }
+
+ private static boolean checkForBlacklistedComponents(ItemStack[] itemStacks) {
+ for (ItemStack is : itemStacks) {
+ for (ItemStack is2 : CircuitImprintLoader.blacklistSet) {
+ if (GT_Utility.areStacksEqual(is, is2)) return true;
+ }
+ }
+ return false;
+ }
+
+ private static void removeOldRecipesFromRegistries() {
+ recipeWorldCache.forEach(
+ CraftingManager.getInstance()
+ .getRecipeList()::remove);
+ BWCoreStaticReplacementMethodes.clearRecentlyUsedRecipes();
+ RecipeMaps.slicerRecipes.getBackend()
+ .removeRecipes(gtrecipeWorldCache);
+ recipeWorldCache.forEach(r -> {
+ try {
+ BW_Util.getGTBufferedRecipeList()
+ .remove(r);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ });
+ recipeWorldCache.clear();
+ gtrecipeWorldCache.clear();
+ }
+
+ private static void makeAndAddSlicingRecipe(NBTTagCompound tag) {
+ ItemStack stack = CircuitImprintLoader.getStackFromTag(tag);
+ int eut = Integer.MAX_VALUE;
+
+ for (GT_Recipe recipe : CircuitImprintLoader.recipeTagMap.get(tag)) {
+ eut = Math.min(eut, recipe.mEUt);
+ }
+
+ 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))));
+ GT_Recipe slicingRecipe = new GT_Recipe(
+ true,
+ new ItemStack[] { stack, ItemList.Shape_Slicer_Flat.get(0) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStackWithNBT(tag, 1, 1) },
+ null,
+ null,
+ null,
+ null,
+ 300,
+ eut,
+ BW_Util.CLEANROOM);
+ gtrecipeWorldCache.add(slicingRecipe);
+ RecipeMaps.slicerRecipes.add(slicingRecipe);
+ }
+
+ 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) };
+
+ IRecipe bwrecipe = new BWNBTDependantCraftingRecipe(circuit, imprintRecipe);
+ ShapedOreRecipe gtrecipe = BW_Util.createGTCraftingRecipe(
+ circuit,
+ GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.KEEPNBT
+ | GT_ModHandler.RecipeBits.BUFFERED,
+ imprintRecipe);
+
+ // Adds the actual recipe
+ recipeWorldCache.add(bwrecipe);
+ GameRegistry.addRecipe(bwrecipe);
+ // Adds the NEI visual recipe
+ recipeWorldCache.add(gtrecipe);
+ GameRegistry.addRecipe(gtrecipe);
+ }
+
+ public static NBTTagCompound getTagFromStack(ItemStack stack) {
+ if (GT_Utility.isStackValid(stack)) return BW_Util.setStackSize(stack.copy(), 1)
+ .writeToNBT(new NBTTagCompound());
+ return new NBTTagCompound();
+ }
+
+ public static ItemStack getStackFromTag(NBTTagCompound tagCompound) {
+ return ItemStack.loadItemStackFromNBT(tagCompound);
+ }
+
+ private static void deleteCALRecipesAndTags() {
+ BartWorksRecipeMaps.circuitAssemblyLineRecipes.getBackend()
+ .clearRecipes();
+ recipeTagMap.clear();
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java
new file mode 100644
index 0000000000..6db9c63134
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Circuit_Board_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Board_Basic;
+import static gregtech.api.enums.ItemList.Circuit_Board_Bio;
+import static gregtech.api.enums.ItemList.Circuit_Board_Bio_Ultra;
+import static gregtech.api.enums.ItemList.Circuit_Board_Coated;
+import static gregtech.api.enums.ItemList.Circuit_Board_Coated_Basic;
+import static gregtech.api.enums.ItemList.Circuit_Board_Elite;
+import static gregtech.api.enums.ItemList.Circuit_Board_Epoxy;
+import static gregtech.api.enums.ItemList.Circuit_Board_Epoxy_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Board_Fiberglass;
+import static gregtech.api.enums.ItemList.Circuit_Board_Fiberglass_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Board_Multifiberglass;
+import static gregtech.api.enums.ItemList.Circuit_Board_Multifiberglass_Elite;
+import static gregtech.api.enums.ItemList.Circuit_Board_Optical;
+import static gregtech.api.enums.ItemList.Circuit_Board_Phenolic;
+import static gregtech.api.enums.ItemList.Circuit_Board_Phenolic_Good;
+import static gregtech.api.enums.ItemList.Circuit_Board_Plastic;
+import static gregtech.api.enums.ItemList.Circuit_Board_Plastic_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Board_Wetware;
+import static gregtech.api.enums.ItemList.Circuit_Board_Wetware_Extreme;
+import static gregtech.api.enums.ItemList.Circuit_Chip_BioCPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_Biocell;
+import static gregtech.api.enums.ItemList.Circuit_Chip_CPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_CrystalCPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_CrystalSoC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_CrystalSoC2;
+import static gregtech.api.enums.ItemList.Circuit_Chip_HPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_ILC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_LPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_NAND;
+import static gregtech.api.enums.ItemList.Circuit_Chip_NOR;
+import static gregtech.api.enums.ItemList.Circuit_Chip_NPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_NanoCPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_NeuroCPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_Optical;
+import static gregtech.api.enums.ItemList.Circuit_Chip_PIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_PPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_QPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_QuantumCPU;
+import static gregtech.api.enums.ItemList.Circuit_Chip_Ram;
+import static gregtech.api.enums.ItemList.Circuit_Chip_Simple_SoC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_SoC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_SoC2;
+import static gregtech.api.enums.ItemList.Circuit_Chip_Stemcell;
+import static gregtech.api.enums.ItemList.Circuit_Chip_UHPIC;
+import static gregtech.api.enums.ItemList.Circuit_Chip_ULPIC;
+import static gregtech.api.enums.ItemList.Circuit_Integrated;
+import static gregtech.api.enums.ItemList.Circuit_Integrated_Good;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Parts_CapacitorASMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_CapacitorSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_CapacitorXSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Chip_Bioware;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Crystal_Chip_Elite;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Crystal_Chip_Master;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Crystal_Chip_Wetware;
+import static gregtech.api.enums.ItemList.Circuit_Parts_DiodeASMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_DiodeSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_DiodeXSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_GlassFiber;
+import static gregtech.api.enums.ItemList.Circuit_Parts_InductorASMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_InductorSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_InductorXSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_PetriDish;
+import static gregtech.api.enums.ItemList.Circuit_Parts_ResistorASMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_ResistorSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_ResistorXSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_TransistorASMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_TransistorSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_TransistorXSMD;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Vacuum_Tube;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Wiring_Advanced;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Wiring_Basic;
+import static gregtech.api.enums.ItemList.Circuit_Parts_Wiring_Elite;
+import static gregtech.api.enums.ItemList.Optical_Cpu_Containment_Housing;
+import static gregtech.api.enums.ItemList.Optically_Compatible_Memory;
+import static gregtech.api.enums.ItemList.Optically_Perfected_CPU;
+import static gregtech.api.enums.ItemList.values;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+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.enums.TierEU;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Utility;
+
+public class CircuitPartLoader implements Runnable {
+
+ @Override
+ public void run() {
+ CircuitPartLoader.makeCircuitParts();
+ if (FMLCommonHandler.instance()
+ .getEffectiveSide()
+ .isClient()) new BW_GT_ItemRenderer();
+ }
+
+ public static void makeCircuitParts() {
+ ItemList[] itemLists = values();
+ for (ItemList single : itemLists) {
+ if (!single.hasBeenSet()) continue;
+ if (single.toString()
+ .contains("Wafer")
+ || single.toString()
+ .contains("Circuit_Silicon_Ingot")
+ || single.toString()
+ .contains("Raw")
+ || single.toString()
+ .contains("raw")
+ || single.toString()
+ .contains("Glass_Tube")
+ || single == Circuit_Parts_GlassFiber
+ || single == Circuit_Parts_Advanced
+ || single == Circuit_Parts_Wiring_Advanced
+ || single == Circuit_Parts_Wiring_Elite
+ || single == Circuit_Parts_Wiring_Basic
+ || single == Circuit_Integrated
+ || single == Circuit_Parts_PetriDish
+ || single == Circuit_Parts_Vacuum_Tube
+ || single == Circuit_Integrated_Good) {
+
+ CircuitImprintLoader.blacklistSet.add(single.get(1));
+ }
+ }
+
+ for (ItemList single : CIRCUIT_PARTS) {
+ if (!single.hasBeenSet()) continue;
+ ItemStack itemStack = single.get(1);
+ if (!GT_Utility.isStackValid(itemStack)) continue;
+ ArrayList<String> toolTip = new ArrayList<>();
+ 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));
+ BW_Meta_Items.getNEWCIRCUITS()
+ .addItem(CircuitImprintLoader.reverseIDs, "Wrap of " + localised + "s", tt);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ single.get(16)
+ .copy(),
+ GT_Utility.getIntegratedCircuit(16))
+ .itemOutputs(
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(CircuitImprintLoader.reverseIDs))
+ .fluidInputs(Materials.Plastic.getMolten(72))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(assemblerRecipes);
+
+ CircuitImprintLoader.circuitIIconRefs.put(CircuitImprintLoader.reverseIDs, single);
+ CircuitImprintLoader.reverseIDs--;
+ }
+ }
+
+ /**
+ * 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,
+ Circuit_Parts_Crystal_Chip_Wetware,
+ Circuit_Parts_Chip_Bioware));
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java
new file mode 100644
index 0000000000..91dc709609
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.util.IIcon;
+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.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.enums.TextureSet;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.render.items.GT_GeneratedMaterial_Renderer;
+
+public class BWGTMetaItems extends BW_MetaGenerated_Items {
+
+ private boolean hasList;
+ private final Set<Integer> hiddenThings = new HashSet<>();
+
+ public BWGTMetaItems(OrePrefixes orePrefixes, List<Materials> noSubIDMaterials) {
+ super(orePrefixes, null);
+ // materialloop:
+ for (int i = 0; i < Materials.values().length; i++) {
+ ItemStack tStack = new ItemStack(this, 1, i);
+ Materials material = Materials.values()[i];
+ if (material.getMolten(1) == null && orePrefixes == OrePrefixes.capsuleMolten
+ || material.getFluid(1) == null && material.getGas(1) == null
+ && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))
+ continue;
+
+ if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + material.mDefaultLocalName.replace(" ", ""))) {
+ this.hiddenThings.add(i);
+ continue;
+ }
+ GT_OreDictUnificator
+ .registerOre(this.orePrefixes.name() + material.mDefaultLocalName.replace(" ", ""), tStack);
+ }
+
+ if (noSubIDMaterials != null) {
+ this.hasList = true;
+ // materialloop:
+ for (int i = 0; i < noSubIDMaterials.size(); i++) {
+ ItemStack tStack = new ItemStack(this, 1, i + 1001);
+ Materials w = noSubIDMaterials.get(i);
+ if (w.getMolten(1) == null && orePrefixes == OrePrefixes.capsuleMolten
+ || w.getFluid(1) == null && w.getGas(1) == null
+ && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle))
+ continue;
+
+ if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replace(" ", ""))) {
+ this.hiddenThings.add(i);
+ continue;
+ }
+ GT_OreDictUnificator
+ .registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replace(" ", ""), tStack);
+ }
+ }
+ }
+
+ private Materials getMaterial(ItemStack is) {
+ if (is == null || is.getItem() != this) return null;
+ final int meta = is.getItemDamage();
+ return this.getMaterialFromMeta(meta);
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack aStack) {
+ Materials material = this.getMaterial(aStack);
+ if (material == null) material = Materials._NULL;
+ return material.getLocalizedNameForItem(this.itemTypeLocalizedName);
+ }
+
+ @Override
+ protected void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) {
+ Materials material = this.getMaterial(aStack);
+ if (material != null) {
+ String tooltip = material.getToolTip();
+ if (tooltip != null && !tooltip.isEmpty()) {
+ aList.add(tooltip);
+ }
+ }
+ aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get());
+ }
+
+ @Override
+ public IIconContainer getIconContainer(int aMetaData) {
+ if (this.orePrefixes.mTextureIndex == -1) return this.getIconContainerBartWorks(aMetaData);
+ Materials material = this.getMaterialFromMeta(aMetaData);
+ if (material != null) {
+ return material.mIconSet.mTextures[this.orePrefixes.mTextureIndex];
+ }
+ return null;
+ }
+
+ @Override
+ protected IIconContainer getIconContainerBartWorks(int aMetaData) {
+ if (SideReference.Side.Server || PrefixTextureLinker.texMap == null) return null;
+
+ HashMap<TextureSet, Textures.ItemIcons.CustomIcon> iconLink = PrefixTextureLinker.texMap.get(this.orePrefixes);
+
+ if (iconLink == null) return null;
+
+ Materials material = this.getMaterialFromMeta(aMetaData);
+
+ if (material == null || material.mIconSet == null) return null;
+
+ return iconLink.getOrDefault(material.mIconSet, iconLink.get(TextureSet.SET_DULL));
+ }
+
+ @Override
+ public IIcon getIconFromDamage(int aMetaData) {
+ return this.getIcon(aMetaData, 0);
+ }
+
+ @Override
+ public GT_GeneratedMaterial_Renderer getMaterialRenderer(int aMetaData) {
+ return this.getMaterialFromMeta(aMetaData).renderer;
+ }
+
+ public Materials getMaterialFromMeta(int aMetaData) {
+ if (aMetaData > 1000 && this.hasList) {
+ return NoMetaValue.get(aMetaData - 1001);
+ }
+ if (aMetaData < 0 || aMetaData >= Materials.values().length) {
+ return null;
+ }
+ return Materials.values()[aMetaData];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item var1, CreativeTabs aCreativeTab, List<ItemStack> 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.getMolten(1) == null && this.orePrefixes == OrePrefixes.capsuleMolten
+ || w.getFluid(1) == null && w.getGas(1) == null
+ && (this.orePrefixes == OrePrefixes.capsule || this.orePrefixes == OrePrefixes.bottle))
+ continue;
+ else if (this.hiddenThings.contains(i)) continue;
+ aList.add(new ItemStack(this, 1, i));
+ }
+ if (this.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;
+ if (w.getMolten(1) == null && this.orePrefixes == OrePrefixes.capsuleMolten
+ || w.getFluid(1) == null && w.getGas(1) == null
+ && (this.orePrefixes == OrePrefixes.capsule || this.orePrefixes == OrePrefixes.bottle))
+ continue;
+ else if (this.hiddenThings.contains(i)) continue;
+ aList.add(new ItemStack(this, 1, i + 1001));
+ }
+ }
+
+ @Override
+ public short[] getColorForGUI(ItemStack aStack) {
+ return this.getMaterial(aStack).mRGBa;
+ }
+
+ @Override
+ public String getNameForGUI(ItemStack aStack) {
+ return this.getMaterial(aStack).mDefaultLocalName;
+ }
+
+ @Override
+ public void onUpdate(ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {}
+
+ @Override
+ public short[] getRGBa(ItemStack aStack) {
+ return this.getMaterial(aStack).mRGBa;
+ }
+
+ @Override
+ public boolean onEntityItemUpdate(EntityItem aItemEntity) {
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java
new file mode 100644
index 0000000000..5b475dc069
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 gregtech.api.enums.Mods.Forestry;
+import static gregtech.api.recipe.RecipeMaps.fluidCannerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+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() {}
+
+ public static void init() {
+ if (!Forestry.isModLoaded()) {
+ return;
+ }
+ NoMetaValue = Materials.getMaterialsMap()
+ .values()
+ .stream()
+ .filter(m -> m.mMetaItemSubID == -1)
+ .collect(Collectors.toList());
+ Item moltenCapsuls = new BWGTMetaItems(OrePrefixes.capsuleMolten, null);
+ Item capsuls = new BWGTMetaItems(OrePrefixes.capsule, NoMetaValue);
+ // Item bottles = new BWGTMetaItems(OrePrefixes.bottle, NoMetaValue);
+
+ Materials[] values = Materials.values();
+ for (int i = 0, valuesLength = values.length; i < valuesLength; i++) {
+ Materials m = values[i];
+ if (m.mStandardMoltenFluid != null && GT_OreDictUnificator.get(OrePrefixes.cellMolten, m, 1) != null) {
+ final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
+ m.getMolten(144),
+ new ItemStack(moltenCapsuls, 1, i),
+ GT_ModHandler.getModItem(Forestry.ID, "refractoryEmpty", 1));
+ FluidContainerRegistry.registerFluidContainer(emptyData);
+ GT_Utility.addFluidContainerData(emptyData);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_ModHandler.getModItem(Forestry.ID, "refractoryEmpty", 1))
+ .itemOutputs(new ItemStack(moltenCapsuls, 1, i))
+ .fluidInputs(m.getMolten(144))
+ .duration(2 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(moltenCapsuls, 1, i))
+ .fluidOutputs(m.getMolten(144))
+ .duration(2 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ }
+ if (m.getFluid(1) == null && m.getGas(1) == null || OreDictionary.doesOreNameExist("capsule" + m.mName))
+ continue;
+ addFluidData(m, GT_ModHandler.getModItem(Forestry.ID, "waxCapsule", 1), capsuls, 1000, i, true);
+ // 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 || OreDictionary.doesOreNameExist("capsule" + m.mName))
+ continue;
+ addFluidData(m, GT_ModHandler.getModItem(Forestry.ID, "waxCapsule", 1), capsuls, 1000, i + 1001, true);
+ // 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);
+ FluidContainerRegistry.registerFluidContainer(emptyData);
+ GT_Utility.addFluidContainerData(emptyData);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(container)
+ .itemOutputs(new ItemStack(filled, 1, it))
+ .fluidInputs(new FluidStack(f, amount))
+ .duration(amount / 62)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(new ItemStack(filled, 1, it))
+ .fluidOutputs(new FluidStack(f, amount))
+ .duration(amount / 62)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ }
+
+ public static void addAdditionalOreDictToForestry() {
+ if (!Forestry.isModLoaded()) return;
+ OreDictionary.registerOre("capsuleWater", getForestryItem("waxCapsuleWater"));
+ OreDictionary.registerOre("capsuleIce", getForestryItem("waxCapsuleIce"));
+ OreDictionary.registerOre("capsuleHoney", getForestryItem("waxCapsuleHoney"));
+ OreDictionary.registerOre("capsuleJuice", getForestryItem("waxCapsuleJuice"));
+ OreDictionary.registerOre("capsuleSeedOil", getForestryItem("waxCapsuleSeedOil"));
+ OreDictionary.registerOre("capsuleEthanol", getForestryItem("waxCapsuleEthanol"));
+ OreDictionary.registerOre("capsuleBiomass", getForestryItem("waxCapsuleBiomass"));
+ OreDictionary.registerOre("capsuleShortMead", getForestryItem("waxCapsuleShortMead"));
+ OreDictionary.registerOre("capsuleMead", getForestryItem("waxCapsuleMead"));
+ OreDictionary.registerOre("capsuleFuel", getForestryItem("waxCapsuleFuel"));
+ OreDictionary.registerOre("capsuleOil", getForestryItem("waxCapsuleOil"));
+ OreDictionary.registerOre("capsuleLava", getForestryItem("refractoryLava"));
+ }
+
+ private static ItemStack getForestryItem(String itemName) {
+ return GT_ModHandler.getModItem(Forestry.ID, itemName, 1);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
new file mode 100644
index 0000000000..ba08d083c2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
@@ -0,0 +1,1158 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.WerkstoffLoader.AcidicIridiumSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.AcidicOsmiumSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.AmmoniumChloride;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.AquaRegia;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.CalciumChloride;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.CrudeRhMetall;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FormicAcid;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.HotRutheniumTetroxideSollution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.IrLeachResidue;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.IrOsLeachResidue;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.IridiumChloride;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.IridiumDioxide;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.LeachResidue;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.OsmiumSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PDAmmonia;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PDMetallicPowder;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PDRawPowder;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PDSalt;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PGSDResidue;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PGSDResidue2;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTConcentrate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTMetallicPowder;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTRawPowder;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTResidue;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTSaltCrude;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PTSaltRefined;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.PotassiumDisulfate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHFilterCakeSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHNitrate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHSalt;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHSaltSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHSulfate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RHSulfateSolution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.ReRh;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RhFilterCake;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Rhodium;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Ruthenium;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RutheniumTetroxide;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RutheniumTetroxideSollution;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.SodiumNitrate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.SodiumRuthenate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Sodiumformate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Sodiumsulfate;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.ZincSulfate;
+import static gregtech.api.enums.Mods.GTPlusPlus;
+import static gregtech.api.enums.Mods.GalaxySpace;
+import static gregtech.api.enums.Mods.NewHorizonsCoreMod;
+import static gregtech.api.enums.OrePrefixes.cell;
+import static gregtech.api.enums.OrePrefixes.crateGtDust;
+import static gregtech.api.enums.OrePrefixes.crushed;
+import static gregtech.api.enums.OrePrefixes.crushedCentrifuged;
+import static gregtech.api.enums.OrePrefixes.crushedPurified;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustImpure;
+import static gregtech.api.enums.OrePrefixes.dustPure;
+import static gregtech.api.enums.OrePrefixes.dustRefined;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.nugget;
+import static gregtech.api.enums.OrePrefixes.rawOre;
+import static gregtech.api.recipe.RecipeMaps.blastFurnaceRecipes;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidHeaterRecipes;
+import static gregtech.api.recipe.RecipeMaps.mixerRecipes;
+import static gregtech.api.recipe.RecipeMaps.sifterRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT;
+import static gregtech.api.util.GT_RecipeConstants.UniversalChemical;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.CraftingManager;
+import net.minecraft.item.crafting.FurnaceRecipes;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.item.crafting.ShapedRecipes;
+import net.minecraft.item.crafting.ShapelessRecipes;
+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.MainMod;
+import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Items;
+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;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.items.GT_Generic_Block;
+import gregtech.api.items.GT_Generic_Item;
+import gregtech.api.objects.ItemData;
+import gregtech.api.objects.MaterialStack;
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+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 gregtech.common.blocks.GT_Block_Ores_Abstract;
+
+public class PlatinumSludgeOverHaul {
+
+ private static final Materials[] BLACKLIST = { Materials.HSSS, Materials.EnderiumBase, Materials.Osmiridium,
+ Materials.TPV, 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() {}
+
+ private static void runHelperrecipes() {
+ // DilutedSulfuricAcid
+ // 2H2SO4 + H2O = 3H2SO4(d)
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.SulfuricAcid.getCells(2),
+ Materials.Water.getCells(1),
+ GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.DilutedSulfuricAcid.getCells(3))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidInputs(Materials.SulfuricAcid.getFluid(2000))
+ .fluidOutputs(Materials.DilutedSulfuricAcid.getFluid(3000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.SulfuricAcid.getCells(2), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.Empty.getCells(2))
+ .fluidInputs(Materials.Water.getFluid(1000))
+ .fluidOutputs(Materials.DilutedSulfuricAcid.getFluid(3000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+ // FormicAcid
+ // CO + NaOH = CHO2Na
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.CarbonMonoxide.getCells(1), Materials.SodiumHydroxide.getDust(3))
+ .itemOutputs(Sodiumformate.get(cell))
+ .duration(15 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+ // H2SO4 + 2CHO2Na = 2CH2O2 + Na2SO4
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Sodiumformate.get(cell, 2), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(FormicAcid.get(cell, 2), Sodiumsulfate.get(dust, 7))
+ .fluidInputs(Materials.SulfuricAcid.getFluid(1000))
+ .duration(15 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.Empty.getCells(1), Sodiumsulfate.get(dust, 7))
+ .fluidInputs(Sodiumformate.getFluidOrGas(2000))
+ .fluidOutputs(FormicAcid.getFluidOrGas(2000))
+ .duration(15 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ // AquaRegia
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.DilutedSulfuricAcid.getCells(1),
+ Materials.NitricAcid.getCells(1),
+ GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(AquaRegia.get(cell, 2))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ Materials.DilutedSulfuricAcid.getCells(1),
+ Materials.NitricAcid.getCells(1),
+ GT_Utility.getIntegratedCircuit(2))
+ .itemOutputs(Materials.Empty.getCells(2))
+ .fluidOutputs(AquaRegia.getFluidOrGas(2000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.NitricAcid.getCells(1), GT_Utility.getIntegratedCircuit(3))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidInputs(Materials.DilutedSulfuricAcid.getFluid(1000))
+ .fluidOutputs(AquaRegia.getFluidOrGas(2000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.DilutedSulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(4))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidInputs(Materials.NitricAcid.getFluid(1000))
+ .fluidOutputs(AquaRegia.getFluidOrGas(2000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ // AmmoniumChloride
+ // NH3 + HCl = NH4Cl
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(AmmoniumChloride.get(cell, 1))
+ .fluidInputs(Materials.HydrochloricAcid.getFluid(1000))
+ .duration(15 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidInputs(Materials.Ammonia.getGas(1000))
+ .fluidOutputs(AmmoniumChloride.getFluidOrGas(1000))
+ .duration(15 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.addMultiblockChemicalRecipe(
+ new ItemStack[] { GT_Utility.getIntegratedCircuit(9) },
+ new FluidStack[] { Materials.Ammonia.getGas(64000), Materials.HydrochloricAcid.getFluid(64000) },
+ new FluidStack[] { AmmoniumChloride.getFluidOrGas(64000) },
+ null,
+ 60,
+ 480);
+ // base solution
+ for (Werkstoff w : Werkstoff.werkstoffHashSet) if (w.containsStuff(Materials.Sulfur)
+ && (w.containsStuff(Materials.Copper) || w.containsStuff(Materials.Nickel))) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(w.get(crushedPurified), GT_Utility.getIntegratedCircuit(1))
+ .fluidInputs(AquaRegia.getFluidOrGas(150))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(150))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(w.get(crushedPurified, 9), GT_Utility.getIntegratedCircuit(9))
+ .fluidInputs(AquaRegia.getFluidOrGas(1350))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(1350))
+ .duration(11 * SECONDS + 5 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(w.get(crushedPurified, 9), PTMetallicPowder.get(dust, 9))
+ .itemOutputs(PTResidue.get(dust))
+ .fluidInputs(AquaRegia.getFluidOrGas(10350))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(10350))
+ .duration(1 * MINUTES + 52 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ }
+ for (Materials m : Materials.values()) if (PlatinumSludgeOverHaul.materialsContains(m, Materials.Sulfur)
+ && (PlatinumSludgeOverHaul.materialsContains(m, Materials.Copper)
+ || PlatinumSludgeOverHaul.materialsContains(m, Materials.Nickel))) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_OreDictUnificator.get(crushedPurified, m, 1), GT_Utility.getIntegratedCircuit(1))
+ .fluidInputs(AquaRegia.getFluidOrGas(150))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(150))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_OreDictUnificator.get(crushedPurified, m, 9), GT_Utility.getIntegratedCircuit(9))
+ .fluidInputs(AquaRegia.getFluidOrGas(1350))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(1350))
+ .duration(1 * MINUTES + 52 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_OreDictUnificator.get(crushedPurified, m, 9), PTMetallicPowder.get(dust, 9))
+ .itemOutputs(PTResidue.get(dust))
+ .fluidInputs(AquaRegia.getFluidOrGas(10350))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(10350))
+ .duration(1 * MINUTES + 52 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ }
+ // Pt
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTMetallicPowder.get(dust, 3), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(Materials.Platinum.getNuggets(2))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, Materials.Platinum.mMeltingPoint)
+ .addTo(blastFurnaceRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTMetallicPowder.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(PTResidue.get(dustTiny))
+ .fluidInputs(AquaRegia.getFluidOrGas(1000))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(1000))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTMetallicPowder.get(dust, 9), GT_Utility.getIntegratedCircuit(9))
+ .itemOutputs(PTResidue.get(dust))
+ .fluidInputs(AquaRegia.getFluidOrGas(9000))
+ .fluidOutputs(PTConcentrate.getFluidOrGas(9000))
+ .duration(1 * MINUTES + 52 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTConcentrate.get(cell, 2))
+ .itemOutputs(
+ PTSaltCrude.get(dustTiny, 16),
+ PTRawPowder.get(dustTiny, 4),
+ Materials.NitrogenDioxide.getCells(1),
+ Materials.DilutedSulfuricAcid.getCells(1))
+ .fluidInputs(AmmoniumChloride.getFluidOrGas(400))
+ .fluidOutputs(PDAmmonia.getFluidOrGas(400))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(centrifugeRecipes);
+
+ 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) },
+ 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) },
+ 1400,
+ 240);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTSaltCrude.get(dust))
+ .itemOutputs(
+ 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))
+ .outputChances(1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500)
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(sifterRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTSaltRefined.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(PTMetallicPowder.get(dust))
+ .fluidOutputs(Materials.Chlorine.getGas(87))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 900)
+ .addTo(blastFurnaceRecipes);
+
+ // 2PtCl + Ca = 2Pt + CaCl2
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTRawPowder.get(dust, 4), Materials.Calcium.getDust(1))
+ .itemOutputs(Materials.Platinum.getDust(2), CalciumChloride.get(dust, 3))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+ // Pd
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PDMetallicPowder.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .fluidInputs(Materials.Ammonia.getGas(1000))
+ .fluidOutputs(PDAmmonia.getFluidOrGas(1000))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PDMetallicPowder.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(PDSalt.get(dustTiny, 16), PDRawPowder.get(dustTiny, 2))
+ .fluidInputs(PDAmmonia.getFluidOrGas(1000))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PDMetallicPowder.get(dust, 9), GT_Utility.getIntegratedCircuit(9))
+ .itemOutputs(PDSalt.get(dust, 16), PDRawPowder.get(dust, 2))
+ .fluidInputs(PDAmmonia.getFluidOrGas(9000))
+ .duration(1 * MINUTES + 52 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(2))
+ .itemOutputs(PDSalt.get(dust))
+ .fluidInputs(PDAmmonia.getFluidOrGas(1000))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PDSalt.get(dust))
+ .itemOutputs(
+ 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))
+ .outputChances(1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500)
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(sifterRecipes);
+
+ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(
+ PDRawPowder.get(dust, 4),
+ Materials.Empty.getCells(1),
+ FormicAcid.getFluidOrGas(4000),
+ Materials.Ammonia.getGas(4000),
+ Materials.Palladium.getDust(2),
+ Materials.Ethylene.getCells(1),
+ 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) },
+ 250,
+ 30);
+ // Na2SO4 + 2H = 2Na + H2SO4
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Sodiumsulfate.get(dust, 7), Materials.Hydrogen.getCells(2))
+ .itemOutputs(Materials.Sodium.getDust(2), Materials.Empty.getCells(2))
+ .fluidOutputs(Materials.SulfuricAcid.getFluid(1000))
+ .duration(1 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ // K2S2O7
+ // GT_Values.RA.addChemicalRecipe(Sodiumsulfate.get(dust), Materials.Potassium.getDust(2),
+ // Materials.Oxygen.getGas(3000), null, PotassiumDisulfate.get(dust,6), null, 30);
+ // Rh/Os/Ir/Ru
+ GT_Values.RA.stdBuilder()
+ .itemInputs(PTResidue.get(dust), GT_Utility.getIntegratedCircuit(11))
+ .itemOutputs(LeachResidue.get(dust))
+ .fluidInputs(PotassiumDisulfate.getMolten(360))
+ .fluidOutputs(RHSulfate.getFluidOrGas(360))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 775)
+ .addTo(blastFurnaceRecipes);
+
+ // Ru
+ GT_Values.RA.stdBuilder()
+ .itemInputs(LeachResidue.get(dust, 10), Materials.Saltpeter.getDust(10))
+ .itemOutputs(SodiumRuthenate.get(dust, 3), IrOsLeachResidue.get(dust, 6))
+ .fluidInputs(Materials.SaltWater.getFluid(1000))
+ .fluidOutputs(GT_ModHandler.getSteam(1000))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 775)
+ .addTo(blastFurnaceRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(SodiumRuthenate.get(dust, 6), Materials.Chlorine.getCells(3))
+ .itemOutputs(Materials.Empty.getCells(3))
+ .fluidOutputs(RutheniumTetroxideSollution.getFluidOrGas(9000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(1))
+ .fluidInputs(RutheniumTetroxideSollution.getFluidOrGas(800))
+ .fluidOutputs(HotRutheniumTetroxideSollution.getFluidOrGas(800))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(fluidHeaterRecipes);
+
+ GT_Values.RA.addCrackingRecipe(
+ 17,
+ RutheniumTetroxideSollution.getFluidOrGas(1000),
+ GT_ModHandler.getSteam(1000),
+ HotRutheniumTetroxideSollution.getFluidOrGas(2000),
+ 150,
+ 480);
+ GT_Values.RA.addDistillationTowerRecipe(
+ HotRutheniumTetroxideSollution.getFluidOrGas(9000),
+ new FluidStack[] { Materials.Water.getFluid(1800), RutheniumTetroxide.getFluidOrGas(7200) },
+ Materials.Salt.getDust(6),
+ 1500,
+ 480);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(RutheniumTetroxide.get(dust, 1), Materials.HydrochloricAcid.getCells(6))
+ .itemOutputs(Ruthenium.get(dust), Materials.Chlorine.getCells(6))
+ .fluidOutputs(Materials.Water.getFluid(2000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ // Os
+ GT_Values.RA.stdBuilder()
+ .itemInputs(IrOsLeachResidue.get(dust, 4), GT_Utility.getIntegratedCircuit(11))
+ .itemOutputs(IrLeachResidue.get(dust, 2))
+ .fluidInputs(Materials.HydrochloricAcid.getFluid(1000))
+ .fluidOutputs(AcidicOsmiumSolution.getFluidOrGas(2000))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 775)
+ .addTo(blastFurnaceRecipes);
+
+ GT_Values.RA.addDistillationTowerRecipe(
+ AcidicOsmiumSolution.getFluidOrGas(1000),
+ new FluidStack[] { OsmiumSolution.getFluidOrGas(100), Materials.Water.getFluid(900) },
+ null,
+ 150,
+ (int) TierEU.RECIPE_IV);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(OsmiumSolution.get(cell), Materials.HydrochloricAcid.getCells(6))
+ .itemOutputs(Materials.Osmium.getDust(1), Materials.Chlorine.getCells(7))
+ .fluidOutputs(Materials.Water.getFluid(2000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ // Ir
+ GT_Values.RA.stdBuilder()
+ .itemInputs(IrLeachResidue.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(PGSDResidue.get(dust), IridiumDioxide.get(dust))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 775)
+ .addTo(blastFurnaceRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(IridiumDioxide.get(dust), Materials.HydrochloricAcid.getCells(1))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidOutputs(AcidicIridiumSolution.getFluidOrGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(AcidicIridiumSolution.get(cell), AmmoniumChloride.get(cell, 3))
+ .itemOutputs(Materials.Empty.getCells(4), IridiumChloride.get(dust))
+ .fluidOutputs(Materials.Ammonia.getGas(3000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(IridiumChloride.get(dust), Materials.Calcium.getDust(1))
+ .itemOutputs(PGSDResidue2.get(dust), Materials.Iridium.getDust(1))
+ .fluidOutputs(CalciumChloride.getFluidOrGas(3000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(UniversalChemical);
+ // Rh
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(RHSulfate.get(cell, 11), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(RHSulfateSolution.get(cell, 11), LeachResidue.get(dustTiny, 10))
+ .fluidInputs(Materials.Water.getFluid(10000))
+ .fluidOutputs(Materials.Potassium.getMolten(2000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ 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) },
+ 1200,
+ 30);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Zinc.getDust(1))
+ .itemOutputs(ZincSulfate.get(dust, 6), CrudeRhMetall.get(dust))
+ .fluidInputs(RHSulfateSolution.getFluidOrGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(CrudeRhMetall.get(dust), Materials.Salt.getDust(1))
+ .itemOutputs(RHSalt.get(dust, 3))
+ .fluidInputs(Materials.Chlorine.getGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .metadata(COIL_HEAT, 600)
+ .addTo(blastFurnaceRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(RHSalt.get(dust, 10))
+ .fluidInputs(Materials.Water.getFluid(2000))
+ .fluidOutputs(RHSaltSolution.getFluidOrGas(2000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(SodiumNitrate.get(dust, 5), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(RHNitrate.get(dust), Materials.Salt.getDust(2))
+ .fluidInputs(RHSaltSolution.getFluidOrGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+ // Na + HNO3 = NaNO3 + H
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Sodium.getDust(1))
+ .itemOutputs(SodiumNitrate.get(dust, 5))
+ .fluidInputs(Materials.NitricAcid.getFluid(1000))
+ .fluidOutputs(Materials.Hydrogen.getGas(1000))
+ .duration(8 * TICKS)
+ .eut(60)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(RHNitrate.get(dust))
+ .itemOutputs(
+ 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))
+ .outputChances(1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1500)
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(sifterRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(RhFilterCake.get(dust))
+ .fluidInputs(Materials.Water.getFluid(1000))
+ .fluidOutputs(RHFilterCakeSolution.getFluidOrGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(mixerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(2))
+ .itemOutputs(ReRh.get(dust))
+ .fluidInputs(RHFilterCakeSolution.getFluidOrGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ReRh.get(dust), Materials.Empty.getCells(1))
+ .itemOutputs(Rhodium.get(dust), Materials.Ammonia.getCells(1))
+ .fluidInputs(Materials.HydrochloricAcid.getFluid(1000))
+ .fluidOutputs(Materials.Chlorine.getGas(1000))
+ .duration(15 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(UniversalChemical);
+
+ }
+
+ private static boolean materialsContains(Materials one, ISubTagContainer other) {
+ if (one == null || one.mMaterialList == null || one.mMaterialList.isEmpty()) return false;
+ for (MaterialStack stack : one.mMaterialList) if (stack.mMaterial.equals(other)) return true;
+ return false;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public static void replacePureElements() {
+ // furnace
+ for (Object entry : FurnaceRecipes.smelting()
+ .getSmeltingList()
+ .entrySet()) {
+ Map.Entry realEntry = (Map.Entry) entry;
+ if (GT_Utility.isStackValid(realEntry.getKey())
+ && BW_Util.checkStackAndPrefix((ItemStack) realEntry.getKey())) {
+ ItemData association = GT_OreDictUnificator.getAssociation((ItemStack) realEntry.getKey());
+ if (!dust.equals(association.mPrefix) && !dustTiny.equals(association.mPrefix)
+ || !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));
+ }
+ }
+ }
+ // vanilla crafting
+ CraftingManager.getInstance()
+ .getRecipeList()
+ .forEach(PlatinumSludgeOverHaul::setnewMaterialInRecipe);
+ // gt crafting
+ try {
+ ((List<IRecipe>) FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true)
+ .get(null)).forEach(PlatinumSludgeOverHaul::setnewMaterialInRecipe);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ // gt machines
+ maploop: for (RecipeMap<?> map : RecipeMap.ALL_RECIPE_MAPS.values()) {
+ if (map == RecipeMaps.fusionRecipes || map == RecipeMaps.unpackagerRecipes
+ || map == RecipeMaps.packagerRecipes
+ || map == RecipeMaps.replicatorRecipes
+ || "gt.recipe.eyeofharmony".equals(map.unlocalizedName)
+ || "gtpp.recipe.quantumforcesmelter".equals(map.unlocalizedName)) continue;
+ HashSet<GT_Recipe> toDel = new HashSet<>();
+ recipeloop: for (GT_Recipe recipe : map.getAllRecipes()) {
+ if (recipe.mFakeRecipe) continue maploop;
+
+ for (int i = 0; i < recipe.mFluidOutputs.length; i++) {
+ if (map.equals(RecipeMaps.fluidExtractionRecipes)) continue maploop;
+ if ("gtpp.recipe.alloyblastsmelter".equals(map.unlocalizedName)) continue maploop;
+ if (map.equals(RecipeMaps.multiblockChemicalReactorRecipes)
+ || map.equals(RecipeMaps.chemicalReactorRecipes)) {
+ if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i])
+ || 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])
+ || GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i])
+ || GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])
+ || 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;
+ if ((BW_Util.areStacksEqualOrNull(Ruthenium.get(dust), recipe.mOutputs[i])
+ || BW_Util.areStacksEqualOrNull(Ruthenium.get(dustImpure), recipe.mOutputs[i])
+ || BW_Util.areStacksEqualOrNull(Ruthenium.get(dustPure), recipe.mOutputs[i]))
+ && !BW_Util.areStacksEqualOrNull(Ruthenium.get(ingot), recipe.mInputs[0])) {
+ for (ItemStack mInput : recipe.mInputs)
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ int amount = recipe.mOutputs[i].stackSize * 2;
+ recipe.mOutputs[i] = LeachResidue.get(dust, amount);
+ recipe.reloadOwner();
+ }
+ if ((BW_Util.areStacksEqualOrNull(Rhodium.get(dust), recipe.mOutputs[i])
+ || BW_Util.areStacksEqualOrNull(Rhodium.get(dustImpure), recipe.mOutputs[i])
+ || BW_Util.areStacksEqualOrNull(Rhodium.get(dustPure), recipe.mOutputs[i]))
+ && !BW_Util.areStacksEqualOrNull(Rhodium.get(ingot), recipe.mInputs[0])) {
+ for (ItemStack mInput : recipe.mInputs)
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ int amount = recipe.mOutputs[i].stackSize * 2;
+ recipe.mOutputs[i] = CrudeRhMetall.get(dust, amount);
+ recipe.reloadOwner();
+ }
+ if (!BW_Util.checkStackAndPrefix(recipe.mOutputs[i])) continue;
+ // Pt
+ if (GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mMaterial.mMaterial
+ .equals(Materials.Platinum)) {
+ for (ItemStack mInput : recipe.mInputs) {
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ }
+ if (dust.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustImpure.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustPure.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(PTMetallicPowder.get(dust), amount * 2);
+ recipe.reloadOwner();
+ } else if (dustSmall.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(PTMetallicPowder.get(dustSmall), amount * 2);
+ recipe.reloadOwner();
+ } else if (dustTiny.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ 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
+ .equals(Materials.Palladium)) {
+ for (ItemStack mInput : recipe.mInputs) {
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ }
+ if (dust.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustImpure.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustPure.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(PDMetallicPowder.get(dust), amount * 4);
+ recipe.reloadOwner();
+ } else
+ if (dustSmall.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(PDMetallicPowder.get(dustSmall), amount * 4);
+ recipe.reloadOwner();
+ } else if (dustTiny
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ 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 (ItemStack mInput : recipe.mInputs) {
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ }
+ if (dust.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustImpure
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustPure
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(IrOsLeachResidue.get(dust), amount);
+ recipe.reloadOwner();
+ } else if (dustSmall
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrOsLeachResidue.get(dustSmall), amount);
+ recipe.reloadOwner();
+ } else if (dustTiny
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ 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 (ItemStack mInput : recipe.mInputs) {
+ if (PlatinumSludgeOverHaul.isInBlackList(mInput)) continue recipeloop;
+ }
+ if (dust.equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustImpure
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)
+ || dustPure
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util.setStackSize(IrLeachResidue.get(dust), amount);
+ recipe.reloadOwner();
+ } else if (dustSmall
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrLeachResidue.get(dustSmall), amount);
+ recipe.reloadOwner();
+ } else if (dustTiny
+ .equals(GT_OreDictUnificator.getAssociation(recipe.mOutputs[i]).mPrefix)) {
+ int amount = recipe.mOutputs[i].stackSize;
+ recipe.mOutputs[i] = BW_Util
+ .setStackSize(IrLeachResidue.get(dustTiny), amount);
+ recipe.reloadOwner();
+ }
+ }
+ }
+ }
+ map.getBackend()
+ .removeRecipes(toDel);
+ }
+ // TODO: remove EnderIO recipes
+
+ // fix HV tier
+ PlatinumSludgeOverHaul.replaceHVCircuitMaterials();
+ // add new recipes
+ PlatinumSludgeOverHaul.runHelperrecipes();
+ }
+
+ @SuppressWarnings("deprecation")
+ private static void replaceHVCircuitMaterials() {
+ GT_Values.RA.addMixerRecipe(
+ Materials.Redstone.getDust(1),
+ Materials.Electrum.getDust(1),
+ GT_Utility.getIntegratedCircuit(1),
+ null,
+ null,
+ null,
+ Materials.Nikolite.getDust(8),
+ 1800,
+ 120);
+ for (GT_Recipe recipe : RecipeMaps.circuitAssemblerRecipes.getAllRecipes()) {
+ if (recipe.mEUt > 512) continue;
+ if (BW_Util.checkStackAndPrefix(recipe.mOutputs[0])) {
+ for (int i = 0; i < recipe.mInputs.length; i++) {
+ ItemStack stack = recipe.mInputs[i];
+ ItemData ass = GT_OreDictUnificator.getAssociation(stack);
+ if (BW_Util.checkStackAndPrefix(stack) && ass.mMaterial.mMaterial.equals(Materials.Platinum)) {
+ recipe.mInputs[i] = GT_OreDictUnificator.get(ass.mPrefix, Materials.BlueAlloy, stack.stackSize);
+ recipe.reloadOwner();
+ }
+ }
+ }
+ }
+ }
+
+ private static void setnewMaterialInRecipe(Object obj) {
+ String inputName = "output";
+ String inputItemName = "input";
+ if (!(obj instanceof ShapedOreRecipe) && !(obj instanceof ShapelessOreRecipe)) {
+ if (obj instanceof ShapedRecipes || obj instanceof ShapelessRecipes) {
+ inputName = "recipeOutput";
+ inputItemName = "recipeItems";
+ } else if (GTPlusPlus.isModLoaded()) {
+ try {
+ 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();
+ }
+ }
+ }
+
+ IRecipe recipe = (IRecipe) obj;
+ ItemStack otpt = recipe.getRecipeOutput();
+
+ Field out = CachedReflectionUtils.getDeclaredField(recipe.getClass(), inputName);
+ if (out == null) out = CachedReflectionUtils.getField(recipe.getClass(), inputName);
+
+ Field in = CachedReflectionUtils.getDeclaredField(recipe.getClass(), inputItemName);
+ if (in == null) in = CachedReflectionUtils.getField(recipe.getClass(), inputItemName);
+ if (in == null) return;
+
+ Object input;
+ try {
+ input = in.get(obj);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ return;
+ }
+
+ if (out != null && GT_Utility.areStacksEqual(otpt, Materials.Platinum.getDust(1), true)) {
+ if (PlatinumSludgeOverHaul.checkRecipe(input, Materials.Platinum)) return;
+ try {
+ out.set(recipe, PTMetallicPowder.get(dust, otpt.stackSize * 2));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ } else if (out != null && GT_Utility.areStacksEqual(otpt, Materials.Palladium.getDust(1), true)) {
+ if (PlatinumSludgeOverHaul.checkRecipe(input, Materials.Palladium)) return;
+ try {
+ out.set(recipe, PDMetallicPowder.get(dust, otpt.stackSize * 2));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ } else if (out != null && GT_Utility.areStacksEqual(otpt, Materials.Iridium.getDust(1), true)) {
+ if (PlatinumSludgeOverHaul.checkRecipe(input, Materials.Iridium)) return;
+ try {
+ out.set(recipe, IrLeachResidue.get(dust, otpt.stackSize));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ } else if (out != null && GT_Utility.areStacksEqual(otpt, Materials.Osmium.getDust(1), true)) {
+ if (PlatinumSludgeOverHaul.checkRecipe(input, Materials.Osmium)) return;
+ try {
+ out.set(recipe, IrOsLeachResidue.get(dust, otpt.stackSize));
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @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();
+ List ip = input instanceof List ? (List) input : new ArrayList();
+ Object[] ip2 = input instanceof Object[] ? (Object[]) input : new Object[0];
+
+ for (Object o : ip) {
+ if (o instanceof List) lists.add(o);
+ else if (o instanceof ItemStack) stacks.add(o);
+ }
+ for (Object o : ip2) {
+ if (o instanceof List) lists.add(o);
+ else if (o instanceof ItemStack) stacks.add(o);
+ }
+
+ for (Object o : lists) {
+ if (!((List) o).isEmpty()) stacks.add(((List) o).get(0));
+ }
+
+ for (Object stack : stacks) {
+ if (stack instanceof ItemStack
+ && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(crateGtDust, mat, 1), (ItemStack) stack))
+ return true;
+ }
+
+ boolean allSame = false;
+ for (Object stack : stacks) {
+ if (!(stack instanceof ItemStack)) {
+ allSame = false;
+ break;
+ }
+ allSame = BW_Util.checkStackAndPrefix((ItemStack) stack)
+ && GT_OreDictUnificator.getAssociation((ItemStack) stack).mMaterial.mMaterial.equals(mat);
+ if (!allSame) break;
+ }
+ return allSame;
+ }
+ return false;
+ }
+
+ private static boolean isInBlackList(ItemStack stack) {
+ if (stack == null || stack.getItem() instanceof BW_MetaGenerated_Items
+ || MainMod.MOD_ID.equals(GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId)
+ || BartWorksCrossmod.MOD_ID.equals(GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId))
+ return true;
+
+ if (GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId.equals(NewHorizonsCoreMod.ID)
+ && !stack.getUnlocalizedName()
+ .contains("dust")
+ && !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;
+
+ 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;
+ if (GT_OreDictUnificator.getAssociation(stack).mPrefix != rawOre) {
+ return !Arrays.asList(PlatinumSludgeOverHaul.OPBLACKLIST)
+ .contains(GT_OreDictUnificator.getAssociation(stack).mPrefix)
+ || Arrays.asList(PlatinumSludgeOverHaul.BLACKLIST)
+ .contains(GT_OreDictUnificator.getAssociation(stack).mMaterial.mMaterial);
+ }
+ }
+
+ if (GTPlusPlus.isModLoaded()) {
+ try {
+ if (Class.forName("gtPlusPlus.core.item.base.BaseItemComponent")
+ .isAssignableFrom(
+ stack.getItem()
+ .getClass())
+ && !stack.getUnlocalizedName()
+ .contains("dust")
+ && !stack.getUnlocalizedName()
+ .contains("Dust"))
+ return true;
+ if (Class.forName("gtPlusPlus.core.block.base.BlockBaseModular")
+ .isAssignableFrom(
+ Block.getBlockFromItem(stack.getItem())
+ .getClass()))
+ return true;
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ if (stack.getItem() == GT_ModHandler.getModItem(GTPlusPlus.ID, "itemDustHeLiCoPtEr", 1L)
+ .getItem()) {
+ return true;
+ }
+ if (stack.getItem() == GT_ModHandler.getModItem(GTPlusPlus.ID, "itemDustWhiteMetal", 1L)
+ .getItem()) {
+ return true;
+ }
+ }
+ if (GalaxySpace.isModLoaded()) {
+ if (stack.getItem() == GT_ModHandler.getModItem(GalaxySpace.ID, "metalsblock", 1L, 7)
+ .getItem()) {
+ return true;
+ }
+ }
+ if (NewHorizonsCoreMod.isModLoaded()) {
+ if (stack.getItem() == GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.IndustryFrame", 1L)
+ .getItem()) {
+ return true;
+ }
+ }
+ if (!BW_Util.checkStackAndPrefix(stack)) {
+ return false;
+ }
+ return Arrays.asList(PlatinumSludgeOverHaul.BLACKLIST)
+ .contains(GT_OreDictUnificator.getAssociation(stack).mMaterial.mMaterial);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java
new file mode 100644
index 0000000000..af8651dc6b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java
@@ -0,0 +1,1265 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.GalaxySpace;
+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.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+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;
+import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
+import com.github.bartimaeusnek.bartworks.util.NonNullWrappedHashMap;
+import com.github.bartimaeusnek.bartworks.util.Pair;
+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.FluidState;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TC_Aspects;
+import gregtech.api.enums.TextureSet;
+import gregtech.api.interfaces.IColorModulationContainer;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
+
+ public static final LinkedHashSet<Werkstoff> werkstoffHashSet = new LinkedHashSet<>();
+ public static final LinkedHashMap<Short, Werkstoff> werkstoffHashMap = new LinkedHashMap<>();
+ public static final LinkedHashMap<String, Werkstoff> werkstoffNameHashMap = new LinkedHashMap<>();
+
+ public static final Map<String, String> modNameOverrides = new HashMap<>() {
+
+ private static final long serialVersionUID = 6399917619058898648L;
+
+ {
+ this.put(GalaxySpace.ID, DARK_PURPLE + "GalaxySpace");
+ }
+ };
+
+ 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();
+ public static Werkstoff default_null_Werkstoff;
+
+ private final HashSet<String> ADDITIONAL_OREDICT = new HashSet<>();
+ private final List<ISubTagContainer> mOreByProducts = new ArrayList<>();
+ private final LinkedHashSet<Pair<ISubTagContainer, Integer>> CONTENTS = new LinkedHashSet<>();
+ private final HashSet<SubTag> SUBTAGS = new HashSet<>();
+ private byte[] rgb = new byte[3];
+ private final String defaultName;
+ private String toolTip;
+
+ private Werkstoff.Stats stats;
+ private final Werkstoff.Types type;
+ private final Werkstoff.GenerationFeatures generationFeatures;
+ private final short mID;
+ private final TextureSet texSet;
+ private Materials bridgeMaterial;
+ private final String owner;
+
+ public Materials getBridgeMaterial() {
+ return this.bridgeMaterial;
+ }
+
+ public void setBridgeMaterial(Materials bridgeMaterial) {
+ this.bridgeMaterial = bridgeMaterial;
+ }
+
+ public static void init() {
+ Werkstoff.default_null_Werkstoff = new Werkstoff(
+ new short[3],
+ "_NULL",
+ "Default null Werkstoff",
+ Werkstoff.DEFAULT_NULL_STATS,
+ Werkstoff.Types.UNDEFINED,
+ Werkstoff.DEFAULT_NULL_GENERATION_FEATURES,
+ -1,
+ TextureSet.SET_NONE);
+ }
+
+ /**
+ * GT Materials Bridge Constructor
+ *
+ * @param materials a GT Materials
+ * @param generationFeatures the new Types you want to add
+ * @param type - self explainatory
+ * @param mID > 31_766 && <= 32_767
+ */
+ public Werkstoff(Materials materials, Werkstoff.GenerationFeatures generationFeatures, Types type, int mID) {
+ this(
+ materials.mRGBa,
+ materials.mDefaultLocalName,
+ materials.getToolTip(),
+ type == null ? materials.mElement != null ? Types.ELEMENT : Types.UNDEFINED : type,
+ generationFeatures,
+ mID,
+ materials.mIconSet,
+ (List) materials.mOreByProducts,
+ new Pair<>(materials, 1));
+ if (mID <= 31_766 || mID > 32_767) throw new IllegalArgumentException();
+ this.stats.mass = materials.getMass();
+ this.stats.protons = materials.getProtons();
+ this.stats.meltingPoint = materials.mMeltingPoint;
+ this.stats.neutrons = materials.getNeutrons();
+ this.stats.speedOverride = materials.mToolSpeed;
+ this.stats.durOverride = materials.mDurability;
+ this.stats.qualityOverride = materials.mToolQuality;
+ this.stats.setGas(materials.mHasGas);
+ this.stats.setRadioactive(materials.isRadioactive());
+ this.stats.setBlastFurnace(materials.mBlastFurnaceRequired);
+ this.stats.setMeltingVoltage(120);
+ if (type == Types.COMPOUND) {
+ this.stats.setElektrolysis(true);
+ this.generationFeatures.addChemicalRecipes();
+ } else if (type == Types.MIXTURE) {
+ this.stats.setCentrifuge(true);
+ this.generationFeatures.addMixerRecipes();
+ }
+ }
+
+ @SafeVarargs
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, int meltingpoint,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ Pair<ISubTagContainer, Integer>... contents) {
+ this(
+ rgba,
+ defaultName,
+ Werkstoff.Types.getDefaultStatForType(type)
+ .setMeltingPoint(meltingpoint),
+ type,
+ generationFeatures,
+ mID,
+ texSet,
+ contents);
+ }
+
+ @SafeVarargs
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type,
+ Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet,
+ Pair<ISubTagContainer, Integer>... contents) {
+ this(
+ rgba,
+ defaultName,
+ Werkstoff.Types.getDefaultStatForType(type),
+ type,
+ generationFeatures,
+ mID,
+ texSet,
+ contents);
+ }
+
+ @SafeVarargs
+ 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,
+ Werkstoff.Types.getDefaultStatForType(type)
+ .setMeltingPoint(meltingpoint),
+ type,
+ generationFeatures,
+ mID,
+ texSet,
+ oreByProduct,
+ contents);
+ }
+
+ @SafeVarargs
+ 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,
+ Werkstoff.Types.getDefaultStatForType(type),
+ type,
+ generationFeatures,
+ mID,
+ texSet,
+ oreByProduct,
+ contents);
+ }
+
+ @SafeVarargs
+ 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,
+ defaultName,
+ Werkstoff.Types.getDefaultStatForType(type),
+ type,
+ generationFeatures,
+ mID,
+ texSet,
+ oreByProduct,
+ contents);
+ }
+
+ @SafeVarargs
+ 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);
+ }
+
+ @SafeVarargs
+ 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);
+ }
+
+ @SafeVarargs
+ 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);
+ }
+
+ @SafeVarargs
+ 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))
+ throw new UnsupportedOperationException("ID (" + mID + ") is already in use!");
+ Werkstoff.idHashSet.add((short) mID);
+ if (type == null) type = Werkstoff.Types.UNDEFINED;
+
+ this.mID = (short) mID;
+ this.defaultName = defaultName;
+ // Ensure that localization key are written to the lang file
+ GregTech_API.sAfterGTPreload.add(() -> { this.getLocalizedName(); });
+ this.stats = stats;
+ this.type = type;
+ this.generationFeatures = generationFeatures;
+ this.setRgb(BW_ColorUtil.correctCorlorArray(rgba));
+ this.CONTENTS.addAll(Arrays.asList(contents));
+ this.toolTip = "";
+ if (toolTip.isEmpty()) {
+ for (Pair<ISubTagContainer, Integer> p : contents) {
+ 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())
+ + ")"
+ + 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())
+ + ")"
+ + 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 this.toolTip = toolTip;
+
+ // 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(); });
+
+ if (this.stats.protons == 0) {
+ long tmpprotons = 0;
+ for (Pair<ISubTagContainer, Integer> p : contents) {
+ if (p.getKey() instanceof Materials) {
+ tmpprotons += ((Materials) p.getKey()).getProtons() * p.getValue();
+ } else if (p.getKey() instanceof Werkstoff) {
+ tmpprotons += ((Werkstoff) p.getKey()).getStats().protons * p.getValue();
+ }
+ }
+ this.stats = stats.setProtons(tmpprotons);
+ }
+ if (this.stats.mass == 0) {
+ long tmpmass = 0;
+ int count = 0;
+ for (Pair<ISubTagContainer, Integer> p : contents) {
+ if (p.getKey() instanceof Materials) {
+ tmpmass += ((Materials) p.getKey()).getMass() * p.getValue();
+ count += p.getValue();
+ } else if (p.getKey() instanceof Werkstoff) {
+ tmpmass += ((Werkstoff) p.getKey()).getStats().mass * p.getValue();
+ count += p.getValue();
+ }
+ }
+ if (count > 0) this.stats = stats.setMass(tmpmass / count);
+ }
+
+ if (this.stats.meltingPoint == 0) this.stats.meltingPoint = 1123;
+
+ if (this.stats.meltingVoltage == 0) this.stats.meltingVoltage = 120;
+
+ this.texSet = texSet;
+
+ switch (this.mOreByProducts.size()) {
+ case 0:
+ this.mOreByProducts.add(this);
+ this.mOreByProducts.add(this);
+ this.mOreByProducts.add(this);
+ break;
+ case 1:
+ this.mOreByProducts.add(this);
+ this.mOreByProducts.add(this);
+ break;
+ case 2:
+ this.mOreByProducts.add(this);
+ break;
+ }
+
+ Optional<Pair<ISubTagContainer, Integer>> firstContent;
+ if (this.CONTENTS.size() == 1 && (firstContent = this.CONTENTS.stream()
+ .findFirst()).isPresent()) {
+ ISubTagContainer firstContentSubTagContainer = firstContent.get()
+ .getKey();
+ if (firstContent.get()
+ .getValue() == 1 && firstContentSubTagContainer instanceof Materials) this.getGenerationFeatures()
+ .setExtension();
+ }
+
+ Werkstoff.werkstoffHashSet.add(this);
+ Werkstoff.werkstoffHashMap.put(this.mID, this);
+ Werkstoff.werkstoffNameHashMap.put(this.defaultName, this);
+
+ this.owner = this.getMaterialOwner();
+ }
+
+ private static String getFormula(Materials material) {
+ return material.mChemicalFormula.isEmpty() ? "?" : material.mChemicalFormula;
+ }
+
+ private static String getFormula(Werkstoff material) {
+ return material.toolTip.isEmpty() ? "?" : material.toolTip;
+ }
+
+ public Werkstoff addAdditionalOreDict(String s) {
+ this.ADDITIONAL_OREDICT.add(s);
+ return this;
+ }
+
+ public HashSet<String> getADDITIONAL_OREDICT() {
+ return this.ADDITIONAL_OREDICT;
+ }
+
+ public void setTCAspects(Pair<Object, Integer>... pAspectsArr) {
+ this.stats.mTC_Aspects = pAspectsArr;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Pair<Object, Integer>[] getTCAspects(int ratio) {
+ if (this.stats.mTC_Aspects == null) {
+ HashSet<TC_Aspects.TC_AspectStack> tc_aspectStacks = new HashSet<>();
+ HashSet<Pair<Object, Integer>> set = new HashSet<>();
+ for (Pair<?, ?> p : this.getContents()
+ .getValue()) {
+ 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)));
+ this.stats.mTC_Aspects = set.toArray(new Pair[0]);
+ }
+ Pair<Object, Integer>[] ret = this.stats.mTC_Aspects.clone();
+ for (int i = 0; i < ret.length; i++) {
+ ret[i] = ret[i].copyWithNewValue(ret[i].getValue() * ratio);
+ }
+ return ret;
+ }
+
+ public List<TC_Aspects.TC_AspectStack> getGTWrappedTCAspects() {
+ final List<TC_Aspects.TC_AspectStack> ret = new ArrayList<>();
+ Arrays.stream(this.getTCAspects())
+ .forEach(objectIntegerPair -> {
+ try {
+ new TC_Aspects.TC_AspectStack(
+ TC_Aspects.valueOf(
+ ((String) ThaumcraftHandler.AspectAdder.getName.invoke(objectIntegerPair.getKey()))
+ .toUpperCase(Locale.US)),
+ objectIntegerPair.getValue()).addToAspectList(ret);
+ } catch (IllegalAccessException | InvocationTargetException ignored) {}
+ });
+ return ret;
+ }
+
+ public Pair<Object, Integer>[] getTCAspects() {
+ return this.getTCAspects(1);
+ }
+
+ public Werkstoff.Types getType() {
+ return this.type;
+ }
+
+ public boolean containsStuff(ISubTagContainer stuff) {
+ for (Pair<ISubTagContainer, Integer> pair : this.CONTENTS) {
+ if (pair.getKey()
+ .equals(stuff)) return true;
+ }
+ return false;
+ }
+
+ public Pair<Integer, LinkedHashSet<Pair<ISubTagContainer, Integer>>> getContents() {
+ int ret = 0;
+ switch (this.type) {
+ case COMPOUND:
+ case MIXTURE:
+ case BIOLOGICAL: {
+ for (int i = 0; i < this.CONTENTS.toArray().length; i++) {
+ ret += (int) this.CONTENTS.toArray(new Pair[0])[i].getValue();
+ }
+ break;
+ }
+ default:
+ ret = 1;
+ break;
+ }
+ return new Pair<>(ret, this.CONTENTS);
+ }
+
+ public int getNoOfByProducts() {
+ return this.mOreByProducts.size();
+ }
+
+ public ISubTagContainer getOreByProductRaw(int aNumber) {
+ if (this.mOreByProducts.size() == 0) return null;
+ if (aNumber < 0) aNumber = this.mOreByProducts.size() + aNumber;
+ while (aNumber >= this.mOreByProducts.size()) aNumber--;
+ ISubTagContainer o = this.mOreByProducts.get(aNumber);
+ if (o == null || o.equals(Werkstoff.default_null_Werkstoff) || o.equals(Materials._NULL)) return this;
+ return o;
+ }
+
+ public ItemStack getOreByProduct(int aNumber, OrePrefixes prefixes) {
+ if (this.mOreByProducts.size() == 0) return null;
+ if (aNumber < 0) aNumber = this.mOreByProducts.size() + aNumber;
+ while (aNumber >= this.mOreByProducts.size()) aNumber--;
+ Object o = this.mOreByProducts.get(aNumber);
+ if (o == null || o.equals(Werkstoff.default_null_Werkstoff) || o.equals(Materials._NULL))
+ return this.get(prefixes);
+ if (o instanceof Werkstoff) return WerkstoffLoader.getCorrespondingItemStack(prefixes, (Werkstoff) o);
+ if (o instanceof Materials) return GT_OreDictUnificator.get(prefixes, o, 1L);
+ return null;
+ }
+
+ public String getDefaultName() {
+ return this.defaultName;
+ }
+
+ public String getLocalizedName() {
+ return GT_LanguageManager.addStringLocalization(
+ String.format("bw.werkstoff.%05d.name", this.mID),
+ this.defaultName,
+ !GregTech_API.sPostloadFinished);
+ }
+
+ public String getVarName() {
+ return this.defaultName.replace(" ", "");
+ }
+
+ public String getToolTip() {
+ return this.toolTip;
+ }
+
+ public String getLocalizedToolTip() {
+ return GT_LanguageManager.addStringLocalization(
+ String.format("bw.werkstoff.%05d.tooltip", this.mID),
+ this.toolTip,
+ !GregTech_API.sPostloadFinished);
+ }
+
+ public Werkstoff.Stats getStats() {
+ return this.stats;
+ }
+
+ public short getmID() {
+ return this.mID;
+ }
+
+ public short getMixCircuit() {
+ return this.getGenerationFeatures().mixCircuit;
+ }
+
+ public Werkstoff.GenerationFeatures getGenerationFeatures() {
+ return this.generationFeatures;
+ }
+
+ public TextureSet getTexSet() {
+ return this.texSet;
+ }
+
+ public void setRgb(short[] rgb) {
+ 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 };
+ }
+
+ @Override
+ public boolean contains(SubTag subTag) {
+ 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;
+ return this.SUBTAGS.contains(subTag);
+ }
+
+ @Override
+ public ISubTagContainer add(SubTag... subTags) {
+ this.SUBTAGS.addAll(Arrays.asList(subTags));
+ return this;
+ }
+
+ @Override
+ public boolean remove(SubTag subTag) {
+ return this.SUBTAGS.remove(subTag);
+ }
+
+ public void getAndAddToCollection(OrePrefixes prefixes, int amount, Collection<ItemStack> stacks) {
+ stacks.add(this.get(prefixes, amount));
+ }
+
+ public ItemStack get(OrePrefixes prefixes) {
+ return WerkstoffLoader.getCorrespondingItemStack(prefixes, this);
+ }
+
+ public FluidStack getFluidOrGas(int fluidAmount) {
+ return new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(this)), fluidAmount);
+ }
+
+ public FluidStack getMolten(int fluidAmount) {
+ return new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(this)), fluidAmount);
+ }
+
+ public ItemStack get(OrePrefixes prefixes, int amount) {
+ return WerkstoffLoader.getCorrespondingItemStack(prefixes, this, amount);
+ }
+
+ public byte getToolQuality() {
+ return this.stats.getQualityOverride() > 0 ? this.stats.getQualityOverride()
+ : (byte) (15f * (this.getStats()
+ .getProtons() / 188f
+ + this.getStats()
+ .getMeltingPoint() / 10801f)
+ / (float) this.getContents()
+ .getKey());
+ }
+
+ public float getToolSpeed() {
+ return this.stats.getSpeedOverride() > 0f ? this.stats.getSpeedOverride()
+ : Math.max(
+ 1f,
+ 2f * (-this.getStats()
+ .getMass() + 0.1f
+ * this.getStats()
+ .getMeltingPoint()
+ + this.getStats()
+ .getProtons())
+ * 0.1f
+ / (float) this.getContents()
+ .getKey()
+ * 0.1f
+ * this.getToolQuality());
+ }
+
+ public int getDurability() {
+ return this.stats.getDurOverride() > 0 ? this.stats.getDurOverride()
+ : (int) (this.stats.durMod * (0.01f * this.getStats()
+ .getMeltingPoint()
+ * this.getStats()
+ .getMass()
+ / (float) this.getContents()
+ .getKey()));
+ }
+
+ /**
+ * Checks if the generation feature is enabled and if its not in the blacklist
+ */
+ public boolean hasItemType(OrePrefixes prefixes) {
+ int unpacked = Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes);
+ return (this.getGenerationFeatures().toGenerate & unpacked) != 0
+ && (this.getGenerationFeatures().blacklist & unpacked) == 0;
+ }
+
+ /**
+ * DOES NOT CHECK BLACKLIST!
+ */
+ public boolean hasGenerationFeature(OrePrefixes prefixes) {
+ int unpacked = Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes);
+ return (this.getGenerationFeatures().toGenerate & unpacked) != 0;
+ }
+
+ /**
+ * Checks if the Actual Stack exists in the OreDict
+ */
+ public boolean doesOreDictedItemExists(OrePrefixes prefixes) {
+ return OreDictHandler.getItemStack(this.getDefaultName(), prefixes, 1) != null;
+ }
+
+ public String getOwner() {
+ return this.owner;
+ }
+
+ private String getMaterialOwner() {
+ String modName = Loader.instance()
+ .activeModContainer()
+ .getName();
+ if (modNameOverrides.get(modName) != null) {
+ return modNameOverrides.get(modName);
+ }
+ if (BWModNames.contains(modName)) {
+ return null;
+ }
+ return GREEN + modName;
+ }
+
+ public enum Types {
+
+ MATERIAL,
+ COMPOUND,
+ MIXTURE,
+ BIOLOGICAL,
+ ELEMENT,
+ ISOTOPE,
+ UNDEFINED;
+
+ public static Werkstoff.Stats getDefaultStatForType(Werkstoff.Types T) {
+ return switch (T) {
+ case COMPOUND, BIOLOGICAL -> new Werkstoff.Stats().setElektrolysis(true);
+ case MIXTURE -> new Werkstoff.Stats().setCentrifuge(true);
+ default -> new Werkstoff.Stats();
+ };
+ }
+ }
+
+ 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)
+ */
+ private boolean isExtension;
+ private static final NonNullWrappedHashMap<OrePrefixes, Integer> prefixLogic = new NonNullWrappedHashMap<>(0);
+
+ public GenerationFeatures() {}
+
+ public static void initPrefixLogic() {
+ Arrays.stream(OrePrefixes.values())
+ .forEach(e -> prefixLogic.put(e, 0));
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dust, 0b1);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dustTiny, 0b1);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dustSmall, 0b1);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingot, 0b10);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingotHot, 0b10);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.nugget, 0b10);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gem, 0b100);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemFlawed, 0b100);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemExquisite, 0b100);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemChipped, 0b100);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemFlawless, 0b100);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.lens, 0b100);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.block, 0b110);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ore, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dustImpure, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dustPure, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.crushed, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.crushedPurified, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.crushedCentrifuged, 0b1000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.rawOre, 0b1000);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.cell, 0b10000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.capsule, 0b10000);
+ // Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.bottle,0b10000);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.capsuleMolten, 0b1000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.cellMolten, 0b1000000);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plate, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.foil, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.stick, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.stickLong, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadHammer, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadWrench, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadSaw, 0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.turbineBlade, 0b10000000);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.screw, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gearGt, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gearGtSmall, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.bolt, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ring, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.spring, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.springSmall, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.rotor, 0b100000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.wireFine, 0b100000000);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateDouble, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateTriple, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuadruple, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateQuintuple, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plateDense, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingotDouble, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingotTriple, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingotQuadruple, 0x200);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ingotQuintuple, 0x200);
+
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.blockCasing, 0x380);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.blockCasingAdvanced, 0x380);
+ }
+
+ public void setExtension() {
+ this.isExtension = !this.isExtension;
+ }
+
+ public static int getPrefixDataRaw(OrePrefixes prefixes) {
+ if (prefixes == null) throw new IllegalArgumentException("OrePrefixes is NULL!");
+ return GenerationFeatures.prefixLogic.get(prefixes);
+ }
+
+ public boolean isExtension() {
+ return this.isExtension;
+ }
+
+ // public byte toGenerateSecondary = 0b0000000;
+ public byte blacklist;
+
+ 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
+ */
+ 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)
+ */
+ public byte extraRecipes2;
+
+ public short mixCircuit = -1;
+
+ public Werkstoff.GenerationFeatures setBlacklist(OrePrefixes p) {
+ this.blacklist |= getPrefixDataRaw(p);
+ return this;
+ }
+
+ @Deprecated
+ public boolean hasDusts() {
+ return (this.toGenerate & 0b1) != 0;
+ }
+
+ @Deprecated
+ public boolean hasGems() {
+ return (this.toGenerate & 0b100) != 0;
+ }
+
+ @Deprecated
+ public boolean hasOres() {
+ return (this.toGenerate & 0b1000) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures enforceUnification() {
+ this.enforceUnification = true;
+ return this;
+ }
+
+ @Deprecated
+ public Werkstoff.GenerationFeatures removeGems() {
+ if (this.hasGems()) this.toGenerate = this.toGenerate ^ 0b100;
+ return this;
+ }
+
+ @Deprecated
+ public Werkstoff.GenerationFeatures removeDusts() {
+ if (this.hasDusts()) this.toGenerate = this.toGenerate ^ 0b1;
+ return this;
+ }
+
+ @Deprecated
+ public Werkstoff.GenerationFeatures removeOres() {
+ if (this.hasOres()) this.toGenerate = this.toGenerate ^ 0b1000;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addChemicalRecipes() {
+ this.extraRecipes = (byte) (this.extraRecipes | 1);
+ return this;
+ }
+
+ public boolean hasChemicalRecipes() {
+ return (this.extraRecipes & 1) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addMetalCraftingSolidifierRecipes() {
+ this.extraRecipes2 = (byte) (this.extraRecipes2 | 1);
+ return this;
+ }
+
+ public boolean hasMetalCraftingSolidifierRecipes() {
+ return (this.extraRecipes2 & 1) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addMetaSolidifierRecipes() {
+ this.extraRecipes2 = (byte) (this.extraRecipes2 | 10);
+ return this;
+ }
+
+ public boolean hasMetaSolidifierRecipes() {
+ return (this.extraRecipes2 & 10) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addMultipleMetalSolidifierRecipes() {
+ this.extraRecipes2 = (byte) (this.extraRecipes2 | 100);
+ return this;
+ }
+
+ public boolean hasMultipleMetalSolidifierRecipes() {
+ return (this.extraRecipes2 & 100) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addMixerRecipes() {
+ this.extraRecipes = (byte) (this.extraRecipes | 10);
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addMixerRecipes(short aCircuit) {
+ this.extraRecipes = (byte) (this.extraRecipes | 10);
+ if (aCircuit >= 1 && aCircuit <= 24) this.mixCircuit = aCircuit;
+ return this;
+ }
+
+ public boolean hasMixerRecipes() {
+ return (this.extraRecipes & 10) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addSifterRecipes() {
+ this.extraRecipes = (byte) (this.extraRecipes | 100);
+ return this;
+ }
+
+ public boolean hasSifterRecipes() {
+ return (this.extraRecipes & 100) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures onlyDust() {
+ this.toGenerate = 0b1;
+ return this;
+ }
+
+ /**
+ * Automatically adds Simple Metal Working Items
+ */
+ public Werkstoff.GenerationFeatures addMetalItems() {
+ this.toGenerate = this.addSimpleMetalWorkingItems().toGenerate | 0b10;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures disable() {
+ this.toGenerate = 0;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addCells() {
+ this.toGenerate = this.toGenerate | 0b10000;
+ return this;
+ }
+
+ @Deprecated
+ public boolean hasCells() {
+ return (this.toGenerate & 0b10000) != 0;
+ }
+
+ @Deprecated
+ public boolean hasMolten() {
+ return (this.toGenerate & 0b1000000) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addMolten() {
+ this.toGenerate = this.toGenerate | 0b1000000;
+ return this;
+ }
+
+ /**
+ * Automatically adds Simple Metal Working Items
+ */
+ public Werkstoff.GenerationFeatures addGems() {
+ this.toGenerate = this.addSimpleMetalWorkingItems().toGenerate | 0x4;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addSimpleMetalWorkingItems() {
+ this.toGenerate = this.toGenerate | 0b10000000;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addCasings() {
+ this.toGenerate = this.toGenerate | 0x382;
+ return this;
+ }
+
+ @Deprecated
+ public boolean hasSimpleMetalWorkingItems() {
+ return (this.toGenerate & 0b10000000) != 0;
+ }
+
+ public Werkstoff.GenerationFeatures addCraftingMetalWorkingItems() {
+ this.toGenerate = this.toGenerate | 0x100;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addMultipleIngotMetalWorkingItems() {
+ this.toGenerate = this.toGenerate | 0x200;
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures addPrefix(OrePrefixes prefixes) {
+ this.toGenerate = this.toGenerate | getPrefixDataRaw(prefixes);
+ return this;
+ }
+
+ public Werkstoff.GenerationFeatures removePrefix(OrePrefixes prefixes) {
+ this.toGenerate = this.toGenerate ^ getPrefixDataRaw(prefixes);
+ return this;
+ }
+ }
+
+ public static class Stats {
+
+ public static final int NULL_KELVIN = 0;
+
+ int boilingPoint;
+
+ public int getBoilingPoint() {
+ return this.boilingPoint;
+ }
+
+ public Werkstoff.Stats setBoilingPoint(int boilingPoint) {
+ this.boilingPoint = boilingPoint;
+ return this;
+ }
+
+ public long getMass() {
+ return this.mass;
+ }
+
+ public long getProtons() {
+ return this.protons;
+ }
+
+ public int getMeltingPoint() {
+ return this.meltingPoint;
+ }
+
+ public Werkstoff.Stats setMeltingPoint(int meltingPoint) {
+ this.meltingPoint = meltingPoint;
+ return this;
+ }
+
+ public double getEbfGasRecipeTimeMultiplier() {
+ return this.ebfGasRecipeTimeMultiplier;
+ }
+
+ /**
+ * 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;
+ return this;
+ }
+
+ public double getEbfGasRecipeConsumedAmountMultiplier() {
+ return this.ebfGasRecipeConsumedAmountMultiplier;
+ }
+
+ /**
+ * 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;
+ return this;
+ }
+
+ public int getDurOverride() {
+ return this.durOverride;
+ }
+
+ public Werkstoff.Stats setDurOverride(int durOverride) {
+ this.durOverride = durOverride;
+ return this;
+ }
+
+ public float getSpeedOverride() {
+ return this.speedOverride;
+ }
+
+ public Werkstoff.Stats setSpeedOverride(float speedOverride) {
+ this.speedOverride = speedOverride;
+ return this;
+ }
+
+ public byte getQualityOverride() {
+ return this.qualityOverride;
+ }
+
+ public Werkstoff.Stats setQualityOverride(byte qualityOverride) {
+ this.qualityOverride = qualityOverride;
+ return this;
+ }
+
+ private byte qualityOverride;
+ private int durOverride;
+ private float speedOverride;
+ private int meltingPoint;
+ private int meltingVoltage;
+ private long protons;
+ private long neutrons;
+ private long electrons;
+ private long mass;
+ private double ebfGasRecipeTimeMultiplier = -1.0;
+ private double ebfGasRecipeConsumedAmountMultiplier = 1.0;
+
+ float durMod = 1f;
+
+ public float getDurMod() {
+ return this.durMod;
+ }
+
+ public void setDurMod(float durMod) {
+ this.durMod = durMod;
+ }
+
+ private Pair<Object, Integer>[] mTC_Aspects;
+ // logic gate shit
+ byte quality = ~0b1111111;
+
+ public Werkstoff.Stats setmTC_AspectsArray(Pair<Object, Integer>[] mTC_Aspects) {
+ this.mTC_Aspects = mTC_Aspects;
+ return this;
+ }
+
+ @SafeVarargs
+ public final Werkstoff.Stats setmTC_AspectsVarArg(Pair<Object, Integer>... mTC_Aspects) {
+ this.mTC_Aspects = mTC_Aspects;
+ return this;
+ }
+
+ Pair<Object, Integer>[] getmTC_Aspects() {
+ return this.mTC_Aspects;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Werkstoff.Stats that)) return false;
+
+ if (this.boilingPoint != that.boilingPoint || this.meltingPoint != that.meltingPoint
+ || this.mass != that.mass
+ || this.protons != that.protons) return false;
+ if (this.neutrons != that.neutrons) return false;
+ 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;
+ 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)
+ .putDouble(this.ebfGasRecipeTimeMultiplier)
+ .putDouble(this.ebfGasRecipeConsumedAmountMultiplier)
+ .array(),
+ 0,
+ 49,
+ 31);
+ }
+
+ public Werkstoff.Stats setMass(long mass) {
+ this.mass = mass;
+ return this;
+ }
+
+ public Werkstoff.Stats setProtons(long protons) {
+ this.protons = protons;
+ return this;
+ }
+
+ public boolean isSublimation() {
+ return (this.quality & 0b1) != 0;
+ }
+
+ public Werkstoff.Stats setSublimation(boolean sublimation) {
+ if (sublimation) this.quality = (byte) (this.quality | 0b000001);
+ else this.quality = (byte) (this.quality & 0b1111110);
+ return this;
+ }
+
+ public boolean isToxic() {
+ return (this.quality & 0b10) != 0;
+ }
+
+ public Werkstoff.Stats setToxic(boolean toxic) {
+ if (toxic) this.quality = (byte) (this.quality | 0b000010);
+ else this.quality = (byte) (this.quality & 0b1111101);
+ return this;
+ }
+
+ byte enchantmentlvl = 3;
+
+ public byte getEnchantmentlvl() {
+ return this.enchantmentlvl;
+ }
+
+ public Werkstoff.Stats setEnchantmentlvl(byte enchantmentlvl) {
+ this.enchantmentlvl = enchantmentlvl;
+ return this;
+ }
+
+ public boolean isRadioactive() {
+ return (this.quality & 0b100) != 0;
+ }
+
+ public Werkstoff.Stats setRadioactive(boolean radioactive) {
+ if (radioactive) this.quality = (byte) (this.quality | 0b000100);
+ else this.quality = (byte) (this.quality & 0b1111011);
+ return this;
+ }
+
+ public boolean isBlastFurnace() {
+ return (this.quality & 0b1000) != 0;
+ }
+
+ public Werkstoff.Stats setBlastFurnace(boolean blastFurnace) {
+ if (blastFurnace) this.quality = (byte) (this.quality | 0b001000);
+ else this.quality = (byte) (this.quality & 0b1110111);
+ return this;
+ }
+
+ public Werkstoff.Stats setMeltingVoltage(int meltingVoltage) {
+ this.meltingVoltage = meltingVoltage;
+ return this;
+ }
+
+ public int getMeltingVoltage() {
+ return this.meltingVoltage;
+ }
+
+ public boolean isElektrolysis() {
+ return (this.quality & 0x10) != 0;
+ }
+
+ public Werkstoff.Stats setElektrolysis(boolean elektrolysis) {
+ if (elektrolysis) this.quality = (byte) (this.quality | 0x10);
+ else this.quality = (byte) (this.quality & 0b1101111);
+ return this;
+ }
+
+ public boolean isCentrifuge() {
+ return (this.quality & 0x20) != 0;
+ }
+
+ public Werkstoff.Stats setCentrifuge(boolean centrifuge) {
+ if (centrifuge) this.quality = (byte) (this.quality | 0x20);
+ else this.quality = (byte) (this.quality & 0b1011111);
+ return this;
+ }
+
+ public boolean isGas() {
+ return (this.quality & 0x40) != 0;
+ }
+
+ public FluidState getFluidState() {
+ if ((this.quality & 0x40) != 0) {
+ return FluidState.GAS;
+ }
+ return FluidState.LIQUID;
+ }
+
+ public Werkstoff.Stats setGas(boolean gas) {
+ if (gas) this.quality = (byte) (this.quality | 0x40);
+ else this.quality = (byte) (this.quality & 0b0111111);
+ return this;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java
new file mode 100644
index 0000000000..197ada7f22
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java
@@ -0,0 +1,2092 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.util.BW_Util.subscriptNumbers;
+import static com.github.bartimaeusnek.bartworks.util.BW_Util.superscriptNumbers;
+import static gregtech.api.enums.Mods.BetterLoadingScreen;
+import static gregtech.api.enums.Mods.Forestry;
+import static gregtech.api.enums.OrePrefixes.block;
+import static gregtech.api.enums.OrePrefixes.bolt;
+import static gregtech.api.enums.OrePrefixes.bottle;
+import static gregtech.api.enums.OrePrefixes.capsule;
+import static gregtech.api.enums.OrePrefixes.cell;
+import static gregtech.api.enums.OrePrefixes.cellPlasma;
+import static gregtech.api.enums.OrePrefixes.crushed;
+import static gregtech.api.enums.OrePrefixes.crushedCentrifuged;
+import static gregtech.api.enums.OrePrefixes.crushedPurified;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustImpure;
+import static gregtech.api.enums.OrePrefixes.dustPure;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.foil;
+import static gregtech.api.enums.OrePrefixes.gearGt;
+import static gregtech.api.enums.OrePrefixes.gearGtSmall;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.gemChipped;
+import static gregtech.api.enums.OrePrefixes.gemExquisite;
+import static gregtech.api.enums.OrePrefixes.gemFlawed;
+import static gregtech.api.enums.OrePrefixes.gemFlawless;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.ingotDouble;
+import static gregtech.api.enums.OrePrefixes.ingotHot;
+import static gregtech.api.enums.OrePrefixes.ingotQuadruple;
+import static gregtech.api.enums.OrePrefixes.ingotQuintuple;
+import static gregtech.api.enums.OrePrefixes.ingotTriple;
+import static gregtech.api.enums.OrePrefixes.lens;
+import static gregtech.api.enums.OrePrefixes.nugget;
+import static gregtech.api.enums.OrePrefixes.ore;
+import static gregtech.api.enums.OrePrefixes.oreSmall;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.plateDense;
+import static gregtech.api.enums.OrePrefixes.plateDouble;
+import static gregtech.api.enums.OrePrefixes.plateQuadruple;
+import static gregtech.api.enums.OrePrefixes.plateQuintuple;
+import static gregtech.api.enums.OrePrefixes.plateTriple;
+import static gregtech.api.enums.OrePrefixes.rawOre;
+import static gregtech.api.enums.OrePrefixes.ring;
+import static gregtech.api.enums.OrePrefixes.rotor;
+import static gregtech.api.enums.OrePrefixes.screw;
+import static gregtech.api.enums.OrePrefixes.spring;
+import static gregtech.api.enums.OrePrefixes.springSmall;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.stickLong;
+import static gregtech.api.enums.OrePrefixes.toolHeadHammer;
+import static gregtech.api.enums.OrePrefixes.toolHeadSaw;
+import static gregtech.api.enums.OrePrefixes.toolHeadWrench;
+import static gregtech.api.enums.OrePrefixes.turbineBlade;
+import static gregtech.api.enums.OrePrefixes.values;
+import static gregtech.api.enums.OrePrefixes.wireFine;
+
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+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.SideReference;
+import com.github.bartimaeusnek.bartworks.API.WerkstoffAdderRegistry;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.client.renderer.BW_Renderer_Block_Ores;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_CircuitsLoader;
+import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.GTMetaItemEnhancer;
+import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.AdditionalRecipes;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.AspectLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.BlockLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.CasingLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.CellLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.CraftingMaterialLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.CrushedLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.DustLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.GemLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.MetalLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.MoltenCellLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.MultipleMetalLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.OreLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.RawOreLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.SimpleMetalLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.ToolLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.AssociationLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.BridgeMaterialsLoader;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.CasingRegistrator;
+import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
+import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
+import com.github.bartimaeusnek.bartworks.util.EnumUtils;
+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.common.ProgressManager;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.Element;
+import gregtech.api.enums.FluidState;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TextureSet;
+import gregtech.api.fluid.GT_FluidFactory;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.util.GT_OreDictUnificator;
+import ic2.api.recipe.IRecipeInput;
+import ic2.api.recipe.RecipeInputOreDict;
+import ic2.api.recipe.RecipeOutput;
+import ic2.api.recipe.Recipes;
+
+@SuppressWarnings("deprecation")
+public class WerkstoffLoader {
+
+ private WerkstoffLoader() {}
+
+ public static final SubTag NOBLE_GAS = SubTag.getNewSubTag("NobleGas");
+ public static final SubTag ANAEROBE_GAS = SubTag.getNewSubTag("AnaerobeGas");
+ public static final SubTag ANAEROBE_SMELTING = SubTag.getNewSubTag("AnaerobeSmelting");
+ public static final SubTag NOBLE_GAS_SMELTING = SubTag.getNewSubTag("NobleGasSmelting");
+ public static final SubTag NO_BLAST = SubTag.getNewSubTag("NoBlast");
+ public static ItemList rotorMold;
+ public static ItemList rotorShape;
+ public static ItemList smallGearShape;
+ public static ItemList ringMold;
+ public static ItemList boltMold;
+
+ public static void setUp() {
+
+ OrePrefixes.cellMolten.mMaterialGenerationBits = 0b1000000;
+ OrePrefixes.capsuleMolten.mMaterialGenerationBits = 0b1000000;
+
+ try {
+ WerkstoffLoader.rotorMold = Enum.valueOf(ItemList.class, "Shape_Mold_Rotor");
+ WerkstoffLoader.rotorShape = Enum.valueOf(ItemList.class, "Shape_Extruder_Rotor");
+ 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) {}
+
+ // add tiberium
+ EnumUtils.createNewElement("Tr", 123L, 203L, 0L, -1L, null, "Tiberium", false);
+
+ bottle.mDefaultStackSize = 1;
+ Werkstoff.GenerationFeatures.initPrefixLogic();
+ BW_GT_MaterialReference.init();
+ }
+
+ // 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
+ // GT Material range reserved on 31_767-32_767
+ public static final Werkstoff Bismutite = new Werkstoff(
+ new short[] { 255, 233, 0, 0 },
+ "Bismutite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 1,
+ TextureSet.SET_FLINT,
+ Collections.singletonList(Materials.Bismuth),
+ new Pair<>(Materials.Bismuth, 2),
+ new Pair<>(Materials.Oxygen, 2),
+ new Pair<>(Materials.CarbonDioxide, 2));
+ public static final Werkstoff Bismuthinit = new Werkstoff(
+ new short[] { 192, 192, 192, 0 },
+ "Bismuthinite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 2,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Bismuth, Materials.Sulfur),
+ new Pair<>(Materials.Bismuth, 2),
+ new Pair<>(Materials.Sulfur, 3));
+ public static final Werkstoff Zirconium = new Werkstoff(
+ new short[] { 175, 175, 175, 0 },
+ "Zirconium",
+ "Zr",
+ new Werkstoff.Stats().setProtons(40)
+ .setBlastFurnace(true)
+ .setMeltingPoint(2130)
+ .setMeltingVoltage(480),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMetalItems()
+ .enforceUnification(),
+ 3,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ );
+ public static final Werkstoff CubicZirconia = new Werkstoff(
+ new short[] { 255, 255, 255, 0 },
+ "Cubic Zirconia",
+ Werkstoff.Types.COMPOUND,
+ 3273,
+ new Werkstoff.GenerationFeatures().onlyDust()
+ .addGems()
+ .enforceUnification(),
+ 4,
+ TextureSet.SET_DIAMOND,
+ Collections.singletonList(WerkstoffLoader.Zirconium),
+ new Pair<>(WerkstoffLoader.Zirconium, 1),
+ new Pair<>(Materials.Oxygen, 2));
+ public static final Werkstoff FluorBuergerit = new Werkstoff(
+ new short[] { 0x20, 0x20, 0x20, 0 },
+ "Fluor-Buergerite",
+ subscriptNumbers("NaFe3Al6(Si6O18)(BO3)3O3F"),
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 5,
+ TextureSet.SET_RUBY,
+ Arrays.asList(Materials.Sodium, Materials.Boron, Materials.SiliconDioxide),
+ new Pair<>(Materials.Sodium, 1),
+ new Pair<>(Materials.Iron, 3),
+ new Pair<>(Materials.Aluminium, 6),
+ new Pair<>(Materials.Silicon, 6),
+ new Pair<>(Materials.Boron, 3),
+ new Pair<>(Materials.Oxygen, 30),
+ new Pair<>(Materials.Fluorine, 1));
+ public static final Werkstoff YttriumOxide = new Werkstoff(
+ 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
+ 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 },
+ "Chromo-Alumino-Povondraite",
+ subscriptNumbers("NaCr3(Al4Mg2)(Si6O18)(BO3)3(OH)3O"),
+ Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND)
+ .setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 7,
+ TextureSet.SET_RUBY,
+ Arrays.asList(Materials.Sodium, Materials.Boron, Materials.SiliconDioxide),
+ new Pair<>(Materials.Sodium, 1),
+ new Pair<>(Materials.Chrome, 3),
+ new Pair<>(Materials.Magnalium, 6),
+ new Pair<>(Materials.Silicon, 6),
+ new Pair<>(Materials.Boron, 3),
+ new Pair<>(Materials.Oxygen, 31),
+ new Pair<>(Materials.Hydrogen, 3));
+ public static final Werkstoff VanadioOxyDravit = new Werkstoff(
+ 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),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 8,
+ TextureSet.SET_RUBY,
+ Arrays.asList(Materials.Sodium, Materials.Boron, Materials.SiliconDioxide),
+ new Pair<>(Materials.Sodium, 1),
+ new Pair<>(Materials.Vanadium, 3),
+ new Pair<>(Materials.Magnalium, 6),
+ new Pair<>(Materials.Silicon, 6),
+ new Pair<>(Materials.Boron, 3),
+ new Pair<>(Materials.Oxygen, 31),
+ new Pair<>(Materials.Hydrogen, 3));
+ public static final Werkstoff Olenit = new Werkstoff(
+ new short[] { 210, 210, 210, 0 },
+ "Olenite",
+ subscriptNumbers("NaAl3Al6(Si6O18)(BO3)3O3OH"),
+ Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND)
+ .setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 9,
+ TextureSet.SET_RUBY,
+ Arrays.asList(Materials.Sodium, Materials.Boron, Materials.SiliconDioxide),
+ new Pair<>(Materials.Sodium, 1),
+ new Pair<>(Materials.Aluminium, 9),
+ new Pair<>(Materials.Silicon, 6),
+ new Pair<>(Materials.Boron, 3),
+ new Pair<>(Materials.Oxygen, 31),
+ new Pair<>(Materials.Hydrogen, 1));
+ public static final Werkstoff Arsenopyrite = new Werkstoff(
+ new short[] { 0xB0, 0xB0, 0xB0, 0 },
+ "Arsenopyrite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 10,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Sulfur, Materials.Arsenic, Materials.Iron),
+ new Pair<>(Materials.Iron, 1),
+ new Pair<>(Materials.Arsenic, 1),
+ new Pair<>(Materials.Sulfur, 1));
+ public static final Werkstoff Ferberite = new Werkstoff(
+ new short[] { 0xB0, 0xB0, 0xB0, 0 },
+ "Ferberite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 11,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Iron, Materials.Tungsten),
+ new Pair<>(Materials.Iron, 1),
+ new Pair<>(Materials.Tungsten, 1),
+ new Pair<>(Materials.Oxygen, 3));
+ public static final Werkstoff Loellingit = new Werkstoff(
+ new short[] { 0xD0, 0xD0, 0xD0, 0 },
+ "Loellingite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 12,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Iron, Materials.Arsenic),
+ new Pair<>(Materials.Iron, 1),
+ new Pair<>(Materials.Arsenic, 2));
+ public static final Werkstoff Roquesit = new Werkstoff(
+ new short[] { 0xA0, 0xA0, 0xA0, 0 },
+ "Roquesite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 13,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Copper, Materials.Sulfur),
+ new Pair<>(Materials.Copper, 1),
+ new Pair<>(Materials.Indium, 1),
+ new Pair<>(Materials.Sulfur, 2));
+ public static final Werkstoff Bornite = new Werkstoff(
+ new short[] { 0x97, 0x66, 0x2B, 0 },
+ "Bornite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 14,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Copper, Materials.Iron, Materials.Sulfur),
+ new Pair<>(Materials.Copper, 5),
+ new Pair<>(Materials.Iron, 1),
+ new Pair<>(Materials.Sulfur, 4));
+ public static final Werkstoff Wittichenit = new Werkstoff(
+ Materials.Copper.mRGBa,
+ "Wittichenite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 15,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Copper, Materials.Bismuth, Materials.Sulfur),
+ new Pair<>(Materials.Copper, 5),
+ new Pair<>(Materials.Bismuth, 1),
+ new Pair<>(Materials.Sulfur, 4));
+ public static final Werkstoff Djurleit = new Werkstoff(
+ new short[] { 0x60, 0x60, 0x60, 0 },
+ "Djurleite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 16,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Copper, Materials.Copper, Materials.Sulfur),
+ new Pair<>(Materials.Copper, 31),
+ new Pair<>(Materials.Sulfur, 16));
+ public static final Werkstoff Huebnerit = new Werkstoff(
+ new short[] { 0x80, 0x60, 0x60, 0 },
+ "Huebnerite",
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 17,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Manganese, Materials.Tungsten),
+ new Pair<>(Materials.Manganese, 1),
+ new Pair<>(Materials.Tungsten, 1),
+ new Pair<>(Materials.Oxygen, 3));
+ public static final Werkstoff Thorianit = new Werkstoff(
+ new short[] { 0x30, 0x30, 0x30, 0 },
+ "Thorianite",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 18,
+ TextureSet.SET_METALLIC,
+ Collections.singletonList(Materials.Thorium),
+ new Pair<>(Materials.Thorium, 1),
+ new Pair<>(Materials.Oxygen, 2));
+ public static final Werkstoff RedZircon = new Werkstoff(
+ new short[] { 195, 19, 19, 0 },
+ "Red Zircon",
+ new Werkstoff.Stats().setElektrolysis(false)
+ .setMeltingPoint(2130),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 19,
+ TextureSet.SET_GEM_VERTICAL,
+ Arrays.asList(WerkstoffLoader.Zirconium, Materials.SiliconDioxide),
+ new Pair<>(WerkstoffLoader.Zirconium, 1),
+ new Pair<>(Materials.Silicon, 1),
+ new Pair<>(Materials.Oxygen, 4));
+
+ // GT Enhancements
+ public static final Werkstoff Salt = new Werkstoff(
+ Materials.Salt.mRGBa,
+ "Salt",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addGems()
+ .addSifterRecipes(),
+ 20,
+ TextureSet.SET_FLINT,
+ Arrays.asList(Materials.RockSalt, Materials.Borax),
+ new Pair<>(Materials.Salt, 1));
+ public static final Werkstoff Spodumen = new Werkstoff(
+ Materials.Spodumene.mRGBa,
+ "Spodumene",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addGems()
+ .addSifterRecipes(),
+ 21,
+ TextureSet.SET_FLINT,
+ Collections.singletonList(Materials.Spodumene),
+ new Pair<>(Materials.Spodumene, 1));
+ public static final Werkstoff RockSalt = new Werkstoff(
+ Materials.RockSalt.mRGBa,
+ "Rock Salt",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addGems()
+ .addSifterRecipes(),
+ 22,
+ TextureSet.SET_FLINT,
+ Arrays.asList(Materials.RockSalt, Materials.Borax),
+ new Pair<>(Materials.RockSalt, 1));
+
+ // More NonGT Stuff
+ public static final Werkstoff Fayalit = new Werkstoff(
+ new short[] { 50, 50, 50, 0 },
+ "Fayalite",
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 23,
+ TextureSet.SET_QUARTZ,
+ Arrays.asList(Materials.Iron, Materials.SiliconDioxide),
+ new Pair<>(Materials.Iron, 2),
+ new Pair<>(Materials.Silicon, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff Forsterit = new Werkstoff(
+ new short[] { 255, 255, 255, 0 },
+ "Forsterite",
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 24,
+ TextureSet.SET_QUARTZ,
+ Arrays.asList(Materials.Magnesium, Materials.SiliconDioxide),
+ new Pair<>(Materials.Magnesium, 2),
+ new Pair<>(Materials.Silicon, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff Hedenbergit = new Werkstoff(
+ new short[] { 100, 150, 100, 0 },
+ "Hedenbergite",
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 25,
+ TextureSet.SET_QUARTZ,
+ Arrays.asList(Materials.Iron, Materials.Calcium, Materials.SiliconDioxide),
+ new Pair<>(Materials.Calcium, 1),
+ new Pair<>(Materials.Iron, 1),
+ new Pair<>(Materials.Silicon, 2),
+ new Pair<>(Materials.Oxygen, 6));
+ public static final Werkstoff DescloiziteZNVO4 = new Werkstoff(
+ new short[] { 0xBF, 0x18, 0x0F, 0 },
+ "Red Descloizite", // Pb(Zn,Cu)[OH|VO4
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 26,
+ TextureSet.SET_QUARTZ,
+ Arrays.asList(Materials.Lead, Materials.Copper, Materials.Vanadium),
+ new Pair<>(Materials.Lead, 1),
+ new Pair<>(Materials.Zinc, 1),
+ new Pair<>(Materials.Vanadium, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff DescloiziteCUVO4 = new Werkstoff(
+ new short[] { 0xf9, 0x6d, 0x18, 0 },
+ "Orange Descloizite", // Pb(Zn,Cu)[OH|VO4
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 27,
+ TextureSet.SET_QUARTZ,
+ Arrays.asList(Materials.Lead, Materials.Zinc, Materials.Vanadium),
+ new Pair<>(Materials.Lead, 1),
+ new Pair<>(Materials.Copper, 1),
+ new Pair<>(Materials.Vanadium, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff FuchsitAL = new Werkstoff(
+ new short[] { 0x4D, 0x7F, 0x64, 0 },
+ "Green Fuchsite",
+ subscriptNumbers("KAl3Si3O10(OH)2"),
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 28,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Potassium, Materials.Aluminiumoxide, Materials.SiliconDioxide),
+ new Pair<>(Materials.Potassium, 1),
+ new Pair<>(Materials.Aluminium, 3),
+ new Pair<>(Materials.Silicon, 3),
+ new Pair<>(Materials.Oxygen, 12),
+ new Pair<>(Materials.Hydrogen, 2));
+
+ public static final Werkstoff FuchsitCR = new Werkstoff(
+ new short[] { 128, 0, 0, 0 },
+ "Red Fuchsite",
+ subscriptNumbers("KCr3Si3O10(OH)2"),
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 29,
+ TextureSet.SET_METALLIC,
+ Arrays.asList(Materials.Potassium, Materials.Chrome, Materials.SiliconDioxide),
+ new Pair<>(Materials.Potassium, 1),
+ new Pair<>(Materials.Chrome, 3),
+ new Pair<>(Materials.Silicon, 3),
+ new Pair<>(Materials.Oxygen, 12),
+ new Pair<>(Materials.Hydrogen, 2));
+
+ public static final Werkstoff Thorium232 = new Werkstoff(
+ new short[] { 0, 64, 0, 0 },
+ "Thorium 232",
+ superscriptNumbers("Th232"),
+ new Werkstoff.Stats().setRadioactive(true)
+ .setBlastFurnace(true)
+ .setMass(232)
+ .setProtons(Element.Th.mProtons),
+ Werkstoff.Types.ISOTOPE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMetalItems()
+ .enforceUnification(),
+ 30,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ );
+ public static final Werkstoff BismuthTellurite = new Werkstoff(
+ new short[] { 32, 72, 32, 0 },
+ // Telluride is correct, tellurite is not.
+ // Only the display name gets renamed to avoid problems in other mods
+ "Bismuth Telluride",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addChemicalRecipes(),
+ 31,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.Bismuth, 2),
+ new Pair<>(Materials.Tellurium, 3));
+ public static final Werkstoff Tellurium = new Werkstoff(
+ new short[] { 0xff, 0xff, 0xff, 0 },
+ "Tellurium",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().addMetalItems()
+ .removePrefix(ore),
+ 32,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.Tellurium, 1));
+ public static final Werkstoff BismuthHydroBorat = new Werkstoff(
+ new short[] { 72, 144, 72, 0 },
+ "Dibismuthhydroborat",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addChemicalRecipes(),
+ 33,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.Bismuth, 2),
+ new Pair<>(Materials.Boron, 1),
+ new Pair<>(Materials.Hydrogen, 1));
+ public static final Werkstoff ArInGaPhoBiBoTe = new Werkstoff(
+ new short[] { 36, 36, 36, 0 },
+ "Circuit Compound MK3",
+ new Werkstoff.Stats().setCentrifuge(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMixerRecipes(),
+ 34,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.IndiumGalliumPhosphide, 1),
+ new Pair<>(WerkstoffLoader.BismuthHydroBorat, 3),
+ new Pair<>(WerkstoffLoader.BismuthTellurite, 2));
+
+ public static final Werkstoff Prasiolite = new Werkstoff(
+ new short[] { 0xD0, 0xDD, 0x95, 0 },
+ "Prasiolite",
+ new Werkstoff.Stats().setElektrolysis(false)
+ .setMeltingPoint(1923),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 35,
+ TextureSet.SET_QUARTZ,
+ // No Byproducts
+ new Pair<>(Materials.Silicon, 5),
+ new Pair<>(Materials.Oxygen, 10),
+ new Pair<>(Materials.Iron, 1));
+
+ public static final Werkstoff MagnetoResonaticDust = new Werkstoff(
+ new short[] { 0xDD, 0x77, 0xDD, 0 },
+ "Magneto Resonatic",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().onlyDust()
+ .addMixerRecipes()
+ .addGems(),
+ 36,
+ TextureSet.SET_MAGNETIC,
+ // No Byproducts
+ new Pair<>(WerkstoffLoader.Prasiolite, 3),
+ new Pair<>(WerkstoffLoader.BismuthTellurite, 4),
+ new Pair<>(WerkstoffLoader.CubicZirconia, 1),
+ new Pair<>(Materials.SteelMagnetic, 1));
+ public static final Werkstoff Xenon = new Werkstoff(
+ new short[] { 0x14, 0x39, 0x7F, 0 },
+ "Xenon",
+ "Xe",
+ new Werkstoff.Stats().setProtons(54)
+ .setMass(131)
+ .setGas(true)
+ .setEbfGasRecipeTimeMultiplier(0.4d)
+ .setEbfGasRecipeConsumedAmountMultiplier(0.25d),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells()
+ .enforceUnification(),
+ 37,
+ TextureSet.SET_FLUID
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff Oganesson = new Werkstoff(
+ new short[] { 0x14, 0x39, 0x7F, 0 },
+ "Oganesson",
+ "Og",
+ new Werkstoff.Stats().setProtons(118)
+ .setMass(294)
+ .setGas(true)
+ .setEbfGasRecipeTimeMultiplier(0.3d)
+ .setEbfGasRecipeConsumedAmountMultiplier(0.1d),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 38,
+ TextureSet.SET_FLUID
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff Californium = new Werkstoff(
+ new short[] { 0xAA, 0xAA, 0xAA, 0 },
+ "Californium",
+ "Cf",
+ new Werkstoff.Stats().setProtons(98)
+ .setMass(251)
+ .setBlastFurnace(true)
+ .setMeltingPoint(900),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMetalItems()
+ .addMolten()
+ .enforceUnification(),
+ 39,
+ TextureSet.SET_METALLIC
+ // 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),
+ Werkstoff.Types.ELEMENT,
+ 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 },
+ "Neon",
+ "Ne",
+ new Werkstoff.Stats().setProtons(Element.Ne.mProtons)
+ .setMass(Element.Ne.getMass())
+ .setGas(true)
+ .setEbfGasRecipeTimeMultiplier(0.6d)
+ .setEbfGasRecipeConsumedAmountMultiplier(0.55d),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells()
+ .enforceUnification(),
+ 41,
+ TextureSet.SET_FLUID
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff Krypton = new Werkstoff(
+ new short[] { 0xb1, 0xff, 0x32 },
+ "Krypton",
+ "Kr",
+ new Werkstoff.Stats().setProtons(Element.Kr.mProtons)
+ .setMass(Element.Kr.getMass())
+ .setGas(true)
+ .setEbfGasRecipeTimeMultiplier(0.5d)
+ .setEbfGasRecipeConsumedAmountMultiplier(0.4d),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells()
+ .enforceUnification(),
+ 42,
+ TextureSet.SET_FLUID
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff BArTiMaEuSNeK = new Werkstoff(
+ new short[] { 0x00, 0xff, 0x00 },
+ "BArTiMaEuSNeK",
+ "Are you serious?",
+ new Werkstoff.Stats().setMeltingPoint(9001)
+ .setCentrifuge(true)
+ .setBlastFurnace(true)
+ .setMeltingVoltage(1920),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems()
+ .addMetalItems()
+ .addMolten(),
+ 43,
+ TextureSet.SET_DIAMOND,
+ Arrays.asList(Materials.Boron, Materials.Titanium, Materials.Europium),
+ new Pair<>(Materials.Boron, 1),
+ new Pair<>(Materials.Argon, 1),
+ new Pair<>(Materials.Titanium, 1),
+ new Pair<>(Materials.Magic, 1),
+ new Pair<>(Materials.Europium, 1),
+ new Pair<>(Materials.Sulfur, 1),
+ new Pair<>(WerkstoffLoader.Neon, 1),
+ new Pair<>(Materials.Potassium, 1));
+ public static final Werkstoff PTConcentrate = new Werkstoff(
+ Materials.Platinum.getRGBA(),
+ "Platinum Concentrate",
+ "",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 44,
+ TextureSet.SET_FLUID
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff PTSaltCrude = new Werkstoff(
+ Materials.Platinum.getRGBA(),
+ "Platinum Salt",
+ "",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 45,
+ TextureSet.SET_DULL
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff PTSaltRefined = new Werkstoff(
+ Materials.Platinum.getRGBA(),
+ "Refined Platinum Salt",
+ "",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 46,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff PTMetallicPowder = new Werkstoff(
+ Materials.Platinum.getRGBA(),
+ "Platinum Metallic Powder",
+ "??PtPdIrOsRhRu??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 47,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.Platinum, 1),
+ new Pair<>(Materials.Stone, 2));
+ public static final Werkstoff AquaRegia = new Werkstoff(
+ new short[] { 0xff, 0xb1, 0x32 },
+ "Aqua Regia",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 48,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.DilutedSulfuricAcid, 1),
+ new Pair<>(Materials.NitricAcid, 1));
+ public static final Werkstoff PTResidue = new Werkstoff(
+ new short[] { 0x64, 0x63, 0x2E },
+ "Platinum Residue",
+ "??IrOsRhRu??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 49,
+ TextureSet.SET_ROUGH
+ // No Byproducts
+ );
+ public static final Werkstoff AmmoniumChloride = new Werkstoff(
+ new short[] { 0xff, 0xff, 0xff },
+ "Ammonium Chloride",
+ subscriptNumbers("NH4Cl"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 50,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.Ammonium, 1),
+ new Pair<>(Materials.HydrochloricAcid, 1));
+ public static final Werkstoff PTRawPowder = new Werkstoff(
+ Materials.Platinum.getRGBA(),
+ "Reprecipitated Platinum",
+ "PtCl",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 51,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ );
+ public static final Werkstoff PDAmmonia = new Werkstoff(
+ Materials.Palladium.getRGBA(),
+ "Palladium Enriched Ammonia",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 52,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.Ammonium, 1),
+ new Pair<>(Materials.Palladium, 1));
+ public static final Werkstoff PDMetallicPowder = new Werkstoff(
+ Materials.Palladium.getRGBA(),
+ "Palladium Metallic Powder",
+ "??Pd??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 53,
+ TextureSet.SET_METALLIC,
+ // No Byproducts
+ new Pair<>(Materials.Palladium, 1),
+ new Pair<>(Materials.Stone, 2));
+ public static final Werkstoff PDRawPowder = new Werkstoff(
+ Materials.Palladium.getRGBA(),
+ "Reprecipitated Palladium",
+ subscriptNumbers("Pd2NH4"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 54,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff PDSalt = new Werkstoff(
+ Materials.Palladium.getRGBA(),
+ "Palladium Salt",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 55,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ // No Ingredients
+ );
+ public static final Werkstoff Sodiumformate = new Werkstoff(
+ new short[] { 0xff, 0xaa, 0xaa },
+ "Sodium Formate",
+ "HCOONa",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 56,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.SodiumHydroxide, 1),
+ new Pair<>(Materials.CarbonMonoxide, 1));
+ public static final Werkstoff Sodiumsulfate = new Werkstoff(
+ new short[] { 0xff, 0xff, 0xff },
+ "Sodium Sulfate",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 57,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.Sodium, 2),
+ new Pair<>(Materials.Sulfur, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff FormicAcid = new Werkstoff(
+ new short[] { 0xff, 0xaa, 0x77 },
+ "Formic Acid",
+ subscriptNumbers("CH2O2"),
+ new Werkstoff.Stats().setElektrolysis(false),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 58,
+ TextureSet.SET_FLUID,
+ // No Byproducts
+ new Pair<>(Materials.Carbon, 1),
+ new Pair<>(Materials.Hydrogen, 2),
+ new Pair<>(Materials.Oxygen, 2));
+ public static final Werkstoff PotassiumDisulfate = new Werkstoff(
+ new short[] { 0xfb, 0xbb, 0x66 },
+ "Potassium Disulfate",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMolten()
+ .addChemicalRecipes(),
+ 59,
+ TextureSet.SET_DULL,
+ // No Byproducts
+ new Pair<>(Materials.Potassium, 2),
+ new Pair<>(Materials.Sulfur, 2),
+ new Pair<>(Materials.Oxygen, 7));
+ public static final Werkstoff LeachResidue = new Werkstoff(
+ new short[] { 0x64, 0x46, 0x29 },
+ "Leach Residue",
+ "??IrOsRu??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 60,
+ TextureSet.SET_ROUGH
+ // No Byproducts
+ );
+ public static final Werkstoff RHSulfate = new Werkstoff(
+ 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
+ );
+ public static final Werkstoff RHSulfateSolution = new Werkstoff(
+ 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
+ );
+ public static final Werkstoff CalciumChloride = new Werkstoff(
+ new short[] { 0xff, 0xff, 0xff },
+ "Calcium Chloride",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addCells(),
+ 63,
+ TextureSet.SET_DULL,
+ new Pair<>(Materials.Calcium, 1),
+ new Pair<>(Materials.Chlorine, 2)
+ // No Byproducts
+ );
+ public static final Werkstoff Ruthenium = new Werkstoff(
+ new short[] { 0x64, 0x64, 0x64 },
+ "Ruthenium",
+ "Ru",
+ 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(),
+ 64,
+ TextureSet.SET_METALLIC
+ // No Byproducts
+ );
+ public static final Werkstoff SodiumRuthenate = new Werkstoff(
+ new short[] { 0x3a, 0x40, 0xcb },
+ "Sodium Ruthenate",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 65,
+ TextureSet.SET_SHINY,
+ new Pair<>(Materials.Sodium, 2),
+ new Pair<>(Ruthenium, 1),
+ new Pair<>(Materials.Oxygen, 3)
+ // No Byproducts
+ );
+ public static final Werkstoff RutheniumTetroxide = new Werkstoff(
+ new short[] { 0xc7, 0xc7, 0xc7 },
+ "Ruthenium Tetroxide",
+ new Werkstoff.Stats().setMeltingPoint(313),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addCells(),
+ 66,
+ TextureSet.SET_DULL,
+ new Pair<>(WerkstoffLoader.Ruthenium, 1),
+ new Pair<>(Materials.Oxygen, 4)
+ // No Byproducts
+ );
+ public static final Werkstoff HotRutheniumTetroxideSollution = new Werkstoff(
+ new short[] { 0xc7, 0xc7, 0xc7 },
+ "Hot Ruthenium Tetroxide Solution",
+ "???",
+ new Werkstoff.Stats().setGas(true)
+ .setMeltingPoint(700),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 67,
+ TextureSet.SET_FLUID,
+ new Pair<>(WerkstoffLoader.Ruthenium, 1),
+ new Pair<>(Materials.Oxygen, 4),
+ new Pair<>(Materials.Chlorine, 2),
+ new Pair<>(Materials.Sodium, 2),
+ new Pair<>(Materials.Water, 2)
+ // No Byproducts
+ );
+ public static final Werkstoff RutheniumTetroxideSollution = new Werkstoff(
+ new short[] { 0xc7, 0xc7, 0xc7 },
+ "Ruthenium Tetroxide Solution",
+ "???",
+ new Werkstoff.Stats().setMeltingPoint(313),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 68,
+ TextureSet.SET_FLUID,
+ new Pair<>(Ruthenium, 1),
+ new Pair<>(Materials.Oxygen, 4),
+ new Pair<>(Materials.Chlorine, 2),
+ new Pair<>(Materials.Sodium, 2),
+ new Pair<>(Materials.Water, 2)
+ // No Byproducts
+ );
+ public static final Werkstoff IrOsLeachResidue = new Werkstoff(
+ new short[] { 0x64, 0x46, 0x29 },
+ "Rarest Metal Residue",
+ "??OsIr??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 69,
+ TextureSet.SET_ROUGH,
+ // No Byproducts
+ new Pair<>(Materials.Osmiridium, 1),
+ new Pair<>(Materials.Stone, 2));
+ public static final Werkstoff IrLeachResidue = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Iridium Metal Residue",
+ "??Ir??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 70,
+ TextureSet.SET_ROUGH,
+ new Pair<>(Materials.Iridium, 1),
+ new Pair<>(Materials.Stone, 2)
+ // No Byproducts
+ );
+ public static final Werkstoff PGSDResidue = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Sludge Dust Residue",
+ new Werkstoff.Stats().setCentrifuge(true),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 71,
+ TextureSet.SET_DULL,
+ new Pair<>(Materials.SiliconDioxide, 3),
+ new Pair<>(Materials.Gold, 2));
+ public static final Werkstoff AcidicOsmiumSolution = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Acidic Osmium Solution",
+ "???",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 72,
+ TextureSet.SET_FLUID,
+ new Pair<>(Materials.Osmium, 1),
+ new Pair<>(Materials.HydrochloricAcid, 1));
+ public static final Werkstoff IridiumDioxide = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Iridium Dioxide",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 73,
+ TextureSet.SET_FLUID,
+ new Pair<>(Materials.Iridium, 1),
+ new Pair<>(Materials.Oxygen, 2));
+ public static final Werkstoff OsmiumSolution = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Osmium Solution",
+ "???",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 74,
+ TextureSet.SET_FLUID,
+ new Pair<>(Materials.Osmium, 1),
+ new Pair<>(Materials.Hydrogen, 1));
+ public static final Werkstoff AcidicIridiumSolution = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Acidic Iridium Solution",
+ "???",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 75,
+ TextureSet.SET_FLUID,
+ new Pair<>(Materials.Iridium, 1),
+ new Pair<>(Materials.Hydrogen, 1));
+ public static final Werkstoff IridiumChloride = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Iridium Chloride",
+ subscriptNumbers("IrCl3"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 76,
+ TextureSet.SET_LAPIS,
+ new Pair<>(Materials.Iridium, 1),
+ new Pair<>(Materials.Chlorine, 3));
+ public static final Werkstoff PGSDResidue2 = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Metallic Sludge Dust Residue",
+ new Werkstoff.Stats().setCentrifuge(true),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 77,
+ TextureSet.SET_DULL,
+ new Pair<>(Materials.Nickel, 1),
+ new Pair<>(Materials.Copper, 1));
+ public static final Werkstoff Rhodium = new Werkstoff(
+ new short[] { 0xF4, 0xF4, 0xF4 },
+ "Rhodium",
+ "Rh",
+ 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(),
+ 78,
+ TextureSet.SET_METALLIC);
+ public static final Werkstoff CrudeRhMetall = new Werkstoff(
+ new short[] { 0x66, 0x66, 0x66 },
+ "Crude Rhodium Metal",
+ "??Rh??",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures(),
+ 79,
+ TextureSet.SET_DULL,
+ new Pair<>(Rhodium, 1),
+ new Pair<>(Materials.Stone, 1));
+ public static final Werkstoff RHSalt = new Werkstoff(
+ new short[] { 0x84, 0x84, 0x84 },
+ "Rhodium Salt",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 80,
+ TextureSet.SET_GEM_VERTICAL);
+ public static final Werkstoff RHSaltSolution = new Werkstoff(
+ new short[] { 0x66, 0x77, 0x88 },
+ "Rhodium Salt Solution",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 81,
+ TextureSet.SET_FLUID);
+ public static final Werkstoff SodiumNitrate = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x84 },
+ "Sodium Nitrate",
+ subscriptNumbers("NaNO3"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 82,
+ TextureSet.SET_ROUGH,
+ new Pair<>(Materials.Sodium, 1),
+ new Pair<>(Materials.Nitrogen, 1),
+ new Pair<>(Materials.Oxygen, 3));
+ public static final Werkstoff RHNitrate = new Werkstoff(
+ new short[] { 0x77, 0x66, 0x49 },
+ "Rhodium Nitrate",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 83,
+ TextureSet.SET_QUARTZ);
+ public static final Werkstoff ZincSulfate = new Werkstoff(
+ new short[] { 0x84, 0x66, 0x49 },
+ "Zinc Sulfate",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 84,
+ TextureSet.SET_QUARTZ,
+ new Pair<>(Materials.Zinc, 1),
+ new Pair<>(Materials.Sulfur, 1),
+ new Pair<>(Materials.Oxygen, 4));
+ public static final Werkstoff RhFilterCake = new Werkstoff(
+ new short[] { 0x77, 0x66, 0x49 },
+ "Rhodium Filter Cake",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 85,
+ TextureSet.SET_QUARTZ);
+ public static final Werkstoff RHFilterCakeSolution = new Werkstoff(
+ new short[] { 0x66, 0x77, 0x88 },
+ "Rhodium Filter Cake Solution",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 86,
+ TextureSet.SET_FLUID);
+ public static final Werkstoff ReRh = new Werkstoff(
+ new short[] { 0x77, 0x66, 0x49 },
+ "Reprecipitated Rhodium",
+ subscriptNumbers("Rh2NH4"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 87,
+ TextureSet.SET_QUARTZ);
+ public static final Werkstoff LuVTierMaterial = new Werkstoff(
+ Materials.Chrome.getRGBA(),
+ "Rhodium-Plated Palladium",
+ 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()
+ .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 },
+ "Tiberium",
+ "Tr",
+ new Werkstoff.Stats().setProtons(123)
+ .setMass(326)
+ .setBlastFurnace(true)
+ .setMeltingPoint(1800)
+ .setRadioactive(true)
+ .setToxic(true),
+ Werkstoff.Types.ELEMENT,
+ new Werkstoff.GenerationFeatures().addGems()
+ .addCraftingMetalWorkingItems()
+ .addSimpleMetalWorkingItems(),
+ 89,
+ TextureSet.SET_DIAMOND);
+ public static final Werkstoff Ruridit = new Werkstoff(
+ new short[] { 0xA4, 0xA4, 0xA4 },
+ "Ruridit",
+ 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()
+ .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 },
+ "Fluorspar",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().addGems(),
+ 91,
+ TextureSet.SET_GEM_VERTICAL,
+ new Pair<>(Materials.Calcium, 1),
+ new Pair<>(Materials.Fluorine, 2));
+ public static final Werkstoff HDCS = new Werkstoff(
+ new short[] { 0x33, 0x44, 0x33 },
+ "High Durability Compound Steel",
+ 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(),
+ 92,
+ TextureSet.SET_SHINY,
+ new Pair<>(Materials.TungstenSteel, 12),
+ new Pair<>(Materials.HSSE, 9),
+ new Pair<>(Materials.HSSG, 6),
+ new Pair<>(WerkstoffLoader.Ruridit, 3),
+ new Pair<>(WerkstoffLoader.MagnetoResonaticDust, 2),
+ new Pair<>(Materials.Plutonium, 1));
+ public static final Werkstoff Atheneite = new Werkstoff(
+ new short[] { 175, 175, 175 },
+ "Atheneite",
+ subscriptNumbers("(Pd,Hg)3As"),
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 93,
+ TextureSet.SET_SHINY,
+ new Pair<>(WerkstoffLoader.PDMetallicPowder, 3),
+ new Pair<>(Materials.Mercury, 3),
+ new Pair<>(Materials.Arsenic, 1));
+ public static final Werkstoff Temagamite = new Werkstoff(
+ new short[] { 245, 245, 245 },
+ "Temagamite",
+ subscriptNumbers("Pd3HgTe"),
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 94,
+ TextureSet.SET_ROUGH,
+ new Pair<>(WerkstoffLoader.PDMetallicPowder, 3),
+ new Pair<>(Materials.Mercury, 1),
+ new Pair<>(Materials.Tellurium, 1));
+ public static final Werkstoff Terlinguaite = new Werkstoff(
+ new short[] { 245, 245, 245 },
+ "Terlinguaite",
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures(),
+ 95,
+ TextureSet.SET_GEM_HORIZONTAL,
+ new Pair<>(Materials.Mercury, 2),
+ new Pair<>(Materials.Chlorine, 1),
+ new Pair<>(Materials.Oxygen, 1));
+ public static final Werkstoff AdemicSteel = new Werkstoff(
+ 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),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().onlyDust()
+ .addMetalItems()
+ .addCraftingMetalWorkingItems()
+ .addMolten()
+ .addSimpleMetalWorkingItems()
+ .addMultipleIngotMetalWorkingItems(),
+ 96,
+ TextureSet.SET_METALLIC,
+ new Pair<>(Materials.Steel, 2),
+ new Pair<>(Materials.VanadiumSteel, 1),
+ new Pair<>(Materials.DamascusSteel, 1),
+ new Pair<>(Materials.Carbon, 4));
+ public static final Werkstoff RawAdemicSteel = new Werkstoff(
+ new short[] { 0xed, 0xed, 0xed },
+ "Raw Ademic Steel",
+ new Werkstoff.Stats().setCentrifuge(true),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().onlyDust()
+ .addMixerRecipes(),
+ 97,
+ TextureSet.SET_ROUGH,
+ new Pair<>(Materials.Steel, 2),
+ new Pair<>(Materials.VanadiumSteel, 1),
+ new Pair<>(Materials.DamascusSteel, 1));
+ public static final Werkstoff HexafluorosilicicAcid = new Werkstoff(
+ new short[] { 0x2c, 0x70, 0xb5 },
+ "Hexafluorosilicic Acid",
+ subscriptNumbers("H2SiF6"),
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 98,
+ TextureSet.SET_FLUID,
+ new Pair<>(Materials.Hydrogen, 2),
+ new Pair<>(Materials.Silicon, 1),
+ new Pair<>(Materials.Fluorine, 6));
+ public static final Werkstoff Potassiumfluorosilicate = new Werkstoff(
+ new short[] { 0x2e, 0x97, 0xb2 },
+ "Potassiumfluorosilicate",
+ subscriptNumbers("K2SiF6"),
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 99,
+ TextureSet.SET_SHINY,
+ new Pair<>(Materials.Potassium, 2),
+ new Pair<>(Materials.Silicon, 1),
+ new Pair<>(Materials.Fluorine, 6));
+ public static final Werkstoff Alumina = new Werkstoff(
+ new short[] { 0xa0, 0xad, 0xb1 },
+ "Alumina",
+ subscriptNumbers("Al2O3"),
+ new Werkstoff.Stats(),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 100,
+ TextureSet.SET_DULL);
+ public static final Werkstoff PotassiumCarbonate = new Werkstoff(
+ new short[] { 0x7b, 0x96, 0x4f },
+ "Potassium Carbonate",
+ subscriptNumbers("K2CO3"),
+ new Werkstoff.Stats().setElektrolysis(true),
+ Werkstoff.Types.COMPOUND,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 101,
+ TextureSet.SET_DULL,
+ new Pair<>(Materials.Potassium, 2),
+ new Pair<>(Materials.Carbon, 1),
+ new Pair<>(Materials.Oxygen, 3));
+ public static final Werkstoff RawFluorophlogopite = new Werkstoff(
+ new short[] { 0x36, 0x51, 0x0b },
+ "Raw Fluorophlogopite",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust(),
+ 102,
+ TextureSet.SET_DULL);
+ public static final Werkstoff HotFluorophlogopite = new Werkstoff(
+ new short[] { 0xbf, 0xd3, 0x55 },
+ "Unformed Fluorophlogopite",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ 103,
+ TextureSet.SET_FLUID);
+ public static final Werkstoff Fluorophlogopite = new Werkstoff(
+ new short[] { 0xbf, 0xd3, 0x55 },
+ "Fluorophlogopite",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .onlyDust()
+ .addMetalItems(),
+ 104,
+ TextureSet.SET_SHINY);
+
+ public static HashMap<OrePrefixes, BW_MetaGenerated_Items> items = new HashMap<>();
+ public static HashBiMap<Werkstoff, Fluid> fluids = HashBiMap.create();
+ public static HashBiMap<Werkstoff, Fluid> molten = HashBiMap.create();
+ public static Block BWOres;
+ public static Block BWSmallOres;
+ public static Block BWBlocks;
+ public static Block BWBlockCasings;
+ public static Block BWBlockCasingsAdvanced;
+ public static boolean registered;
+ public static final HashSet<OrePrefixes> ENABLED_ORE_PREFIXES = new HashSet<>();
+
+ public static Werkstoff getWerkstoff(String Name) {
+ try {
+ Field f = WerkstoffLoader.class.getField(Name);
+ return (Werkstoff) f.get(null);
+ } catch (IllegalAccessException | NoSuchFieldException | ClassCastException e) {
+ MainMod.LOGGER.catching(e);
+ }
+ return Werkstoff.default_null_Werkstoff;
+ }
+
+ public static ItemStack getCorrespondingItemStack(OrePrefixes orePrefixes, Werkstoff werkstoff) {
+ return WerkstoffLoader.getCorrespondingItemStack(orePrefixes, werkstoff, 1);
+ }
+
+ public static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) {
+ if (!werkstoff.getGenerationFeatures().enforceUnification) {
+ ItemStack ret = GT_OreDictUnificator.get(orePrefixes, werkstoff.getBridgeMaterial(), amount);
+ if (ret != null) return ret;
+ ret = OreDictHandler.getItemStack(werkstoff.getVarName(), orePrefixes, amount);
+ if (ret != null) return ret;
+ }
+ if (orePrefixes == ore) return new ItemStack(WerkstoffLoader.BWOres, amount, werkstoff.getmID());
+ if (orePrefixes == oreSmall) return new ItemStack(WerkstoffLoader.BWSmallOres, amount, werkstoff.getmID());
+ else if (orePrefixes == block) return new ItemStack(WerkstoffLoader.BWBlocks, amount, werkstoff.getmID());
+ else if (orePrefixes == OrePrefixes.blockCasing)
+ return new ItemStack(WerkstoffLoader.BWBlockCasings, amount, werkstoff.getmID());
+ else if (orePrefixes == OrePrefixes.blockCasingAdvanced)
+ return new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, amount, werkstoff.getmID());
+ else if (WerkstoffLoader.items.get(orePrefixes) == null) return null;
+ return new ItemStack(WerkstoffLoader.items.get(orePrefixes), amount, werkstoff.getmID()).copy();
+ }
+
+ public static ItemStack getCorrespondingItemStack(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) {
+ ItemStack stack = getCorrespondingItemStackUnsafe(orePrefixes, werkstoff, amount);
+ if (stack != null) return stack;
+ 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();
+ }
+
+ public static void runInit() {
+ MainMod.LOGGER.info("Making Meta Items for BW Materials");
+ long timepre = System.nanoTime();
+ WerkstoffAdderRegistry.run();
+ addSubTags();
+ addItemsForGeneration();
+ addBridgeSubTags();
+ 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!");
+ }
+
+ 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);
+ DebugLog.log("Loading Recipes" + (System.nanoTime() - timepre));
+ Integer[] clsArr = {};
+ int size = 0;
+ if (BetterLoadingScreen.isModLoaded()) clsArr = CLSCompat.initCls();
+
+ IWerkstoffRunnable[] werkstoffRunnables = { new ToolLoader(), new DustLoader(), new GemLoader(),
+ new SimpleMetalLoader(), new CasingLoader(), new AspectLoader(), new OreLoader(), new RawOreLoader(),
+ 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));
+ if (werkstoff == null || werkstoff.getmID() < 0) {
+ progressBar.step("");
+ continue;
+ }
+ if (BetterLoadingScreen.isModLoaded()) size = CLSCompat.invokeStepSize(werkstoff, clsArr, size);
+ DebugLog.log("Werkstoff: " + werkstoff.getDefaultName() + " " + (System.nanoTime() - timepreone));
+ for (IWerkstoffRunnable runnable : werkstoffRunnables) {
+ String loaderName = runnable.getClass()
+ .getSimpleName();
+ DebugLog.log(loaderName + " started " + (System.nanoTime() - timepreone));
+ runnable.run(werkstoff);
+ DebugLog.log(loaderName + " done " + (System.nanoTime() - timepreone));
+ }
+ DebugLog.log("Done" + " " + (System.nanoTime() - timepreone));
+ progressBar.step(werkstoff.getDefaultName());
+ }
+ DebugLog.log("Loading New Circuits" + " " + (System.nanoTime() - timepreone));
+ BW_CircuitsLoader.initNewCircuits();
+
+ if (BetterLoadingScreen.isModLoaded()) {
+ CLSCompat.disableCls();
+ }
+
+ progressBar.step("Load Additional Recipes");
+ 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!");
+ registered = true;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static void addSubTags() {
+ WerkstoffLoader.CubicZirconia.getStats()
+ .setDurOverride(Materials.Diamond.mDurability);
+ WerkstoffLoader.HDCS.getStats()
+ .setSpeedOverride(Materials.HSSS.mToolSpeed);
+ WerkstoffLoader.HDCS.getStats()
+ .setDurMod(10f);
+ Materials.Helium.add(WerkstoffLoader.NOBLE_GAS);
+ WerkstoffLoader.Neon.add(WerkstoffLoader.NOBLE_GAS);
+ Materials.Argon.add(WerkstoffLoader.NOBLE_GAS);
+ WerkstoffLoader.Krypton.add(WerkstoffLoader.NOBLE_GAS);
+ WerkstoffLoader.Xenon.add(WerkstoffLoader.NOBLE_GAS, WerkstoffLoader.ANAEROBE_GAS);
+ Materials.Radon.add(WerkstoffLoader.NOBLE_GAS);
+ WerkstoffLoader.Oganesson.add(WerkstoffLoader.NOBLE_GAS, WerkstoffLoader.ANAEROBE_GAS);
+
+ Materials.Nitrogen.add(WerkstoffLoader.ANAEROBE_GAS);
+
+ WerkstoffLoader.Calcium.add(WerkstoffLoader.ANAEROBE_SMELTING);
+
+ WerkstoffLoader.LuVTierMaterial.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
+ WerkstoffLoader.Ruridit.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
+ WerkstoffLoader.AdemicSteel.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
+
+ WerkstoffLoader.MagnetoResonaticDust.add(WerkstoffLoader.NO_BLAST);
+
+ // Calcium Smelting block
+ Materials.Calcium.mBlastFurnaceRequired = true;
+
+ Materials.Salt.mDurability = WerkstoffLoader.Salt.getDurability();
+ Materials.Spodumene.mDurability = WerkstoffLoader.Spodumen.getDurability();
+ Materials.RockSalt.mDurability = WerkstoffLoader.RockSalt.getDurability();
+ Materials.Calcium.mDurability = WerkstoffLoader.Calcium.getDurability();
+
+ Materials.Salt.mToolSpeed = WerkstoffLoader.Salt.getToolSpeed();
+ Materials.Spodumene.mToolSpeed = WerkstoffLoader.Spodumen.getToolSpeed();
+ Materials.RockSalt.mToolSpeed = WerkstoffLoader.RockSalt.getToolSpeed();
+ Materials.Calcium.mToolSpeed = WerkstoffLoader.Calcium.getToolSpeed();
+
+ Materials.Salt.mToolQuality = WerkstoffLoader.Salt.getToolQuality();
+ Materials.Spodumene.mToolQuality = WerkstoffLoader.Spodumen.getToolQuality();
+ Materials.RockSalt.mToolQuality = WerkstoffLoader.RockSalt.getToolQuality();
+ Materials.Calcium.mToolQuality = WerkstoffLoader.Calcium.getToolQuality();
+
+ for (Werkstoff W : Werkstoff.werkstoffHashSet) {
+ 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);
+ break;
+ }
+ if (pair.getKey() instanceof Materials && pair.getKey() == Materials.Iron) {
+ W.add(SubTag.ELECTROMAGNETIC_SEPERATION_IRON);
+ break;
+ } else if (pair.getKey() instanceof Materials && pair.getKey() == Materials.Gold) {
+ W.add(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD);
+ break;
+ }
+ }
+ if (W.hasItemType(gem)) {
+ W.add(SubTag.CRYSTAL);
+ W.add(SubTag.CRYSTALLISABLE);
+ }
+ }
+ }
+
+ private static void addBridgeSubTags() {
+ // add specific GT materials subtags to various werkstoff bridgematerials
+
+ SubTag.METAL.addTo(LuVTierMaterial.getBridgeMaterial());
+ }
+
+ public static long toGenerateGlobal;
+
+ private static void addItemsForGeneration() {
+ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
+ if (werkstoff.hasItemType(cell)) {
+ if (!FluidRegistry.isFluidRegistered(werkstoff.getDefaultName())) {
+ DebugLog.log("Adding new Fluid: " + werkstoff.getDefaultName());
+ Fluid fluid = GT_FluidFactory.builder(werkstoff.getDefaultName())
+ .withLocalizedName(werkstoff.getDefaultName())
+ .withStateAndTemperature(
+ werkstoff.getStats()
+ .getFluidState(),
+ 300)
+ .withColorRGBA(werkstoff.getRGBA())
+ .withTextureName("autogenerated")
+ .buildAndRegister()
+ .asFluid();
+ WerkstoffLoader.fluids.put(werkstoff, fluid);
+ } else {
+ WerkstoffLoader.fluids.put(werkstoff, FluidRegistry.getFluid(werkstoff.getDefaultName()));
+ }
+ }
+ if (werkstoff.hasItemType(OrePrefixes.cellMolten)) {
+ if (!FluidRegistry.isFluidRegistered("molten." + werkstoff.getDefaultName())) {
+ DebugLog.log("Adding new Molten: " + werkstoff.getDefaultName());
+ Fluid fluid = GT_FluidFactory.builder("molten." + werkstoff.getDefaultName())
+ .withLocalizedName("Molten " + werkstoff.getDefaultName())
+ .withStateAndTemperature(
+ FluidState.MOLTEN,
+ werkstoff.getStats()
+ .getMeltingPoint() > 0 ? werkstoff.getStats()
+ .getMeltingPoint() : 300)
+ .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;
+ }
+ DebugLog.log("GlobalGeneration: " + WerkstoffLoader.toGenerateGlobal);
+ if ((WerkstoffLoader.toGenerateGlobal & 0b1) != 0) {
+ WerkstoffLoader.items.put(dust, new BW_MetaGenerated_Items(dust));
+ WerkstoffLoader.items.put(dustTiny, new BW_MetaGenerated_Items(dustTiny));
+ WerkstoffLoader.items.put(dustSmall, new BW_MetaGenerated_Items(dustSmall));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b10) != 0) {
+ WerkstoffLoader.items.put(ingot, new BW_MetaGenerated_Items(ingot));
+ WerkstoffLoader.items.put(ingotHot, new BW_MetaGenerated_Items(ingotHot)); // 1750
+ WerkstoffLoader.items.put(nugget, new BW_MetaGenerated_Items(nugget));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b100) != 0) {
+ WerkstoffLoader.items.put(gem, new BW_MetaGenerated_Items(gem));
+ WerkstoffLoader.items.put(gemChipped, new BW_MetaGenerated_Items(gemChipped));
+ WerkstoffLoader.items.put(gemExquisite, new BW_MetaGenerated_Items(gemExquisite));
+ WerkstoffLoader.items.put(gemFlawed, new BW_MetaGenerated_Items(gemFlawed));
+ WerkstoffLoader.items.put(gemFlawless, new BW_MetaGenerated_Items(gemFlawless));
+ WerkstoffLoader.items.put(lens, new BW_MetaGenerated_Items(lens));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b1000) != 0) {
+ gameRegistryHandler();
+ WerkstoffLoader.items.put(crushed, new BW_MetaGenerated_Items(crushed));
+ WerkstoffLoader.items.put(crushedPurified, new BW_MetaGenerated_Items(crushedPurified));
+ WerkstoffLoader.items.put(crushedCentrifuged, new BW_MetaGenerated_Items(crushedCentrifuged));
+ WerkstoffLoader.items.put(dustPure, new BW_MetaGenerated_Items(dustPure));
+ WerkstoffLoader.items.put(dustImpure, new BW_MetaGenerated_Items(dustImpure));
+ WerkstoffLoader.items.put(rawOre, new BW_MetaGenerated_Items(rawOre));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b10000) != 0) {
+ WerkstoffLoader.items.put(cell, new BW_MetaGenerated_Items(cell));
+ if (Forestry.isModLoaded()) WerkstoffLoader.items.put(capsule, new BW_MetaGenerated_Items(capsule));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b100000) != 0) {
+ WerkstoffLoader.items.put(cellPlasma, new BW_MetaGenerated_Items(cellPlasma));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b1000000) != 0) {
+ WerkstoffLoader.items.put(OrePrefixes.cellMolten, new BW_MetaGenerated_Items(OrePrefixes.cellMolten));
+ if (Forestry.isModLoaded()) WerkstoffLoader.items
+ .put(OrePrefixes.capsuleMolten, new BW_MetaGenerated_Items(OrePrefixes.capsuleMolten));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b10000000) != 0) {
+ WerkstoffLoader.items.put(plate, new BW_MetaGenerated_Items(plate));
+ WerkstoffLoader.items.put(foil, new BW_MetaGenerated_Items(foil));
+ WerkstoffLoader.items.put(stick, new BW_MetaGenerated_Items(stick));
+ WerkstoffLoader.items.put(stickLong, new BW_MetaGenerated_Items(stickLong));
+ WerkstoffLoader.items.put(toolHeadWrench, new BW_MetaGenerated_Items(toolHeadWrench));
+ WerkstoffLoader.items.put(toolHeadHammer, new BW_MetaGenerated_Items(toolHeadHammer));
+ WerkstoffLoader.items.put(toolHeadSaw, new BW_MetaGenerated_Items(toolHeadSaw));
+ WerkstoffLoader.items.put(turbineBlade, new BW_MetaGenerated_Items(turbineBlade));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b100000000) != 0) {
+ WerkstoffLoader.items.put(gearGt, new BW_MetaGenerated_Items(gearGt));
+ WerkstoffLoader.items.put(gearGtSmall, new BW_MetaGenerated_Items(gearGtSmall));
+ WerkstoffLoader.items.put(bolt, new BW_MetaGenerated_Items(bolt));
+ WerkstoffLoader.items.put(screw, new BW_MetaGenerated_Items(screw));
+ WerkstoffLoader.items.put(ring, new BW_MetaGenerated_Items(ring));
+ WerkstoffLoader.items.put(spring, new BW_MetaGenerated_Items(spring));
+ WerkstoffLoader.items.put(springSmall, new BW_MetaGenerated_Items(springSmall));
+ WerkstoffLoader.items.put(rotor, new BW_MetaGenerated_Items(rotor));
+ WerkstoffLoader.items.put(wireFine, new BW_MetaGenerated_Items(wireFine));
+ }
+ if ((WerkstoffLoader.toGenerateGlobal & 0b1000000000) != 0) {
+ WerkstoffLoader.items.put(plateDouble, new BW_MetaGenerated_Items(plateDouble));
+ WerkstoffLoader.items.put(plateTriple, new BW_MetaGenerated_Items(plateTriple));
+ WerkstoffLoader.items.put(plateQuadruple, new BW_MetaGenerated_Items(plateQuadruple));
+ WerkstoffLoader.items.put(plateQuintuple, new BW_MetaGenerated_Items(plateQuintuple));
+ WerkstoffLoader.items.put(plateDense, new BW_MetaGenerated_Items(plateDense));
+ WerkstoffLoader.items.put(ingotDouble, new BW_MetaGenerated_Items(ingotDouble));
+ WerkstoffLoader.items.put(ingotTriple, new BW_MetaGenerated_Items(ingotTriple));
+ WerkstoffLoader.items.put(ingotQuadruple, new BW_MetaGenerated_Items(ingotQuadruple));
+ WerkstoffLoader.items.put(ingotQuintuple, new BW_MetaGenerated_Items(ingotQuintuple));
+ }
+ ENABLED_ORE_PREFIXES.addAll(WerkstoffLoader.items.keySet());
+ ENABLED_ORE_PREFIXES.add(ore);
+ ENABLED_ORE_PREFIXES.add(oreSmall);
+ WerkstoffLoader.runGTItemDataRegistrator();
+ }
+
+ static void gameRegistryHandler() {
+ if (SideReference.Side.Client) BW_Renderer_Block_Ores.register();
+
+ GameRegistry.registerTileEntity(BW_MetaGeneratedOreTE.class, "bw.blockoresTE");
+ GameRegistry.registerTileEntity(BW_MetaGeneratedSmallOreTE.class, "bw.blockoresSmallTE");
+ 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");
+
+ 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.BWBlocks = new BW_MetaGenerated_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",
+ OrePrefixes.blockCasing);
+ WerkstoffLoader.BWBlockCasingsAdvanced = new BW_MetaGeneratedBlocks_Casing(
+ Material.iron,
+ BW_MetaGeneratedBlocks_CasingAdvanced_TE.class,
+ "bw.werkstoffblockscasingadvanced",
+ OrePrefixes.blockCasingAdvanced);
+
+ 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");
+
+ GTMetaItemEnhancer.addAdditionalOreDictToForestry();
+ GTMetaItemEnhancer.init();
+ }
+
+ private static void runGTItemDataRegistrator() {
+ IWerkstoffRunnable[] registrations = { new BridgeMaterialsLoader(), new AssociationLoader(),
+ new CasingRegistrator() };
+ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
+ for (IWerkstoffRunnable registration : registrations) {
+ registration.run(werkstoff);
+ }
+ }
+ addFakeItemDataToInWorldBlocksAndCleanUpFakeData();
+ addVanillaCasingsToGTOreDictUnificator();
+ }
+
+ public static void addVanillaCasingsToGTOreDictUnificator() {
+ GT_OreDictUnificator
+ .addAssociation(OrePrefixes.blockCasing, Materials.Aluminium, ItemList.Casing_FrostProof.get(1L), false);
+ GT_OreDictUnificator
+ .addAssociation(OrePrefixes.blockCasing, Materials.Nickel, ItemList.Casing_HeatProof.get(1L), false);
+ GT_OreDictUnificator
+ .addAssociation(OrePrefixes.blockCasing, Materials.Lead, ItemList.Casing_RadiationProof.get(1L), false);
+ GT_OreDictUnificator
+ .addAssociation(OrePrefixes.blockCasing, Materials.Steel, ItemList.Casing_SolidSteel.get(1L), false);
+ GT_OreDictUnificator.addAssociation(
+ OrePrefixes.blockCasing,
+ Materials.TungstenSteel,
+ ItemList.Casing_RobustTungstenSteel.get(1L),
+ false);
+ GT_OreDictUnificator.addAssociation(
+ OrePrefixes.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.
+ */
+ @SuppressWarnings("unchecked")
+ private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {
+
+ Map<String, Materials> MATERIALS_MAP = null;
+
+ try {
+ Field f = Materials.class.getDeclaredField("MATERIALS_MAP");
+ f.setAccessible(true);
+ MATERIALS_MAP = (Map<String, Materials>) f.get(null);
+ } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {
+ e.printStackTrace();
+ }
+
+ if (MATERIALS_MAP == null) throw new NullPointerException("MATERIALS_MAP null!");
+
+ Materials oreMat = new Materials(-1, null, 0, 0, 0, false, "bwores", "bwores", null, true, null);
+ Materials smallOreMat = new Materials(-1, null, 0, 0, 0, false, "bwsmallores", "bwsmallores", null, true, null);
+ Materials blockMat = new Materials(-1, null, 0, 0, 0, false, "bwblocks", "bwblocks", null, true, null);
+
+ for (int i = 0; i < 16; i++) {
+ GT_OreDictUnificator.addAssociation(ore, oreMat, new ItemStack(BWOres, 1, i), true);
+ GT_OreDictUnificator.addAssociation(oreSmall, smallOreMat, new ItemStack(BWSmallOres, 1, i), true);
+ GT_OreDictUnificator.addAssociation(block, blockMat, new ItemStack(BWBlocks, 1, i), true);
+ }
+
+ MATERIALS_MAP.remove("bwores");
+ MATERIALS_MAP.remove("bwsmallores");
+ MATERIALS_MAP.remove("bwblocks");
+ }
+
+ public static void removeIC2Recipes() {
+ try {
+ Set<Map.Entry<IRecipeInput, RecipeOutput>> remset = new HashSet<>();
+ for (Map.Entry<IRecipeInput, RecipeOutput> curr : Recipes.macerator.getRecipes()
+ .entrySet()) {
+ if (curr.getKey() instanceof RecipeInputOreDict) {
+ if ("oreNULL".equalsIgnoreCase(((RecipeInputOreDict) curr.getKey()).input)) {
+ remset.add(curr);
+ }
+ for (ItemStack stack : curr.getValue().items) {
+ if (stack.getItem() instanceof BW_MetaGenerated_Items) remset.add(curr);
+ }
+ }
+ }
+ Recipes.macerator.getRecipes()
+ .entrySet()
+ .removeAll(remset);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void runAdditionalOreDict() {
+ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
+ if (werkstoff.hasItemType(ore)) {
+ 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()
+ .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) || werkstoff.hasItemType(ingot)) {
+ GT_OreDictUnificator.registerOre(block + werkstoff.getVarName(), werkstoff.get(block));
+ 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))));
+ }
+
+ GT_OreDictUnificator.registerOre("craftingIndustrialDiamond", WerkstoffLoader.CubicZirconia.get(gemExquisite));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AddSomeRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AddSomeRecipes.java
new file mode 100644
index 0000000000..c31013eb78
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AddSomeRecipes.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class AddSomeRecipes implements Runnable {
+
+ public void run() {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1))
+ .itemOutputs(
+ WerkstoffLoader.Zirconium.get(dust),
+ WerkstoffLoader.Zirconium.get(dust),
+ WerkstoffLoader.Tiberium.get(dustSmall, 2),
+ WerkstoffLoader.Zirconium.get(dust, 2),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 8L),
+ GT_OreDictUnificator.get(dust, Materials.Platinum, 1L))
+ .outputChances(100_00, 50_00, 50_00, 25_00, 100_00, 100_00)
+ .fluidOutputs(WerkstoffLoader.Xenon.getFluidOrGas(1))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1))
+ .itemOutputs(
+ WerkstoffLoader.Zirconium.get(dust, 2),
+ WerkstoffLoader.Zirconium.get(dust, 2),
+ WerkstoffLoader.Tiberium.get(dust),
+ WerkstoffLoader.Zirconium.get(dust, 4),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 18L),
+ GT_OreDictUnificator.get(dust, Materials.Platinum, 2L))
+ .outputChances(100_00, 50_00, 50_00, 25_00, 100_00, 100_00)
+ .fluidOutputs(WerkstoffLoader.Xenon.getFluidOrGas(2))
+ .duration(12 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1))
+ .itemOutputs(
+ WerkstoffLoader.Zirconium.get(dust, 4),
+ WerkstoffLoader.Zirconium.get(dust, 4),
+ WerkstoffLoader.Tiberium.get(dust, 2),
+ WerkstoffLoader.Zirconium.get(dust, 8),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 38L),
+ GT_OreDictUnificator.get(dust, Materials.Platinum, 4L))
+ .outputChances(100_00, 50_00, 50_00, 25_00, 100_00, 100_00)
+ .fluidOutputs(WerkstoffLoader.Xenon.getFluidOrGas(4))
+ .duration(50 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1))
+ .itemOutputs(
+ ItemList.Depleted_Naquadah_4.get(8),
+ WerkstoffLoader.Zirconium.get(dust, 64),
+ WerkstoffLoader.Zirconium.get(dust, 64),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 64L),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 64L),
+ GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 48L))
+ .outputChances(100_00, 50_00, 50_00, 100_00, 100_00, 100_00)
+ .duration(1 * MINUTES + 40 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(centrifugeRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java
new file mode 100644
index 0000000000..3638536ca6
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java
@@ -0,0 +1,671 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.util.BW_Util.CLEANROOM;
+import static gregtech.api.enums.Mods.Gendustry;
+import static gregtech.api.enums.OrePrefixes.bolt;
+import static gregtech.api.enums.OrePrefixes.crushed;
+import static gregtech.api.enums.OrePrefixes.crushedPurified;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.gemChipped;
+import static gregtech.api.enums.OrePrefixes.gemExquisite;
+import static gregtech.api.enums.OrePrefixes.gemFlawed;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.stickLong;
+import static gregtech.api.recipe.RecipeMaps.autoclaveRecipes;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.recipe.RecipeMaps.primitiveBlastRecipes;
+import static gregtech.api.recipe.RecipeMaps.sifterRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.ADDITIVE_AMOUNT;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+
+import com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+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.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems;
+import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_Meta_Items;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+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.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_RecipeConstants;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.behaviors.Behaviour_DataOrb;
+
+public class AdditionalRecipes {
+
+ private static void runBWRecipes() {
+
+ if (ConfigHandler.BioLab) {
+ FluidStack[] dnaFluid = { Gendustry.isModLoaded() ? FluidRegistry.getFluidStack("liquiddna", 1000)
+ : Materials.Biomass.getFluid(1000L) };
+
+ for (ItemStack stack : BioItemList.getAllPetriDishes()) {
+ 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);
+ BartWorksRecipeMaps.bioLabRecipes.addFakeRecipe(
+ false,
+ 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) },
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(3 + DNA.getTier()),
+ BW_Util.STANDART);
+ }
+ }
+
+ for (ItemStack stack : BioItemList.getAllDNASampleFlasks()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
+
+ if (DNA != null) {
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(Outp, DNA.getName());
+
+ BartWorksRecipeMaps.bioLabRecipes.addFakeRecipe(
+ false,
+ 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 },
+ dnaFluid,
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
+ BW_Util.STANDART);
+ }
+ }
+
+ for (ItemStack stack : BioItemList.getAllPlasmidCells()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
+
+ if (DNA != null) {
+ ItemStack inp = ItemList.Tool_DataOrb.get(0L);
+ Behaviour_DataOrb.setDataTitle(inp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(inp, DNA.getName());
+ ItemStack inp2 = ItemList.Tool_DataOrb.get(0L);
+ Behaviour_DataOrb.setDataTitle(inp2, "DNA Sample");
+ Behaviour_DataOrb.setDataName(inp2, BioCultureLoader.BIO_DATA_BETA_LACMATASE.getName());
+
+ BartWorksRecipeMaps.bioLabRecipes.addFakeRecipe(
+ false,
+ 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 },
+ dnaFluid,
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
+ BW_Util.STANDART);
+ }
+ }
+
+ for (ItemStack stack : BioItemList.getAllPetriDishes()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(
+ stack.getTagCompound()
+ .getCompoundTag("DNA"));
+ BioData Plasmid = BioData.getBioDataFromNBTTag(
+ stack.getTagCompound()
+ .getCompoundTag("Plasmid"));
+ if (!Objects.equals(DNA.getName(), Plasmid.getName())) {
+ BartWorksRecipeMaps.bioLabRecipes.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) },
+ BioItemList.mBioLabParts[3],
+ new int[] { Plasmid.getChance(), 10000 },
+ new FluidStack[] { FluidRegistry.getFluidStack("ic2distilledwater", 1000) },
+ null,
+ 500,
+ (int) TierEU.RECIPE_LuV,
+ BW_Util.STANDART);
+ }
+ }
+
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(Outp, "Any DNA");
+ // Clonal Cellular Synthesis- [Liquid DNA] + Medium Petri Dish + Plasma Membrane + Stem Cells + Genome Data
+ BartWorksRecipeMaps.bioLabRecipes.addFakeRecipe(
+ false,
+ 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.mBioLabParts[4],
+ new int[] { 7500, 10000 },
+ new FluidStack[] { new FluidStack(dnaFluid[0].getFluid(), 8000) },
+ null,
+ 500,
+ (int) TierEU.RECIPE_LuV,
+ BW_Util.STANDART);
+
+ 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) {
+ BartWorksRecipeMaps.bacterialVatRecipes.addRecipe(
+ // boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems,
+ // int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration,
+ // int aEUt, int aSpecialValue
+ new GT_Recipe(
+ true,
+ 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) },
+ 1000,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART));
+ // aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs,
+ // aDuration, aEUt, aSpecialValue
+ BartWorksRecipeMaps.bioLabRecipes.addRecipe(
+ new GT_Recipe(
+ 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,
+ (int) TierEU.RECIPE_HV,
+ BW_Util.STANDART));
+ }
+ }
+ }
+ }
+
+ List<Pair<Materials, Integer>> liquidFuels = Arrays.asList(
+ ImmutablePair.of(Materials.PhosphoricAcid, 36),
+ ImmutablePair.of(Materials.DilutedHydrochloricAcid, 14),
+ ImmutablePair.of(Materials.HypochlorousAcid, 30),
+ ImmutablePair.of(Materials.HydrofluoricAcid, 40),
+ ImmutablePair.of(Materials.HydrochloricAcid, 28),
+ ImmutablePair.of(Materials.NitricAcid, 24),
+ ImmutablePair.of(Materials.Mercury, 32),
+ ImmutablePair.of(Materials.DilutedSulfuricAcid, 9),
+ ImmutablePair.of(Materials.SulfuricAcid, 18),
+ ImmutablePair.of(Materials.AceticAcid, 11),
+ ImmutablePair.of(WerkstoffLoader.FormicAcid.getBridgeMaterial(), 40));
+ for (Pair<Materials, Integer> fuel : liquidFuels) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ fuel.getLeft()
+ .getCells(1))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .metadata(GT_RecipeConstants.FUEL_VALUE, fuel.getRight())
+ .addTo(BartWorksRecipeMaps.acidGenFuels);
+ }
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Redstone, 1))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .metadata(GT_RecipeConstants.FUEL_VALUE, 10)
+ .addTo(BartWorksRecipeMaps.acidGenFuels);
+ }
+
+ @SuppressWarnings("deprecation")
+ public static void run() {
+ runBWRecipes();
+ GT_Values.RA.addImplosionRecipe(
+ WerkstoffLoader.RawAdemicSteel.get(dust),
+ 4,
+ WerkstoffLoader.AdemicSteel.get(dust),
+ null);
+ // Thorium/Yttrium Glas
+ GT_Values.RA.addBlastRecipe(
+ WerkstoffLoader.YttriumOxide.get(dustSmall, 2),
+ WerkstoffLoader.Thorianit.get(dustSmall, 2),
+ Materials.Glass.getMolten(144),
+ null,
+ new ItemStack(ItemRegistry.bw_glasses[0], 1, 12),
+ null,
+ 800,
+ (int) TierEU.RECIPE_IV,
+ 3663);
+ // Thorianite recipes
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.Thorianit.get(crushedPurified))
+ .itemOutputs(
+ WerkstoffLoader.Thorianit.get(dust),
+ WerkstoffLoader.Thorianit.get(dust),
+ WerkstoffLoader.Thorianit.get(dust),
+ Materials.Thorium.getDust(1),
+ Materials.Thorium.getDust(1),
+ WerkstoffLoader.Thorium232.get(dust))
+ .outputChances(7000, 1300, 700, 600, 300, 100)
+ .duration(20 * SECONDS)
+ .eut((int) TierEU.RECIPE_IV)
+ .addTo(sifterRecipes);
+
+ // 3ThO2 + 4Al = 3Th + 2Al2O3
+ GT_Values.RA.addChemicalRecipe(
+ WerkstoffLoader.Thorianit.get(dust, 9),
+ Materials.Aluminium.getDust(4),
+ null,
+ null,
+ Materials.Thorium.getDust(3),
+ Materials.Aluminiumoxide.getDust(10),
+ 1000);
+ // ThO2 + 2Mg = Th + 2MgO
+ GT_Values.RA.addChemicalRecipe(
+ WerkstoffLoader.Thorianit.get(dust, 3),
+ Materials.Magnesium.getDust(2),
+ null,
+ null,
+ Materials.Thorium.getDust(1),
+ Materials.Magnesia.getDust(4),
+ 1000);
+ GT_Values.RA.addChemicalRecipe(
+ WerkstoffLoader.Thorianit.get(crushed),
+ ItemList.Crop_Drop_Thorium.get(9),
+ Materials.Water.getFluid(1000),
+ Materials.Thorium.getMolten(144),
+ WerkstoffLoader.Thorianit.get(crushedPurified, 4),
+ 96,
+ 24);
+
+ // Prasiolite
+ GT_Values.RA.addBlastRecipe(
+ GT_OreDictUnificator.get(dust, Materials.Quartzite, 40L),
+ Materials.Amethyst.getDust(10),
+ GT_Values.NF,
+ GT_Values.NF,
+ WerkstoffLoader.Prasiolite.get(OrePrefixes.gemFlawed, 20),
+ GT_Values.NI,
+ 800,
+ (int) TierEU.RECIPE_MV,
+ 500);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_OreDictUnificator.get(dust, Materials.Quartzite, 40L))
+ .itemOutputs(Materials.Amethyst.getDust(10))
+ .duration(40 * SECONDS)
+ .eut(0)
+ .metadata(ADDITIVE_AMOUNT, 6)
+ .addTo(primitiveBlastRecipes);
+
+ // Cubic Circonia
+ // 2Y + 3O = Y2O3
+ GT_Values.RA.addChemicalRecipe(
+ Materials.Yttrium.getDust(2),
+ GT_Utility.getIntegratedCircuit(5),
+ Materials.Oxygen.getGas(3000),
+ GT_Values.NF,
+ WerkstoffLoader.YttriumOxide.get(dust, 5),
+ 4096,
+ (int) TierEU.RECIPE_LV);
+ // Zr + 2O =Y22O3= ZrO2
+ RecipeMaps.blastFurnaceRecipes.addRecipe(
+ false,
+ new ItemStack[] { WerkstoffLoader.Zirconium.get(dust, 10), WerkstoffLoader.YttriumOxide.get(dust, 0) },
+ new ItemStack[] { WerkstoffLoader.CubicZirconia.get(gemFlawed, 40) },
+ null,
+ null,
+ new FluidStack[] { Materials.Oxygen.getGas(20000) },
+ null,
+ 57600,
+ (int) TierEU.RECIPE_HV,
+ 2953);
+ // Tellurium
+ GT_Values.RA.addBlastRecipe(
+ GT_OreDictUnificator.get(crushed, Materials.Lead, 10L),
+ GT_Utility.getIntegratedCircuit(17),
+ GT_Values.NF,
+ GT_Values.NF,
+ Materials.Lead.getIngots(10),
+ Materials.Tellurium.getNuggets(20),
+ 800,
+ (int) TierEU.RECIPE_MV,
+ 722);
+ GT_Values.RA.addFusionReactorRecipe(
+ Materials.Plutonium.getMolten(48),
+ Materials.Beryllium.getMolten(48),
+ WerkstoffLoader.Californium.getMolten(48),
+ 240,
+ 49152,
+ 480000000);
+ GT_Values.RA.addFusionReactorRecipe(
+ WerkstoffLoader.Californium.getMolten(32),
+ WerkstoffLoader.Calcium.getMolten(720),
+ WerkstoffLoader.Oganesson.getFluidOrGas(720),
+ 420,
+ 49152,
+ 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) },
+ null,
+ 7500,
+ (int) TierEU.RECIPE_EV);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.MagnetoResonaticDust.get(dust))
+ .itemOutputs(WerkstoffLoader.MagnetoResonaticDust.get(gemChipped, 9))
+ .outputChances(90_00)
+ .fluidInputs(WerkstoffLoader.Neon.getFluidOrGas(1000))
+ .duration(3 * MINUTES + 45 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(autoclaveRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(WerkstoffLoader.MagnetoResonaticDust.get(dust))
+ .itemOutputs(WerkstoffLoader.MagnetoResonaticDust.get(gem))
+ .fluidInputs(WerkstoffLoader.Krypton.getFluidOrGas(1000))
+ .duration(3 * MINUTES + 45 * SECONDS)
+ .eut(TierEU.RECIPE_IV)
+ .addTo(autoclaveRecipes);
+
+ // Milk
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(
+ Materials.Sugar.getDustSmall(21),
+ Materials.Calcium.getDustTiny(1),
+ Materials.Magnesium.getDustTiny(1),
+ Materials.Potassium.getDustTiny(1),
+ Materials.Sodium.getDustTiny(4),
+ Materials.Phosphor.getDustTiny(1))
+ .outputChances(100_00, 100_00, 10_00, 100_00, 10_00, 10_00)
+ .fluidInputs(Materials.Milk.getFluid(10000))
+ .fluidOutputs(Materials.Water.getFluid(8832))
+ .duration(2 * SECONDS + 10 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(centrifugeRecipes);
+
+ // Magneto Resonatic Circuits
+
+ Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
+ ? FluidRegistry.getFluid("molten.indalloy140")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+
+ Fluid solderUEV = FluidRegistry.getFluid("molten.mutatedlivingsolder") != null
+ ? FluidRegistry.getFluid("molten.mutatedlivingsolder")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+ // ULV
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ 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,
+ (int) TierEU.RECIPE_LV,
+ CLEANROOM));
+ // LV-EV
+ for (int i = 1; i <= 4; i++) {
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ 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));
+ }
+ // IV-LuV
+ for (int i = 5; i <= 6; i++) {
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(3), WerkstoffLoader.MagnetoResonaticDust.get(gem),
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(i + 3),
+ ItemList.Circuit_Parts_DiodeASMD.get((i + 1) * 4),
+ ItemList.Circuit_Parts_CapacitorASMD.get((i + 1) * 4),
+ ItemList.Circuit_Parts_TransistorASMD.get((i + 1) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(i + 4) },
+ null,
+ null,
+ new FluidStack[] { new FluidStack(solderIndalloy, (i + 1) * 36) },
+ null,
+ (i + 1) * 750,
+ BW_Util.getMachineVoltageFromTier(i + 1),
+ CLEANROOM));
+ }
+ // ZPM
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(3), WerkstoffLoader.MagnetoResonaticDust.get(gemExquisite, 1),
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(7 + 3),
+ ItemList.Circuit_Parts_DiodeASMD.get((7 + 6) * 4),
+ ItemList.Circuit_Parts_CapacitorASMD.get((7 + 6) * 4),
+ ItemList.Circuit_Parts_TransistorASMD.get((7 + 6) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(7 + 4) },
+ null,
+ null,
+ new FluidStack[] { new FluidStack(solderIndalloy, (7 + 1) * 36) },
+ null,
+ (7 + 1) * 1500,
+ BW_Util.getMachineVoltageFromTier(7 + 1),
+ CLEANROOM));
+ // UV
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(3), WerkstoffLoader.MagnetoResonaticDust.get(gemExquisite, 1),
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(8 + 3),
+ ItemList.Circuit_Parts_DiodeASMD.get((8 + 6) * 4),
+ ItemList.Circuit_Parts_CapacitorASMD.get((8 + 6) * 4),
+ ItemList.Circuit_Parts_TransistorASMD.get((8 + 6) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(8 + 4) },
+ null,
+ null,
+ new FluidStack[] { new FluidStack(solderUEV, (8 + 1) * 36) },
+ null,
+ (8 + 1) * 1500,
+ BW_Util.getMachineVoltageFromTier(8 + 1),
+ CLEANROOM));
+ // UHV-UEV
+ for (int i = 9; i <= 10; i++) {
+ RecipeMaps.circuitAssemblerRecipes.add(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(3), WerkstoffLoader.MagnetoResonaticDust.get(gemExquisite, 1),
+ BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(i + 3),
+ ItemList.Circuit_Parts_DiodeXSMD.get((i + 6) * 4),
+ ItemList.Circuit_Parts_CapacitorXSMD.get((i + 6) * 4),
+ ItemList.Circuit_Parts_TransistorXSMD.get((i + 6) * 4) },
+ new ItemStack[] { BW_Meta_Items.getNEWCIRCUITS()
+ .getStack(i + 4) },
+ null,
+ null,
+ new FluidStack[] { new FluidStack(solderUEV, (i + 1) * 36) },
+ null,
+ (i + 1) * 1500,
+ BW_Util.getMachineVoltageFromTier(i + 1),
+ CLEANROOM));
+ }
+ RecipeMaps.smallNaquadahReactorFuels.addRecipe(
+ true,
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(bolt) },
+ new ItemStack[] {},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ 12500);
+ RecipeMaps.largeNaquadahReactorFuels.addRecipe(
+ true,
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stick) },
+ new ItemStack[] {},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ 62500);
+
+ RecipeMaps.hugeNaquadahReactorFuels.addRecipe(
+ true,
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stickLong) },
+ new ItemStack[] {},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ 125000);
+ RecipeMaps.extremeNaquadahReactorFuels.addRecipe(
+ true,
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stick) },
+ new ItemStack[] {},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ 31250);
+ RecipeMaps.ultraHugeNaquadahReactorFuels.addRecipe(
+ true,
+ new ItemStack[] { WerkstoffLoader.Tiberium.get(stickLong) },
+ new ItemStack[] {},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ 125000);
+
+ LoadItemContainers.run();
+
+ GT_Values.RA.addCannerRecipe(
+ ItemList.Large_Fluid_Cell_TungstenSteel.get(1L),
+ WerkstoffLoader.Tiberium.get(dust, 3),
+ BW_NonMeta_MaterialItems.TiberiumCell_1.get(1L),
+ null,
+ 30,
+ 16);
+ GT_Values.RA.addAssemblerRecipe(
+ BW_NonMeta_MaterialItems.TiberiumCell_1.get(2L),
+ GT_OreDictUnificator.get(stick, Materials.TungstenSteel, 4L),
+ BW_NonMeta_MaterialItems.TiberiumCell_2.get(1L),
+ 100,
+ 400);
+ GT_Values.RA.addAssemblerRecipe(
+ BW_NonMeta_MaterialItems.TiberiumCell_1.get(4L),
+ GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 6L),
+ BW_NonMeta_MaterialItems.TiberiumCell_4.get(1L),
+ 150,
+ 400);
+ GT_Values.RA.addAssemblerRecipe(
+ BW_NonMeta_MaterialItems.TiberiumCell_2.get(2L),
+ GT_OreDictUnificator.get(stick, Materials.TungstenSteel, 4L),
+ BW_NonMeta_MaterialItems.TiberiumCell_4.get(1L),
+ 100,
+ 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) },
+ null,
+ BW_NonMeta_MaterialItems.TheCoreCell.get(1L),
+ 100,
+ (int) TierEU.RECIPE_LuV);
+
+ GregTech_API.sAfterGTPostload.add(new AddSomeRecipes());
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java
new file mode 100644
index 0000000000..f07faa79a8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/DownTierLoader.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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.recipe.RecipeMap;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_Recipe;
+
+public class DownTierLoader {
+
+ public static void run() {
+ RecipeMap.ALL_RECIPE_MAPS.values()
+ .stream()
+ .filter(map -> StreamUtils.filterVisualMaps(map) && map != RecipeMaps.fusionRecipes)
+ .forEach(map -> {
+ Set<GT_Recipe> newRecipes = new HashSet<>();
+ Set<GT_Recipe> toRem = new HashSet<>();
+ map.getAllRecipes()
+ .stream()
+ .filter(recipe -> Objects.nonNull(recipe) && recipe.mEUt > 128)
+ .forEach(recipe -> {
+ toRem.add(recipe);
+ newRecipes.add(BW_Util.copyAndSetTierToNewRecipe(recipe, (byte) 2));
+ });
+ map.getBackend()
+ .removeRecipes(toRem);
+ newRecipes.forEach(map::add);
+ });
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java
new file mode 100644
index 0000000000..67de5d5f5b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java
@@ -0,0 +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.
+ */
+
+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));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java
new file mode 100644
index 0000000000..d409084406
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java
@@ -0,0 +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.
+ */
+
+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/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java
new file mode 100644
index 0000000000..a61bc55d59
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.Thaumcraft;
+
+import java.util.Objects;
+
+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.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;
+
+public class AspectLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (!Thaumcraft.isModLoaded()) {
+ return;
+ }
+
+ 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);
+ if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes)))
+ ThaumcraftHandler.AspectAdder.addAspectViaBW(
+ werkstoff.get(enabledOrePrefixes),
+ werkstoff.getTCAspects(
+ enabledOrePrefixes == OrePrefixes.ore ? 1
+ : (int) (enabledOrePrefixes.mMaterialAmount / 3628800L)));
+ } else if (enabledOrePrefixes.mMaterialAmount >= 0L
+ && Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes)))
+ ThaumcraftHandler.AspectAdder
+ .addAspectViaBW(werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1));
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java
new file mode 100644
index 0000000000..1262ab2499
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.block;
+import static gregtech.api.enums.OrePrefixes.cellMolten;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.recipe.RecipeMaps.cutterRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidExtractionRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.UniversalArcFurnace;
+
+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.TierEU;
+import gregtech.api.recipe.RecipeCategories;
+import gregtech.api.util.GT_RecipeConstants;
+
+public class BlockLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (!werkstoff.hasItemType(block)) return;
+ if (werkstoff.hasItemType(ingot)) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(block))
+ .itemOutputs(werkstoff.get(ingot, 9))
+ .duration(16 * TICKS)
+ .eut(90)
+ .metadata(GT_RecipeConstants.RECYCLE, true)
+ .addTo(UniversalArcFurnace);
+ }
+ if (werkstoff.hasItemType(cellMolten)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(block))
+ .fluidOutputs(werkstoff.getMolten(1296))
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .duration(14 * SECONDS + 8 * TICKS)
+ .eut(8)
+ .addTo(fluidExtractionRecipes);
+
+ }
+ if (werkstoff.hasItemType(plate)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(block))
+ .itemOutputs(werkstoff.get(plate, 9))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 10L,
+ 1L))
+ .eut(TierEU.RECIPE_LV)
+ .addTo(cutterRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java
new file mode 100644
index 0000000000..9ec4030943
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.blockCasing;
+import static gregtech.api.enums.OrePrefixes.blockCasingAdvanced;
+import static gregtech.api.enums.OrePrefixes.gearGt;
+import static gregtech.api.enums.OrePrefixes.gearGtSmall;
+import static gregtech.api.enums.OrePrefixes.plank;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.plateDouble;
+import static gregtech.api.enums.OrePrefixes.screw;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+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.enums.TierEU;
+import gregtech.api.util.GT_ModHandler;
+
+public class CasingLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff == BW_GT_MaterialReference.Wood /* || werkstoff == BW_GT_MaterialReference.WoodSealed */) {
+ addCasingRecipes(werkstoff, plank);
+ } else {
+ if (!werkstoff.hasGenerationFeature(blockCasing) || !werkstoff.doesOreDictedItemExists(plate)
+ || !werkstoff.doesOreDictedItemExists(screw)
+ || !werkstoff.doesOreDictedItemExists(gearGtSmall)
+ || !werkstoff.doesOreDictedItemExists(gearGt)
+ || !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_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate, 6), werkstoff.get(screw, 2), werkstoff.get(gearGtSmall))
+ .itemOutputs(werkstoff.get(blockCasing))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(assemblerRecipes);
+
+ 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.stdBuilder()
+ .itemInputs(werkstoff.get(reboltedCasingsOuterStuff, 6), werkstoff.get(screw, 2), werkstoff.get(gearGt))
+ .itemOutputs(werkstoff.get(blockCasingAdvanced))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(assemblerRecipes);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
new file mode 100644
index 0000000000..2b86f46149
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java
@@ -0,0 +1,332 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.Forestry;
+import static gregtech.api.enums.OrePrefixes.capsule;
+import static gregtech.api.enums.OrePrefixes.cell;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.recipe.RecipeMaps.fluidCannerRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidExtractionRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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.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.Pair;
+
+import gregtech.api.enums.Element;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TextureSet;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.recipe.RecipeCategories;
+import gregtech.api.recipe.RecipeMaps;
+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 gregtech.common.items.behaviors.Behaviour_DataOrb;
+
+public class CellLoader implements IWerkstoffRunnable {
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void run(Werkstoff werkstoff) {
+ if (!werkstoff.hasItemType(cell)) return;
+
+ if ((werkstoff.getStats()
+ .isElektrolysis()
+ || werkstoff.getStats()
+ .isCentrifuge())
+ && !werkstoff.hasItemType(dust)) {
+ List<FluidStack> flOutputs = new ArrayList<>();
+ 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])) {
+ if (container.getKey() instanceof Materials) {
+ if ((((Materials) container.getKey()).hasCorrespondingGas()
+ || ((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) {
+ tmpFl = ((Materials) container.getKey()).getFluid(1000L * container.getValue());
+ }
+ flOutputs.add(tmpFl);
+ if (flOutputs.size() > 1) {
+ if (!tracker.containsKey(container.getKey())) {
+ 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(
+ tracker.get(container.getKey())
+ .getKey() + container.getValue()));
+ stOutputs.remove(
+ tracker.get(container.getKey())
+ .getValue() + 1);
+ }
+ cells += container.getValue();
+ }
+ } else {
+ if (((Materials) container.getKey()).getDust(container.getValue()) == null) continue;
+ if (!tracker.containsKey(container.getKey())) {
+ 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.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());
+ if (tmpFl == null || tmpFl.getFluid() == null) {
+ tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue());
+ }
+ flOutputs.add(tmpFl);
+ if (flOutputs.size() > 1) {
+ 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));
+ } else {
+ stOutputs.add(
+ ((Werkstoff) container.getKey()).get(
+ cell,
+ tracker.get(container.getKey())
+ .getKey() + container.getValue()));
+ stOutputs.remove(
+ tracker.get(container.getKey())
+ .getValue() + 1);
+ }
+ cells += container.getValue();
+ }
+ } else {
+ if (!((Werkstoff) container.getKey()).hasItemType(dust)) continue;
+ if (!tracker.containsKey(container.getKey())) {
+ 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.remove(
+ tracker.get(container.getKey())
+ .getValue() + 1);
+ }
+ }
+ }
+ }
+ ItemStack input = werkstoff.get(cell);
+ input.stackSize = 1;
+
+ int cellEmpty = cells - 1;
+
+ stOutputs.add(Materials.Empty.getCells(-cellEmpty));
+ if (werkstoff.getStats()
+ .isElektrolysis())
+ RecipeMaps.electrolyzerRecipes.add(
+ new GT_Recipe(
+ 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())
+ RecipeMaps.centrifugeRecipes.add(
+ new GT_Recipe(
+ 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)));
+ FluidContainerRegistry.registerFluidContainer(
+ werkstoff.getFluidOrGas(1)
+ .getFluid(),
+ werkstoff.get(cell),
+ Materials.Empty.getCells(1));
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Empty.getCells(1))
+ .itemOutputs(werkstoff.get(cell))
+ .fluidInputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000))
+ .duration(16 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(cell))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidOutputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000))
+ .duration(16 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ if (Forestry.isModLoaded()) {
+ FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
+ new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000),
+ werkstoff.get(capsule),
+ GT_ModHandler.getModItem(Forestry.ID, "waxCapsule", 1),
+ true);
+ GT_Utility.addFluidContainerData(emptyData);
+ FluidContainerRegistry.registerFluidContainer(emptyData);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(capsule))
+ .fluidOutputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000))
+ .duration(16 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+ }
+
+ if (werkstoff.hasItemType(dust)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust))
+ .fluidOutputs(werkstoff.getFluidOrGas(1000))
+ .duration(
+ werkstoff.getStats()
+ .getMass())
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(werkstoff.get(dust))
+ .fluidInputs(werkstoff.getFluidOrGas(1000))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass())
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ }
+
+ if (Werkstoff.Types.ELEMENT.equals(werkstoff.getType())) {
+ Materials werkstoffBridgeMaterial = null;
+ boolean ElementSet = false;
+ for (Element e : Element.values()) {
+ if (e.toString()
+ .equals(werkstoff.getToolTip())) {
+ werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial()
+ : new Materials(
+ -1,
+ werkstoff.getTexSet(),
+ 0,
+ 0,
+ 0,
+ false,
+ werkstoff.getDefaultName(),
+ werkstoff.getDefaultName());
+ werkstoffBridgeMaterial.mElement = e;
+ e.mLinkedMaterials.add(werkstoffBridgeMaterial);
+ ElementSet = true;
+ werkstoff.setBridgeMaterial(werkstoffBridgeMaterial);
+ break;
+ }
+ }
+ if (!ElementSet) return;
+
+ GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false);
+
+ ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan");
+ Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip());
+ RecipeMaps.scannerFakeRecipes.addFakeRecipe(
+ false,
+ new GT_Recipe(
+ false,
+ new ItemStack[] { werkstoff.get(cell) },
+ new ItemStack[] { scannerOutput },
+ ItemList.Tool_DataOrb.get(1L),
+ null,
+ null,
+ null,
+ (int) (werkstoffBridgeMaterial.getMass() * 8192L),
+ 30,
+ 0));
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java
new file mode 100644
index 0000000000..91fe34e89f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.bolt;
+import static gregtech.api.enums.OrePrefixes.cellMolten;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.gearGt;
+import static gregtech.api.enums.OrePrefixes.gearGtSmall;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.ring;
+import static gregtech.api.enums.OrePrefixes.rotor;
+import static gregtech.api.enums.OrePrefixes.screw;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.wireFine;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.recipe.RecipeMaps.cutterRecipes;
+import static gregtech.api.recipe.RecipeMaps.extruderRecipes;
+import static gregtech.api.recipe.RecipeMaps.latheRecipes;
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.recipe.RecipeMaps.wiremillRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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;
+
+public class CraftingMaterialLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(screw)) {
+ int tVoltageMultiplier = werkstoff.getStats()
+ .getMeltingPoint() >= 2800 ? 60 : 15;
+
+ // bolt
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(ingot),
+ ItemList.Shape_Extruder_Bolt.get(0L))
+ .itemOutputs(werkstoff.get(bolt, 8))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1))
+ .eut(8 * tVoltageMultiplier)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick))
+ .itemOutputs(werkstoff.get(bolt, 4))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1L))
+ .eut(4)
+ .addTo(cutterRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(bolt))
+ .itemOutputs(werkstoff.get(dustTiny, 1))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ // screw
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(bolt))
+ .itemOutputs(werkstoff.get(screw))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 8L,
+ 1L))
+ .eut(4)
+ .addTo(latheRecipes);
+
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(screw),
+ GT_Proxy.tBits,
+ new Object[] { "fX", "X ", 'X', werkstoff.get(bolt) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(screw))
+ .itemOutputs(werkstoff.get(dustTiny, 1))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ if (werkstoff.hasItemType(gem)) return;
+
+ // ring
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L))
+ .itemOutputs(werkstoff.get(ring, 4))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1))
+ .eut(6 * tVoltageMultiplier)
+ .addTo(extruderRecipes);
+
+ GT_ModHandler.addCraftingRecipe(
+ 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_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 4), ItemList.Shape_Extruder_Gear.get(0L))
+ .itemOutputs(werkstoff.get(gearGt))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 5L,
+ 1))
+ .eut(8 * tVoltageMultiplier)
+ .addTo(extruderRecipes);
+ // wireFine
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), ItemList.Shape_Extruder_Wire.get(0L))
+ .itemOutputs(werkstoff.get(wireFine, 8))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 1.5F,
+ 1F))
+ .eut(8 * tVoltageMultiplier)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(3))
+ .itemOutputs(werkstoff.get(wireFine, 8))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1))
+ .eut(8 * tVoltageMultiplier)
+ .addTo(wiremillRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick), GT_Utility.getIntegratedCircuit(3))
+ .itemOutputs(werkstoff.get(wireFine, 4))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 0.5F,
+ 1F))
+ .eut(8 * tVoltageMultiplier)
+ .addTo(wiremillRecipes);
+
+ // smallGear
+ if (WerkstoffLoader.smallGearShape != null) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), WerkstoffLoader.smallGearShape.get(0L))
+ .itemOutputs(werkstoff.get(gearGtSmall))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass())
+ .eut(8 * tVoltageMultiplier)
+ .addTo(extruderRecipes);
+
+ }
+
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(gearGtSmall),
+ GT_Proxy.tBits,
+ new Object[] { " S ", "hPx", " S ", 'S', werkstoff.get(stick), '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_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate, 4), werkstoff.get(ring))
+ .itemOutputs(werkstoff.get(rotor))
+ .fluidInputs(Materials.Tin.getMolten(32))
+ .duration(12 * SECONDS)
+ .eut(24)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate, 4), werkstoff.get(ring))
+ .itemOutputs(werkstoff.get(rotor))
+ .fluidInputs(Materials.Lead.getMolten(48))
+ .duration(12 * SECONDS)
+ .eut(24)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate, 4), werkstoff.get(ring))
+ .itemOutputs(werkstoff.get(rotor))
+ .fluidInputs(Materials.SolderingAlloy.getMolten(16))
+ .duration(12 * SECONDS)
+ .eut(24)
+ .addTo(assemblerRecipes);
+
+ if (WerkstoffLoader.rotorShape != null) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L))
+ .itemOutputs(werkstoff.get(rotor))
+ .duration(10 * SECONDS)
+ .eut(60)
+ .addTo(extruderRecipes);
+
+ }
+
+ // molten -> metal
+ if (werkstoff.hasItemType(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);
+ */
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gearGt))
+ .itemOutputs(werkstoff.get(dust, 4))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gearGtSmall))
+ .itemOutputs(werkstoff.get(dust, 1))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(rotor))
+ .itemOutputs(werkstoff.get(dust, 4), werkstoff.get(dustSmall))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ring))
+ .itemOutputs(werkstoff.get(dustSmall, 1))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java
new file mode 100644
index 0000000000..b33d0ddd20
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.crushed;
+import static gregtech.api.enums.OrePrefixes.crushedCentrifuged;
+import static gregtech.api.enums.OrePrefixes.crushedPurified;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustImpure;
+import static gregtech.api.enums.OrePrefixes.dustPure;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.nugget;
+import static gregtech.api.enums.OrePrefixes.ore;
+import static gregtech.api.recipe.RecipeMaps.autoclaveRecipes;
+import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes;
+import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
+import static gregtech.api.recipe.RecipeMaps.electroMagneticSeparatorRecipes;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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;
+import gregtech.api.enums.SubTag;
+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;
+
+ if (werkstoff.hasItemType(ingot) && !werkstoff.getStats()
+ .isBlastFurnace()) {
+ if (Werkstoff.Types.ELEMENT.equals(werkstoff.getType())) {
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(nugget, 10));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(nugget, 10));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(nugget, 10));
+ } else {
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(ingot));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(ingot));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(ingot));
+ }
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustImpure), werkstoff.get(ingot));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustPure), werkstoff.get(ingot));
+ GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot));
+ }
+
+ GT_ModHandler
+ .addCraftingRecipe(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) });
+ GT_ModHandler.addCraftingRecipe(
+ werkstoff.get(dust),
+ new Object[] { "h ", "W ", 'W', werkstoff.get(crushedCentrifuged) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushed))
+ .itemOutputs(werkstoff.get(dustImpure))
+ .duration(10 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_ModHandler.addPulverisationRecipe(
+ werkstoff.get(crushed),
+ werkstoff.get(dustImpure),
+ werkstoff.getOreByProduct(0, dust),
+ 10,
+ false);
+ GT_ModHandler.addOreWasherRecipe(
+ werkstoff.get(crushed),
+ 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 },
+ (int) Math.min(
+ 5000L,
+ Math.abs(
+ werkstoff.getStats()
+ .getProtons() * 20L)),
+ werkstoff.get(crushedCentrifuged),
+ werkstoff.getOreByProduct(1, dust),
+ GT_OreDictUnificator.get(dust, Materials.Stone, 1L));
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushedPurified))
+ .itemOutputs(werkstoff.get(dustPure))
+ .duration(10 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_ModHandler.addPulverisationRecipe(
+ werkstoff.get(crushedPurified),
+ werkstoff.get(dustPure),
+ werkstoff.getOreByProduct(1, dust),
+ 10,
+ false);
+ GT_ModHandler.addThermalCentrifugeRecipe(
+ werkstoff.get(crushedPurified),
+ new int[] { 10000, 1111 },
+ (int) Math.min(
+ 5000L,
+ Math.abs(
+ werkstoff.getStats()
+ .getProtons() * 20L)),
+ werkstoff.get(crushedCentrifuged),
+ werkstoff.getOreByProduct(1, dust));
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushedCentrifuged))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(10 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_ModHandler.addPulverisationRecipe(
+ werkstoff.get(crushedCentrifuged),
+ werkstoff.get(dust),
+ werkstoff.getOreByProduct(2, dust),
+ 10,
+ false);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustImpure))
+ .itemOutputs(werkstoff.get(dust), werkstoff.getOreByProduct(0, dust))
+ .outputChances(100_00, 11_11)
+ .duration(
+ Math.max(
+ 1L,
+ werkstoff.getStats()
+ .getMass() * 8L))
+ .eut(5)
+ .addTo(centrifugeRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(werkstoff.get(dust), werkstoff.getOreByProduct(1, dust))
+ .outputChances(100_00, 11_11)
+ .duration(
+ Math.max(
+ 1L,
+ werkstoff.getStats()
+ .getMass() * 8L))
+ .eut(5)
+ .addTo(centrifugeRecipes);
+
+ if (werkstoff.contains(SubTag.CRYSTALLISABLE)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(werkstoff.get(gem))
+ .outputChances(9000)
+ .fluidInputs(Materials.Water.getFluid(200L))
+ .duration(1 * MINUTES + 40 * SECONDS)
+ .eut(24)
+ .addTo(autoclaveRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustImpure))
+ .itemOutputs(werkstoff.get(gem))
+ .outputChances(9000)
+ .fluidInputs(Materials.Water.getFluid(200L))
+ .duration(1 * MINUTES + 40 * SECONDS)
+ .eut(24)
+ .addTo(autoclaveRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(werkstoff.get(gem))
+ .outputChances(9500)
+ .fluidInputs(gregtech.api.util.GT_ModHandler.getDistilledWater(200L))
+ .duration(1 * MINUTES + 15 * SECONDS)
+ .eut(24)
+ .addTo(autoclaveRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustImpure))
+ .itemOutputs(werkstoff.get(gem))
+ .outputChances(9500)
+ .fluidInputs(gregtech.api.util.GT_ModHandler.getDistilledWater(200L))
+ .duration(1 * MINUTES + 15 * SECONDS)
+ .eut(24)
+ .addTo(autoclaveRecipes);
+
+ }
+ if (werkstoff.contains(SubTag.WASHING_MERCURY)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushed))
+ .itemOutputs(
+ werkstoff.get(crushedPurified),
+ werkstoff.getOreByProduct(1, dust),
+ GT_OreDictUnificator.get(dust, Materials.Stone, 1L))
+ .outputChances(10000, 7000, 4000)
+ .fluidInputs(Materials.Mercury.getFluid(1000L))
+ .duration(40 * SECONDS)
+ .eut(8)
+ .addTo(chemicalBathRecipes);
+
+ }
+ if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushed))
+ .itemOutputs(
+ werkstoff.get(crushedPurified),
+ werkstoff.getOreByProduct(1, dust),
+ GT_OreDictUnificator.get(dust, Materials.Stone, 1L))
+ .outputChances(10000, 7000, 4000)
+ .fluidInputs(
+ Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L))
+ .duration(40 * SECONDS)
+ .eut(8)
+ .addTo(chemicalBathRecipes);
+
+ }
+ if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(
+ werkstoff.get(dust),
+ GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L),
+ GT_OreDictUnificator.get(nugget, Materials.Gold, 1L))
+ .outputChances(10000, 4000, 2000)
+ .duration(20 * SECONDS)
+ .eut(24)
+ .addTo(electroMagneticSeparatorRecipes);
+
+ } else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(
+ werkstoff.get(dust),
+ GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L),
+ GT_OreDictUnificator.get(nugget, Materials.Iron, 1L))
+ .outputChances(10000, 4000, 2000)
+ .duration(20 * SECONDS)
+ .eut(24)
+ .addTo(electroMagneticSeparatorRecipes);
+
+ } else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustPure))
+ .itemOutputs(
+ werkstoff.get(dust),
+ GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L),
+ GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L))
+ .outputChances(10000, 4000, 2000)
+ .duration(20 * SECONDS)
+ .eut(24)
+ .addTo(electroMagneticSeparatorRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
new file mode 100644
index 0000000000..088c4bb55b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java
@@ -0,0 +1,529 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.block;
+import static gregtech.api.enums.OrePrefixes.cell;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.ingotHot;
+import static gregtech.api.enums.OrePrefixes.nugget;
+import static gregtech.api.recipe.RecipeMaps.blastFurnaceRecipes;
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.recipe.RecipeMaps.packagerRecipes;
+import static gregtech.api.recipe.RecipeMaps.primitiveBlastRecipes;
+import static gregtech.api.recipe.RecipeMaps.vacuumFreezerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeConstants.ADDITIVE_AMOUNT;
+import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT;
+
+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.Pair;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TextureSet;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_RecipeConstants;
+import gregtech.api.util.GT_Utility;
+
+public class DustLoader implements IWerkstoffRunnable {
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(dust)) {
+ List<FluidStack> flOutputs = new ArrayList<>();
+ List<ItemStack> stOutputs = new ArrayList<>();
+ HashMap<ISubTagContainer, Pair<Integer, Integer>> tracker = new HashMap<>();
+ int cells = 0;
+
+ 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])) {
+ final ISubTagContainer key = container.getKey();
+ final int value = container.getValue();
+ if (key instanceof Materials materialKey) {
+ if ((materialKey.getGas(0) != null || materialKey.getFluid(0) != null
+ || materialKey.mIconSet == TextureSet.SET_FLUID) && materialKey.getDust(0) == null) {
+ FluidStack tmpFl = materialKey.getGas(1000L * value);
+ if (tmpFl == null || tmpFl.getFluid() == null) {
+ tmpFl = materialKey.getFluid(1000L * value);
+ }
+ flOutputs.add(tmpFl);
+ if (flOutputs.size() > 1) {
+ if (!tracker.containsKey(key)) {
+ stOutputs.add(materialKey.getCells(value));
+ tracker.put(key, new Pair<>(value, stOutputs.size() - 1));
+ } else {
+ stOutputs.add(
+ materialKey.getCells(
+ tracker.get(key)
+ .getKey() + value));
+ stOutputs.remove(
+ tracker.get(key)
+ .getValue() + 1);
+ }
+ cells += value;
+ }
+ } else {
+ if (materialKey.getDust(value) == null) {
+ if (materialKey.getCells(value) == null
+ || materialKey.getMolten(0) == null && materialKey.getSolid(0) == null) continue;
+ FluidStack tmpFl = materialKey.getMolten(1000L * value);
+ if (tmpFl == null || tmpFl.getFluid() == null) {
+ tmpFl = materialKey.getSolid(1000L * value);
+ }
+ flOutputs.add(tmpFl);
+ if (flOutputs.size() > 1) {
+ if (!tracker.containsKey(key)) {
+ stOutputs.add(materialKey.getCells(value));
+ tracker.put(key, new Pair<>(value, stOutputs.size() - 1));
+ } else {
+ stOutputs.add(
+ materialKey.getCells(
+ tracker.get(key)
+ .getKey() + value));
+ stOutputs.remove(
+ tracker.get(key)
+ .getValue() + 1);
+ }
+ cells += value;
+ }
+ }
+ if (!tracker.containsKey(key)) {
+ stOutputs.add(materialKey.getDust(value));
+ tracker.put(key, new Pair<>(value, stOutputs.size() - 1));
+ } else {
+ stOutputs.add(
+ materialKey.getDust(
+ tracker.get(key)
+ .getKey() + value));
+ stOutputs.remove(
+ tracker.get(key)
+ .getValue() + 1);
+ }
+ }
+ } else if (key instanceof Werkstoff werkstoffKey) {
+ if (werkstoffKey.getStats()
+ .isGas() || werkstoffKey.hasItemType(cell)) {
+ FluidStack tmpFl = werkstoffKey.getFluidOrGas(1000 * value);
+ if (tmpFl == null || tmpFl.getFluid() == null) {
+ tmpFl = werkstoffKey.getFluidOrGas(1000 * value);
+ }
+ flOutputs.add(tmpFl);
+ if (flOutputs.size() > 1) {
+ if (!tracker.containsKey(key)) {
+ stOutputs.add(werkstoffKey.get(cell, value));
+ tracker.put(key, new Pair<>(value, stOutputs.size() - 1));
+ } else {
+ stOutputs.add(
+ werkstoffKey.get(
+ cell,
+ tracker.get(key)
+ .getKey() + value));
+ stOutputs.remove(
+ tracker.get(key)
+ .getValue() + 1);
+ }
+ cells += value;
+ }
+ } else {
+ if (!werkstoffKey.hasItemType(dust)) continue;
+ if (!tracker.containsKey(key)) {
+ stOutputs.add(werkstoffKey.get(dust, value));
+ tracker.put(key, new Pair<>(value, stOutputs.size() - 1));
+ } else {
+ stOutputs.add(
+ werkstoffKey.get(
+ dust,
+ tracker.get(key)
+ .getKey() + value));
+ stOutputs.remove(
+ tracker.get(key)
+ .getValue() + 1);
+ }
+ }
+ }
+ }
+ ItemStack input = werkstoff.get(dust);
+ input.stackSize = werkstoff.getContents()
+ .getKey();
+ if (werkstoff.getStats()
+ .isElektrolysis()) {
+ GT_Recipe tRecipe = new GT_Recipe(
+ 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()
+ .getProtons()
+ / werkstoff.getContents()
+ .getValue()
+ .size())),
+ Math.min(
+ 4,
+ werkstoff.getContents()
+ .getValue()
+ .size())
+ * 30,
+ 0);
+ RecipeMaps.electrolyzerRecipes.add(tRecipe);
+ RecipeMaps.electrolyzerNonCellRecipes.add(tRecipe);
+ }
+ if (werkstoff.getStats()
+ .isCentrifuge()) {
+ RecipeMaps.centrifugeRecipes.add(
+ new GT_Recipe(
+ 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 },
+ 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);
+ RecipeMaps.centrifugeNonCellRecipes.add(tRecipe);
+ }
+ if (werkstoff.getGenerationFeatures()
+ .hasChemicalRecipes()) {
+ if (cells > 0) stOutputs.add(Materials.Empty.getCells(cells));
+ GT_Values.RA.stdBuilder()
+ .itemInputs(stOutputs.toArray(new ItemStack[0]))
+ .itemOutputs(input)
+ .fluidInputs(flOutputs.toArray(new FluidStack[0]))
+ .duration(
+ (int) Math.max(
+ 1L,
+ Math.abs(
+ werkstoff.getStats()
+ .getProtons()
+ / werkstoff.getContents()
+ .getValue()
+ .size())))
+ .eut(
+ Math.min(
+ 4,
+ werkstoff.getContents()
+ .getValue()
+ .size())
+ * 30)
+ .addTo(GT_RecipeConstants.UniversalChemical);
+ }
+ if (werkstoff.getGenerationFeatures()
+ .hasMixerRecipes()) {
+ if (cells > 0) stOutputs.add(Materials.Empty.getCells(cells));
+ short circuitID = werkstoff.getMixCircuit();
+ ItemStack circuit = circuitID == -1 ? null : GT_Utility.getIntegratedCircuit(circuitID);
+ if (circuit != null) stOutputs.add(circuit);
+ RecipeMaps.mixerRecipes.add(
+ new GT_Recipe(
+ 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 },
+ 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);
+ RecipeMaps.mixerNonCellRecipes.add(tRecipe);
+ }
+ }
+
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff, 4),
+ new Object[] { " T ", 'T', werkstoff.get(dust) });
+ GT_ModHandler.addCraftingRecipe(
+ WerkstoffLoader.getCorrespondingItemStack(dustTiny, werkstoff, 9),
+ new Object[] { "T ", 'T', werkstoff.get(dust) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(5 * SECONDS)
+ .eut(4)
+ .addTo(packagerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(5 * SECONDS)
+ .eut(4)
+ .addTo(packagerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(5 * SECONDS)
+ .eut(4)
+ .addTo(packagerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(5 * SECONDS)
+ .eut(4)
+ .addTo(packagerRecipes);
+
+ 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()
+ && werkstoff.getStats()
+ .getMeltingPoint() != 0) {
+ if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11))
+ .itemOutputs(
+ werkstoff.getStats()
+ .getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot))
+ .fluidInputs(Materials.Nitrogen.getGas(1000))
+ .duration(
+ Math.max(
+ werkstoff.getStats()
+ .getMass() / 40L,
+ 1L)
+ * werkstoff.getStats()
+ .getMeltingPoint())
+ .eut(
+ werkstoff.getStats()
+ .getMeltingVoltage())
+ .metadata(
+ COIL_HEAT,
+ werkstoff.getStats()
+ .getMeltingPoint())
+ .addTo(blastFurnaceRecipes);
+
+ } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11))
+ .itemOutputs(
+ werkstoff.getStats()
+ .getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot))
+ .fluidInputs(Materials.Argon.getGas(1000))
+ .duration(
+ Math.max(
+ werkstoff.getStats()
+ .getMass() / 40L,
+ 1L)
+ * werkstoff.getStats()
+ .getMeltingPoint())
+ .eut(
+ werkstoff.getStats()
+ .getMeltingVoltage())
+ .metadata(
+ COIL_HEAT,
+ werkstoff.getStats()
+ .getMeltingPoint())
+ .addTo(blastFurnaceRecipes);
+
+ } else {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(
+ werkstoff.getStats()
+ .getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot))
+ .duration(
+ Math.max(
+ werkstoff.getStats()
+ .getMass() / 40L,
+ 1L)
+ * werkstoff.getStats()
+ .getMeltingPoint())
+ .eut(
+ werkstoff.getStats()
+ .getMeltingVoltage())
+ .metadata(
+ COIL_HEAT,
+ werkstoff.getStats()
+ .getMeltingPoint())
+ .addTo(blastFurnaceRecipes);
+
+ if (werkstoff.getStats()
+ .getMeltingPoint() <= 1000) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust))
+ .itemOutputs(werkstoff.get(ingot))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 40L,
+ 1L) * werkstoff.getStats()
+ .getMeltingPoint())
+ .eut(0)
+ .metadata(ADDITIVE_AMOUNT, 9)
+ .addTo(primitiveBlastRecipes);
+ }
+ }
+ }
+
+ if (werkstoff.getStats()
+ .isBlastFurnace()
+ && werkstoff.getStats()
+ .getMeltingPoint() > 1750) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingotHot))
+ .itemOutputs(werkstoff.get(ingot))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 3L,
+ 1L))
+ .eut(TierEU.RECIPE_MV)
+ .addTo(vacuumFreezerRecipes);
+ }
+
+ if (werkstoff.hasItemType(ingot)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(nugget))
+ .itemOutputs(werkstoff.get(dustTiny))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ }
+ if (werkstoff.hasItemType(ingot) || werkstoff.hasItemType(gem)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(block))
+ .itemOutputs(werkstoff.get(dust, 9))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java
new file mode 100644
index 0000000000..187456a3b4
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.block;
+import static gregtech.api.enums.OrePrefixes.crushedPurified;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.gemChipped;
+import static gregtech.api.enums.OrePrefixes.gemExquisite;
+import static gregtech.api.enums.OrePrefixes.gemFlawed;
+import static gregtech.api.enums.OrePrefixes.gemFlawless;
+import static gregtech.api.enums.OrePrefixes.lens;
+import static gregtech.api.enums.OrePrefixes.ore;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.recipe.RecipeMaps.compressorRecipes;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.recipe.RecipeMaps.implosionRecipes;
+import static gregtech.api.recipe.RecipeMaps.laserEngraverRecipes;
+import static gregtech.api.recipe.RecipeMaps.latheRecipes;
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.recipe.RecipeMaps.sifterRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.ADDITIVE_AMOUNT;
+
+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;
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.TierEU;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class GemLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(gem)) {
+ if (werkstoff.getGenerationFeatures()
+ .hasSifterRecipes() || werkstoff.hasItemType(ore) && werkstoff.hasItemType(dust)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem, 9))
+ .itemOutputs(werkstoff.get(block))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .addTo(compressorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(block))
+ .itemOutputs(werkstoff.get(gem, 9))
+ .duration(5 * SECONDS)
+ .eut(24)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(crushedPurified))
+ .itemOutputs(
+ werkstoff.get(gemExquisite),
+ werkstoff.get(gemFlawless),
+ werkstoff.get(gem),
+ werkstoff.get(gemFlawed),
+ werkstoff.get(gemChipped),
+ werkstoff.get(dust))
+ .outputChances(200, 1000, 2500, 2000, 4000, 5000)
+ .duration(40 * SECONDS)
+ .eut(16)
+ .addTo(sifterRecipes);
+
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemExquisite))
+ .itemOutputs(werkstoff.get(dust, 4))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawless))
+ .itemOutputs(werkstoff.get(dust, 2))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawed))
+ .itemOutputs(werkstoff.get(dustSmall, 2))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemChipped))
+ .itemOutputs(werkstoff.get(dustSmall))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemExquisite))
+ .itemOutputs(werkstoff.get(gemFlawless, 2))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawless))
+ .itemOutputs(werkstoff.get(gem, 2))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem))
+ .itemOutputs(werkstoff.get(gemFlawed, 2))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawed))
+ .itemOutputs(werkstoff.get(gemChipped, 2))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemChipped))
+ .itemOutputs(werkstoff.get(dustTiny))
+ .duration(3 * SECONDS + 4 * TICKS)
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawless, 3))
+ .itemOutputs(werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .metadata(ADDITIVE_AMOUNT, 8)
+ .addTo(implosionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem, 3))
+ .itemOutputs(werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .metadata(ADDITIVE_AMOUNT, 8)
+ .addTo(implosionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawed, 3))
+ .itemOutputs(werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .metadata(ADDITIVE_AMOUNT, 8)
+ .addTo(implosionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemChipped, 3))
+ .itemOutputs(werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .metadata(ADDITIVE_AMOUNT, 8)
+ .addTo(implosionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust, 4))
+ .itemOutputs(werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8))
+ .duration(20 * TICKS)
+ .eut(TierEU.RECIPE_LV)
+ .metadata(ADDITIVE_AMOUNT, 24)
+ .addTo(implosionRecipes);
+ }
+
+ if (werkstoff.hasItemType(plate)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate))
+ .itemOutputs(werkstoff.get(lens), werkstoff.get(dustSmall))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(latheRecipes);
+
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemExquisite))
+ .itemOutputs(werkstoff.get(lens), werkstoff.get(dust, 2))
+ .duration(2 * MINUTES)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(latheRecipes);
+
+ final ITexture texture = TextureFactory.of(
+ Textures.BlockIcons.MACHINE_CASINGS[2][0],
+ TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, werkstoff.getRGBA(), false));
+ GregTech_API.registerCover(
+ werkstoff.get(lens),
+ texture,
+ new gregtech.common.covers.GT_Cover_Lens(
+ BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex,
+ texture));
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(lens))
+ .itemOutputs(werkstoff.get(dustSmall, 3))
+ .duration(20 * SECONDS)
+ .eut(2)
+ .addTo(maceratorRecipes);
+
+ for (ItemStack is : OreDictionary
+ .getOres("craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) {
+ is.stackSize = 0;
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemChipped, 3), is)
+ .itemOutputs(werkstoff.get(gemFlawed, 1))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(laserEngraverRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawed, 3), is)
+ .itemOutputs(werkstoff.get(gem, 1))
+ .duration(30 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(laserEngraverRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem, 3), is)
+ .itemOutputs(werkstoff.get(gemFlawless, 1))
+ .duration(60 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(laserEngraverRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gemFlawless, 3), is)
+ .itemOutputs(werkstoff.get(gemExquisite, 1))
+ .duration(2 * MINUTES)
+ .eut(2000)
+ .addTo(laserEngraverRecipes);
+
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java
new file mode 100644
index 0000000000..d969ff056f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.block;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.recipe.RecipeMaps.compressorRecipes;
+import static gregtech.api.recipe.RecipeMaps.extruderRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+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.recipe.RecipeCategories;
+import gregtech.api.recipe.RecipeMaps;
+
+public class MetalLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(ingot)) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 9))
+ .itemOutputs(werkstoff.get(block))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .addTo(compressorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 9), ItemList.Shape_Extruder_Block.get(0))
+ .itemOutputs(werkstoff.get(block))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass())
+ .eut(
+ 8 * werkstoff.getStats()
+ .getMeltingPoint() >= 2800 ? 60 : 15)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 9), ItemList.Shape_Mold_Block.get(0L))
+ .itemOutputs(werkstoff.get(block))
+ .duration(
+ (int) (werkstoff.getStats()
+ .getMass() / 2))
+ .eut(
+ 4 * werkstoff.getStats()
+ .getMeltingPoint() >= 2800 ? 60 : 15)
+ .recipeCategory(RecipeCategories.alloySmelterMolding)
+ .addTo(RecipeMaps.alloySmelterRecipes);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java
new file mode 100644
index 0000000000..86cc6aa732
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java
@@ -0,0 +1,377 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.Forestry;
+import static gregtech.api.enums.OrePrefixes.block;
+import static gregtech.api.enums.OrePrefixes.bolt;
+import static gregtech.api.enums.OrePrefixes.capsuleMolten;
+import static gregtech.api.enums.OrePrefixes.cellMolten;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.dustTiny;
+import static gregtech.api.enums.OrePrefixes.gearGt;
+import static gregtech.api.enums.OrePrefixes.gearGtSmall;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.nugget;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.plateDouble;
+import static gregtech.api.enums.OrePrefixes.ring;
+import static gregtech.api.enums.OrePrefixes.rotor;
+import static gregtech.api.enums.OrePrefixes.screw;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.stickLong;
+import static gregtech.api.recipe.RecipeMaps.fluidCannerRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidExtractionRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+import java.util.Objects;
+
+import net.minecraftforge.fluids.FluidContainerRegistry;
+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 gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.recipe.RecipeCategories;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+
+public class MoltenCellLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (!werkstoff.hasItemType(cellMolten)) {
+ return;
+ }
+
+ if (!werkstoff.hasItemType(ingot)) {
+ if (!werkstoff.hasItemType(dust)) {
+ return;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dust))
+ .fluidOutputs(werkstoff.getMolten(144))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustSmall))
+ .fluidOutputs(werkstoff.getMolten(36))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(dustTiny))
+ .fluidOutputs(werkstoff.getMolten(16))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ } else {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot))
+ .fluidOutputs(werkstoff.getMolten(144))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(nugget))
+ .fluidOutputs(werkstoff.getMolten(16))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Ingot.get(0))
+ .itemOutputs(werkstoff.get(ingot))
+ .fluidInputs(werkstoff.getMolten(144))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass())
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Nugget.get(0))
+ .itemOutputs(werkstoff.get(nugget))
+ .fluidInputs(werkstoff.getMolten(16))
+ .duration(
+ (int) ((double) werkstoff.getStats()
+ .getMass() / 9D))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Block.get(0))
+ .itemOutputs(werkstoff.get(block))
+ .fluidInputs(werkstoff.getMolten(1296))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass() * 9)
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ if (!werkstoff.hasItemType(plate)) {
+ return;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stickLong))
+ .fluidOutputs(werkstoff.getMolten(144))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate))
+ .fluidOutputs(werkstoff.getMolten(144))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick))
+ .fluidOutputs(werkstoff.getMolten(72))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .recipeCategory(RecipeCategories.fluidExtractorRecycling)
+ .addTo(fluidExtractionRecipes);
+ }
+
+ if (werkstoff.getGenerationFeatures()
+ .hasMetalCraftingSolidifierRecipes()) {
+
+ if (!werkstoff.hasItemType(plate)) {
+ return;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Rod_Long.get(0))
+ .itemOutputs(werkstoff.get(stickLong))
+ .fluidInputs(werkstoff.getMolten(144))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Rod.get(0))
+ .itemOutputs(werkstoff.get(stick))
+ .fluidInputs(werkstoff.getMolten(72))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 2,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Plate.get(0))
+ .itemOutputs(werkstoff.get(plate))
+ .fluidInputs(werkstoff.getMolten(144))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ }
+
+ if (werkstoff.getGenerationFeatures()
+ .hasMetaSolidifierRecipes()) {
+ if (!werkstoff.hasItemType(screw)) {
+ return;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Screw.get(0))
+ .itemOutputs(werkstoff.get(screw))
+ .fluidInputs(werkstoff.getMolten(18))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 8,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Gear.get(0))
+ .itemOutputs(werkstoff.get(gearGt))
+ .fluidInputs(werkstoff.getMolten(576))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 4,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Gear_Small.get(0))
+ .itemOutputs(werkstoff.get(gearGtSmall))
+ .fluidInputs(werkstoff.getMolten(144))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Bolt.get(0))
+ .itemOutputs(werkstoff.get(bolt))
+ .fluidInputs(werkstoff.getMolten(18))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 8,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Ring.get(0))
+ .itemOutputs(werkstoff.get(ring))
+ .fluidInputs(werkstoff.getMolten(36))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() / 4,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ // No Spring Molds
+
+ if (WerkstoffLoader.rotorMold == null) {
+ return;
+ }
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Rotor.get(0))
+ .itemOutputs(werkstoff.get(rotor))
+ .fluidInputs(werkstoff.getMolten(612))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 4.25,
+ 1L))
+ .eut(
+ werkstoff.getStats()
+ .getMass() > 128 ? 64 : 30)
+ .addTo(fluidSolidifierRecipes);
+
+ }
+
+ if (werkstoff.getGenerationFeatures()
+ .hasMultipleMetalSolidifierRecipes() && !werkstoff.hasItemType(plateDouble)) {
+ // No multiple plate molds
+ return;
+ }
+
+ // Tank "Recipe"
+ final FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(
+ new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144),
+ werkstoff.get(cellMolten),
+ Materials.Empty.getCells(1));
+ FluidContainerRegistry
+ .registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(cellMolten), Materials.Empty.getCells(1));
+ GT_Utility.addFluidContainerData(data);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(Materials.Empty.getCells(1))
+ .itemOutputs(werkstoff.get(cellMolten))
+ .fluidInputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144))
+ .duration(2 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(cellMolten))
+ .itemOutputs(Materials.Empty.getCells(1))
+ .fluidOutputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144))
+ .duration(2 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ if (!Forestry.isModLoaded()) return;
+
+ final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(
+ new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144),
+ werkstoff.get(capsuleMolten),
+ GT_ModHandler.getModItem(Forestry.ID, "refractoryEmpty", 1));
+ FluidContainerRegistry.registerFluidContainer(
+ werkstoff.getMolten(144),
+ werkstoff.get(capsuleMolten),
+ GT_ModHandler.getModItem(Forestry.ID, "refractoryEmpty", 1));
+ GT_Utility.addFluidContainerData(emptyData);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(capsuleMolten))
+ .fluidOutputs(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144))
+ .duration(2 * TICKS)
+ .eut(2)
+ .addTo(fluidCannerRecipes);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java
new file mode 100644
index 0000000000..5975b7b898
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.dust;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.plateDense;
+import static gregtech.api.enums.OrePrefixes.plateDouble;
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class MultipleMetalLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(plateDense)) {
+ RecipeMaps.benderRecipes.add(
+ new GT_Recipe(
+ 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.stdBuilder()
+ .itemInputs(werkstoff.get(plateDouble))
+ .itemOutputs(werkstoff.get(dust, 2))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java
new file mode 100644
index 0000000000..8c9d3837c9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.crushed;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.ore;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ore))
+ .itemOutputs(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed))
+ .duration(16 * TICKS)
+ .eut(10)
+ .addTo(hammerRecipes);
+
+ GT_ModHandler.addPulverisationRecipe(
+ werkstoff.get(ore),
+ werkstoff.get(crushed, 2),
+ werkstoff.contains(SubTag.CRYSTAL) ? werkstoff.get(gem) : werkstoff.getOreByProduct(0, dust),
+ werkstoff.getNoOfByProducts() > 0 ? 10 : 0,
+ Materials.Stone.getDust(1),
+ 50,
+ true);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/RawOreLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/RawOreLoader.java
new file mode 100644
index 0000000000..2fbb086022
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/RawOreLoader.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.crushed;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.rawOre;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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 RawOreLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(rawOre) && werkstoff.hasItemType(ingot)
+ && !werkstoff.getStats()
+ .isBlastFurnace())
+ GT_ModHandler
+ .addSmeltingRecipe(WerkstoffLoader.getCorrespondingItemStack(rawOre, werkstoff), werkstoff.get(ingot));
+
+ if (werkstoff.hasItemType(rawOre)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(rawOre))
+ .itemOutputs(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed))
+ .duration(16 * TICKS)
+ .eut(10)
+ .addTo(hammerRecipes);
+
+ GT_ModHandler.addPulverisationRecipe(
+ werkstoff.get(rawOre),
+ werkstoff.get(crushed, 2),
+ werkstoff.contains(SubTag.CRYSTAL) ? werkstoff.get(gem) : werkstoff.getOreByProduct(0, dust),
+ werkstoff.getNoOfByProducts() > 0 ? 5 : 0,
+ Materials.Stone.getDust(1),
+ 50,
+ true);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java
new file mode 100644
index 0000000000..88bfac24ee
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.block;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.dustSmall;
+import static gregtech.api.enums.OrePrefixes.foil;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.stickLong;
+import static gregtech.api.recipe.RecipeMaps.benderRecipes;
+import static gregtech.api.recipe.RecipeMaps.extruderRecipes;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.recipe.RecipeMaps.latheRecipes;
+import static gregtech.api.recipe.RecipeMaps.maceratorRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
+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 gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.TextureSet;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.GT_Proxy;
+
+public class SimpleMetalLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ if (werkstoff.hasItemType(plate)) {
+ if (werkstoff.hasItemType(gem)) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(gem))
+ .itemOutputs(werkstoff.get(stick), werkstoff.get(dustSmall, 2))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 5L,
+ 1L))
+ .eut(16)
+ .addTo(latheRecipes);
+
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick, 2))
+ .itemOutputs(werkstoff.get(stickLong))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ TextureSet texSet = werkstoff.getTexSet();
+ ITexture texture = SideReference.Side.Client ? TextureFactory.of(
+ 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.stdBuilder()
+ .itemInputs(werkstoff.get(plate))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ return;
+ }
+
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ 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) });
+
+ benderRecipes.add(
+ new GT_Recipe(
+ 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.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 3))
+ .itemOutputs(werkstoff.get(plate, 2))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GregTech_API.registerCover(
+ werkstoff.get(plate),
+ TextureFactory.of(werkstoff.getTexSet().mTextures[71], werkstoff.getRGBA(), false),
+ null);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot))
+ .itemOutputs(werkstoff.get(stick), werkstoff.get(dustSmall, 2))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 5L,
+ 1L))
+ .eut(16)
+ .addTo(latheRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate), GT_Utility.getIntegratedCircuit(1))
+ .itemOutputs(werkstoff.get(foil, 4))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 1L,
+ 1L))
+ .eut(24)
+ .addTo(benderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(10))
+ .itemOutputs(werkstoff.get(foil, 4))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1L))
+ .eut(24)
+ .addTo(benderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick, 2))
+ .itemOutputs(werkstoff.get(stickLong))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass(),
+ 1L))
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), ItemList.Shape_Extruder_Plate.get(0))
+ .itemOutputs(werkstoff.get(plate))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1L))
+ .eut(45)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot), ItemList.Shape_Extruder_Rod.get(0))
+ .itemOutputs(werkstoff.get(stick, 2))
+ .duration(
+ (int) Math.max(
+ werkstoff.getStats()
+ .getMass() * 2L,
+ 1L))
+ .eut(45)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plate))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stickLong))
+ .itemOutputs(werkstoff.get(dust))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(stick))
+ .itemOutputs(werkstoff.get(dustSmall, 2))
+ .duration(2 * TICKS)
+ .eut(8)
+ .addTo(maceratorRecipes);
+
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java
new file mode 100644
index 0000000000..499477a846
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java
@@ -0,0 +1,602 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.bolt;
+import static gregtech.api.enums.OrePrefixes.cellMolten;
+import static gregtech.api.enums.OrePrefixes.gearGtSmall;
+import static gregtech.api.enums.OrePrefixes.gem;
+import static gregtech.api.enums.OrePrefixes.ingot;
+import static gregtech.api.enums.OrePrefixes.plate;
+import static gregtech.api.enums.OrePrefixes.plateDouble;
+import static gregtech.api.enums.OrePrefixes.ring;
+import static gregtech.api.enums.OrePrefixes.screw;
+import static gregtech.api.enums.OrePrefixes.stick;
+import static gregtech.api.enums.OrePrefixes.stickLong;
+import static gregtech.api.enums.OrePrefixes.toolHeadHammer;
+import static gregtech.api.enums.OrePrefixes.toolHeadSaw;
+import static gregtech.api.enums.OrePrefixes.toolHeadWrench;
+import static gregtech.api.enums.OrePrefixes.turbineBlade;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.recipe.RecipeMaps.extruderRecipes;
+import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes;
+import static gregtech.api.recipe.RecipeMaps.formingPressRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
+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;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
+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;
+
+public class ToolLoader implements IWerkstoffRunnable {
+
+ // GTNH-Specific
+ public static final short SCREWDRIVER_MV = 152;
+ public static final short SCREWDRIVER_HV = 154;
+ public static final short SOLDERING_IRON_MV = 162;
+ public static final short SOLDERING_IRON_HV = 164;
+
+ public void run(Werkstoff werkstoff) {
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L),
+ GT_Proxy.tBits,
+ new Object[] { "GGf", 'G', gem.get(werkstoff.getBridgeMaterial()) });
+ }
+
+ if (!werkstoff.hasItemType(plate)) return;
+
+ // Disable recipe gen with handle Material for GT Materials
+ if (!werkstoff.getGenerationFeatures()
+ .isExtension()) {
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SCREWDRIVER,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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) });
+ 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) });
+ GT_ModHandler.addShapelessCraftingRecipe(
+ 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[] { toolHeadHammer.get(werkstoff.getBridgeMaterial()),
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.FILE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ werkstoff.getBridgeMaterial().mHandleMaterial,
+ null),
+ 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) });
+ GT_ModHandler.addShapelessCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SAW,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ werkstoff.getBridgeMaterial().mHandleMaterial,
+ null),
+ 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 }),
+ 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) });
+
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ SOLDERING_IRON_HV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.StyreneButadieneRubber,
+ 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) });
+
+ if (!werkstoff.hasItemType(gem)) {
+ 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', ingot.get(werkstoff.getBridgeMaterial()), 'S',
+ stick.get(werkstoff.getBridgeMaterial().mHandleMaterial) });
+ }
+ }
+
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.PLUNGER,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.WRENCH,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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()) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.CROWBAR,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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 });
+
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.WIRECUTTER,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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()) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SCOOP,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.BRANCHCUTTER,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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()) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.KNIFE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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()) });
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.BUTCHERYKNIFE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ 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()) });
+
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.WRENCH_LV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Steel,
+ 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+
+ GT_ModHandler.addCraftingRecipe(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SCREWDRIVER_LV,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Steel,
+ 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+
+ 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()) });
+ 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()) });
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(ingot, 6), ItemList.Shape_Extruder_Turbine_Blade.get(0))
+ .itemOutputs(werkstoff.get(turbineBlade, 1))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass() / 2 * 20)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(extruderRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(ItemList.Shape_Mold_Turbine_Blade.get(0))
+ .itemOutputs(werkstoff.get(turbineBlade, 1))
+ .fluidInputs(werkstoff.getMolten(864))
+ .duration(
+ (int) werkstoff.getStats()
+ .getMass() * 20)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(fluidSolidifierRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(plateDouble, 3), werkstoff.get(screw, 2))
+ .itemOutputs(werkstoff.get(turbineBlade, 1))
+ .duration(
+ (werkstoff.getStats()
+ .getMass() / 4) * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(formingPressRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(turbineBlade, 4), GT_OreDictUnificator.get(stickLong, Materials.Magnalium, 1))
+ .itemOutputs(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE_SMALL,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Magnalium,
+ null))
+ .duration(8 * SECONDS)
+ .eut(100)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(werkstoff.get(turbineBlade, 8), GT_OreDictUnificator.get(stickLong, Materials.Titanium, 1))
+ .itemOutputs(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Titanium,
+ null))
+ .duration(16 * SECONDS)
+ .eut(400)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ werkstoff.get(turbineBlade, 12),
+ GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 1))
+ .itemOutputs(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE_LARGE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.TungstenSteel,
+ null))
+ .duration(32 * SECONDS)
+ .eut(1600)
+ .addTo(assemblerRecipes);
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ werkstoff.get(turbineBlade, 16),
+ GT_OreDictUnificator.get(stickLong, Materials.Americium, 1))
+ .itemOutputs(
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE_HUGE,
+ 1,
+ werkstoff.getBridgeMaterial(),
+ Materials.Americium,
+ null))
+ .duration(1 * MINUTES + 4 * SECONDS)
+ .eut(6400)
+ .addTo(assemblerRecipes);
+ }
+
+ if (!werkstoff.hasItemType(gem)) {
+ 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()) });
+ }
+
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ 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
+ | 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) });
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java
new file mode 100644
index 0000000000..c6eacb8ad2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java
@@ -0,0 +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.
+ */
+
+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;
+
+public class AssociationLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ for (OrePrefixes prefixes : OrePrefixes.values()) {
+ if (!werkstoff.hasItemType(prefixes)) continue;
+
+ Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial();
+ ItemStack stack = WerkstoffLoader.getCorrespondingItemStackUnsafe(prefixes, werkstoff, 1);
+
+ if (stack != null && stack.getItem() != null) {
+ GT_OreDictUnificator.addAssociation(prefixes, werkstoffBridgeMaterial, stack, false);
+ GT_OreDictUnificator.set(prefixes, werkstoffBridgeMaterial, stack, true, true);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java
new file mode 100644
index 0000000000..5dafebb48e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Mods.Thaumcraft;
+import static gregtech.api.enums.OrePrefixes.cell;
+import static gregtech.api.enums.OrePrefixes.cellMolten;
+import static gregtech.api.enums.OrePrefixes.dust;
+import static gregtech.api.enums.OrePrefixes.values;
+
+import java.util.ArrayList;
+
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable;
+
+import gregtech.api.enchants.Enchantment_Radioactivity;
+import gregtech.api.enums.Element;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class BridgeMaterialsLoader implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ // int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int
+ // aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int
+ // 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())
+ : new Materials(
+ -1,
+ werkstoff.getTexSet(),
+ werkstoff.getToolSpeed(),
+ werkstoff.getDurability(),
+ werkstoff.getToolQuality(),
+ 0,
+ werkstoff.getRGBA()[0],
+ werkstoff.getRGBA()[1],
+ werkstoff.getRGBA()[2],
+ werkstoff.getRGBA()[3],
+ werkstoff.getVarName(),
+ werkstoff.getDefaultName(),
+ 0,
+ 0,
+ werkstoff.getStats()
+ .getMeltingPoint(),
+ werkstoff.getStats()
+ .getMeltingPoint(),
+ werkstoff.getStats()
+ .isBlastFurnace(),
+ false,
+ 0,
+ 1,
+ 1,
+ null);
+ for (OrePrefixes prefixes : values()) {
+ if (prefixes != cell || !Werkstoff.Types.ELEMENT.equals(werkstoff.getType())) {
+ if (prefixes == dust && Werkstoff.Types.ELEMENT.equals(werkstoff.getType())
+ && Werkstoff.Types.ELEMENT.equals(werkstoff.getType())) {
+ boolean ElementSet = false;
+ for (Element e : Element.values()) {
+ if (e.toString()
+ .equals(werkstoff.getToolTip())) {
+ if (!e.mLinkedMaterials.isEmpty()) break;
+ werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null
+ ? werkstoff.getBridgeMaterial()
+ : Materials.get(werkstoff.getVarName()) != Materials._NULL
+ ? Materials.get(werkstoff.getVarName())
+ : new Materials(
+ -1,
+ werkstoff.getTexSet(),
+ werkstoff.getToolSpeed(),
+ werkstoff.getDurability(),
+ werkstoff.getToolQuality(),
+ 0,
+ werkstoff.getRGBA()[0],
+ werkstoff.getRGBA()[1],
+ werkstoff.getRGBA()[2],
+ werkstoff.getRGBA()[3],
+ werkstoff.getVarName(),
+ werkstoff.getDefaultName(),
+ 0,
+ 0,
+ werkstoff.getStats()
+ .getMeltingPoint(),
+ werkstoff.getStats()
+ .getMeltingPoint(),
+ werkstoff.getStats()
+ .isBlastFurnace(),
+ false,
+ 0,
+ 1,
+ 1,
+ null);
+ werkstoffBridgeMaterial.mElement = e;
+ 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);
+ }
+ ElementSet = true;
+ break;
+ }
+ }
+ if (!ElementSet) {
+ continue;
+ }
+ }
+
+ if (werkstoff.hasItemType(cell)) {
+ werkstoffBridgeMaterial.setHasCorrespondingFluid(true);
+ werkstoffBridgeMaterial.setHasCorrespondingGas(true);
+ werkstoffBridgeMaterial.mFluid = werkstoff.getFluidOrGas(1)
+ .getFluid();
+ werkstoffBridgeMaterial.mGas = werkstoff.getFluidOrGas(1)
+ .getFluid();
+ }
+
+ if (werkstoff.hasItemType(cellMolten)) {
+ werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1)
+ .getFluid();
+ }
+ werkstoffBridgeMaterial.mName = werkstoff.getVarName();
+ werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName();
+ werkstoffBridgeMaterial.mChemicalFormula = werkstoff.getToolTip();
+ if ("null".equals(werkstoffBridgeMaterial.mLocalizedName))
+ // only reload from lang file if not localized already
+ werkstoffBridgeMaterial.mLocalizedName = GT_LanguageManager.addStringLocalization(
+ "Material." + werkstoffBridgeMaterial.mName.toLowerCase(),
+ werkstoffBridgeMaterial.mDefaultLocalName);
+ if (Thaumcraft.isModLoaded()) {
+ 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.mDurability > 1280 ? Materials.Steel : Materials.Wood;
+ if (werkstoff.getStats()
+ .isRadioactive()) {
+ werkstoffBridgeMaterial.setEnchantmentForArmors(
+ Enchantment_Radioactivity.INSTANCE,
+ werkstoff.getStats()
+ .getEnchantmentlvl());
+ werkstoffBridgeMaterial.setEnchantmentForTools(
+ Enchantment_Radioactivity.INSTANCE,
+ werkstoff.getStats()
+ .getEnchantmentlvl());
+ }
+ werkstoff.setBridgeMaterial(werkstoffBridgeMaterial);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java
new file mode 100644
index 0000000000..b2287b48b5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java
@@ -0,0 +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.
+ */
+
+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.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class CasingRegistrator implements IWerkstoffRunnable {
+
+ @Override
+ public void run(Werkstoff werkstoff) {
+ GT_OreDictUnificator.addAssociation(
+ OrePrefixes.blockCasing,
+ werkstoff.getBridgeMaterial(),
+ new ItemStack(WerkstoffLoader.BWBlockCasings, 1, werkstoff.getmID()),
+ false);
+ GT_OreDictUnificator.addAssociation(
+ OrePrefixes.blockCasingAdvanced,
+ werkstoff.getBridgeMaterial(),
+ new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, 1, werkstoff.getmID()),
+ false);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java
new file mode 100644
index 0000000000..85f56cb7a9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.system.oredict;
+
+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<>();
+
+ public static synchronized void addToMap(Pair<String, ItemStack> element) {
+ OreDictAdder.toAddMap.put(element.getKey(), element.getValue());
+ }
+
+ @SafeVarargs
+ public static synchronized void addToMap(Pair<String, ItemStack>... elements) {
+ for (Pair<String, ItemStack> p : elements) OreDictAdder.toAddMap.put(p.getKey(), p.getValue());
+ }
+
+ public static void addToOreDict() {
+ for (Map.Entry<String, ItemStack> entry : OreDictAdder.toAddMap.entrySet()) {
+ GT_OreDictUnificator.registerOre(entry.getKey(), entry.getValue());
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java
new file mode 100644
index 0000000000..683b55b333
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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<>();
+ private static final HashSet<Pair<Integer, Short>> cacheNonBW = new HashSet<>();
+
+ public static HashMap<String, Pair<Integer, Short>> getCache() {
+ return OreDictHandler.cache;
+ }
+
+ public static HashSet<Pair<Integer, Short>> getNonBWCache() {
+ return OreDictHandler.cacheNonBW;
+ }
+
+ public static void adaptCacheForWorld() {
+ Set<String> used = new HashSet<>(OreDictHandler.cache.keySet());
+ OreDictHandler.cache.clear();
+ OreDictHandler.cacheNonBW.clear();
+ 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());
+ OreDictHandler.cache.put(s, p);
+ for (ItemStack tmp : OreDictionary.getOres(s)) {
+ 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 (!MainMod.MOD_ID.equals(UI.modId) && !BartWorksCrossmod.MOD_ID.equals(UI.modId)
+ && !"BWCore".equals(UI.modId)) {
+ OreDictHandler.cacheNonBW.add(p2);
+ }
+ }
+ }
+ }
+ }
+
+ public static ItemStack getItemStack(String elementName, OrePrefixes prefixes, int amount) {
+ if (OreDictHandler.cache.get(prefixes + elementName.replace(" ", "")) != null) {
+ Pair<Integer, Short> p = OreDictHandler.cache.get(prefixes + elementName.replace(" ", ""));
+ return new ItemStack(Item.getItemById(p.getKey()), amount, p.getValue());
+ }
+ if (!OreDictionary.getOres(prefixes + elementName.replace(" ", ""))
+ .isEmpty()) {
+ ItemStack tmp = GT_OreDictUnificator.get(
+ OreDictionary.getOres(prefixes + elementName.replace(" ", ""))
+ .get(0)
+ .copy())
+ .copy();
+ OreDictHandler.cache.put(
+ prefixes + elementName.replace(" ", ""),
+ new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage()));
+ tmp.stackSize = amount;
+ return tmp;
+ }
+ return null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java
new file mode 100644
index 0000000000..3305741f27
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+import net.minecraft.tileentity.TileEntity;
+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.BW_MetaGeneratedOreTE;
+import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Ores;
+import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_SmallOres;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+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;
+ public static int sWeight;
+ public byte bwOres;
+ public int mMinY, mWeight, mDensity, mSize, mMaxY, mPrimaryMeta, mSecondaryMeta, mBetweenMeta, mSporadicMeta;
+
+ public abstract Block getDefaultBlockToReplace();
+
+ public abstract int[] getDefaultDamageToReplace();
+
+ 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) {
+ super(aName, BW_OreLayer.sList, aDefault);
+ this.mMinY = (short) aMinY;
+ this.mMaxY = (short) aMaxY;
+ this.mWeight = (short) aWeight;
+ this.mDensity = (short) aDensity;
+ this.mSize = (short) Math.max(1, aSize);
+
+ if (this.mEnabled) BW_OreLayer.sWeight += this.mWeight;
+
+ if (top instanceof Werkstoff) this.bwOres = (byte) (this.bwOres | 0b1000);
+ if (bottom instanceof Werkstoff) this.bwOres = (byte) (this.bwOres | 0b0100);
+ 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
+ : top instanceof Werkstoff ? ((Werkstoff) top).getmID() : 0;
+ 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
+ : between instanceof Werkstoff ? ((Werkstoff) between).getmID() : 0;
+ short aSporadic = sprinkled instanceof Materials ? (short) ((Materials) sprinkled).mMetaItemSubID
+ : sprinkled instanceof Werkstoff ? ((Werkstoff) sprinkled).getmID() : 0;
+ this.mPrimaryMeta = aPrimary;
+ this.mSecondaryMeta = aSecondary;
+ this.mBetweenMeta = aBetween;
+ this.mSporadicMeta = aSporadic;
+ NEIMAP.put((short) this.mPrimaryMeta, this);
+ NEIMAP.put((short) this.mSecondaryMeta, this);
+ NEIMAP.put((short) this.mBetweenMeta, this);
+ NEIMAP.put((short) this.mSporadicMeta, this);
+ }
+
+ public List<ItemStack> getStacks() {
+ ArrayList<ItemStack> ret = new ArrayList<>();
+ ret.add(
+ (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)
+ : new ItemStack(GregTech_API.sBlockOres1, 1, this.mSecondaryMeta));
+ ret.add(
+ (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)
+ : new ItemStack(GregTech_API.sBlockOres1, 1, this.mSporadicMeta));
+ return ret;
+ }
+
+ public List<Pair<Integer, Boolean>> getStacksRawData() {
+ ArrayList<Pair<Integer, Boolean>> ret = new ArrayList<>();
+ ret.add(new Pair<>(this.mPrimaryMeta, (this.bwOres & 0b1000) != 0));
+ ret.add(new Pair<>(this.mSecondaryMeta, (this.bwOres & 0b0100) != 0));
+ ret.add(new Pair<>(this.mBetweenMeta, (this.bwOres & 0b0010) != 0));
+ ret.add(new Pair<>(this.mSporadicMeta, (this.bwOres & 0b0001) != 0));
+ return ret;
+ }
+
+ @Override
+ 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);
+ int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
+
+ boolean wasPlaced = false;
+
+ for (int tX = cX; tX <= eX; ++tX) {
+ int cZ = aChunkZ - aRandom.nextInt(this.mSize);
+ int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize);
+
+ for (int tZ = cZ; tZ <= eZ; ++tZ) {
+ int i;
+ if (this.mSecondaryMeta > 0) {
+ for (i = tMinY - 1; i < tMinY + 2; ++i) {
+ if (this.shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ)) {
+ wasPlaced = this.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false);
+ }
+ }
+ }
+
+ if (this.mBetweenMeta > 0 && this.shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ)) {
+ wasPlaced = this
+ .setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false);
+ }
+
+ if (this.mPrimaryMeta > 0) {
+ for (i = tMinY + 3; i < tMinY + 6; ++i) {
+ if (this.shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ)) {
+ wasPlaced = this.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false);
+ }
+ }
+ }
+
+ if (this.mSporadicMeta > 0 && this.shouldPlace(aRandom, cX, eX, tX, cZ, eZ, tZ)) {
+ wasPlaced = this
+ .setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false);
+ }
+ }
+ }
+
+ if (BW_OreLayer.logOregenRoss128) {
+ MainMod.LOGGER.info("Generated Orevein: " + this.mWorldGenName + " " + aChunkX + " " + aChunkZ);
+ }
+
+ return wasPlaced;
+ }
+ }
+
+ 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
+ || aRandom.nextInt(
+ Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)
+ return true;
+ return false;
+ }
+
+ public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre) {
+ // security stuff to prevent crashes with 2 TileEntites on the same Spot
+ TileEntity te = aWorld.getTileEntity(aX, aY, aZ);
+ if (te instanceof BW_MetaGeneratedOreTE || te instanceof GT_TileEntity_Ores) return true;
+
+ if (aMetaData == this.mSporadicMeta && (this.bwOres & 0b0001) != 0
+ || aMetaData == this.mBetweenMeta && (this.bwOres & 0b0010) != 0
+ || aMetaData == this.mPrimaryMeta && (this.bwOres & 0b1000) != 0
+ || aMetaData == this.mSecondaryMeta && (this.bwOres & 0b0100) != 0) {
+ return isSmallOre
+ ? BW_MetaGenerated_SmallOres.setOreBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aMetaData,
+ false,
+ this.getDefaultBlockToReplace(),
+ this.getDefaultDamageToReplace())
+ : BW_MetaGenerated_Ores.setOreBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aMetaData,
+ false,
+ this.getDefaultBlockToReplace(),
+ this.getDefaultDamageToReplace());
+ }
+
+ return this.setGTOreBlockSpace(aWorld, aX, aY, aZ, aMetaData, this.getDefaultBlockToReplace());
+ }
+
+ public boolean setGTOreBlockSpace(World aWorld, int aX, int aY, int aZ, int aMetaData, Block block) {
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, aX, aY, aZ, aMetaData, false, false)) return true;
+ aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
+ Block tBlock = aWorld.getBlock(aX, aY, aZ);
+ Block tOreBlock = GregTech_API.sBlockOres1;
+ if (aMetaData < 0 || tBlock == Blocks.air) {
+ return false;
+ } else {
+ if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, block)) {
+ return false;
+ }
+ aMetaData += 5000;
+ aWorld.setBlock(aX, aY, aZ, tOreBlock, aMetaData, 0);
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if (tTileEntity instanceof GT_TileEntity_Ores ore) {
+ ore.mMetaData = (short) aMetaData;
+ }
+ return true;
+ }
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof BW_OreLayer that)) return false;
+
+ if (this.bwOres != that.bwOres || this.mMinY != that.mMinY
+ || this.mWeight != that.mWeight
+ || this.mDensity != that.mDensity) return false;
+ if (this.mSize != that.mSize) return false;
+ if (this.mMaxY != that.mMaxY) return false;
+ if (this.mPrimaryMeta != that.mPrimaryMeta) return false;
+ if (this.mSecondaryMeta != that.mSecondaryMeta) return false;
+ if (this.mBetweenMeta != that.mBetweenMeta) return false;
+ return this.mSporadicMeta == that.mSporadicMeta;
+ }
+
+ @Override
+ public int hashCode() {
+ return MurmurHash3.murmurhash3_x86_32(
+ ByteBuffer.allocate(37)
+ .put(this.bwOres)
+ .putInt(this.mMinY)
+ .putInt(this.mWeight)
+ .putInt(this.mDensity)
+ .putInt(this.mSize)
+ .putInt(this.mMaxY)
+ .putInt(this.mPrimaryMeta)
+ .putInt(this.mSecondaryMeta)
+ .putInt(this.mBetweenMeta)
+ .putInt(this.mSporadicMeta)
+ .array(),
+ 0,
+ 37,
+ 31);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java
new file mode 100644
index 0000000000..40c2302fb0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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
+ */
+public class BW_WordGenerator implements IWorldGenerator {
+
+ public BW_WordGenerator() {
+ // GT_NH Override... wont be actually registered to force its generation directly in the ChunkProvider
+ // GameRegistry.registerWorldGenerator(this, 1073741823);
+ }
+
+ 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();
+ }
+
+ public static class WorldGenContainer implements Runnable {
+
+ public static HashSet<ChunkCoordIntPair> mGenerated = new HashSet<>(2000);
+ public final int mDimensionType;
+ public final World mWorld;
+ public final IChunkProvider mChunkGenerator;
+ public final IChunkProvider mChunkProvider;
+ public int mX;
+ public int mZ;
+
+ public WorldGenContainer(int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator,
+ IChunkProvider aChunkProvider) {
+ this.mX = aX;
+ this.mZ = aZ;
+ this.mDimensionType = aDimensionType;
+ this.mWorld = aWorld;
+ this.mChunkGenerator = aChunkGenerator;
+ this.mChunkProvider = aChunkProvider;
+ }
+
+ // returns a coordinate of a center chunk of 3x3 square; the argument belongs to this square
+ public int getVeinCenterCoordinate(int c) {
+ c += c < 0 ? 1 : 3;
+ return c - c % 3 - 2;
+ }
+
+ public boolean surroundingChunksLoaded(int xCenter, int zCenter) {
+ return this.mWorld.checkChunksExist(xCenter - 16, 0, zCenter - 16, xCenter + 16, 0, zCenter + 16);
+ }
+
+ public XSTR getRandom(int xChunk, int zChunk) {
+ long worldSeed = this.mWorld.getSeed();
+ XSTR fmlRandom = new XSTR(worldSeed);
+ long xSeed = fmlRandom.nextLong() >> 2 + 1L;
+ long zSeed = fmlRandom.nextLong() >> 2 + 1L;
+ long chunkSeed = xSeed * xChunk + zSeed * zChunk ^ worldSeed;
+ fmlRandom.setSeed(chunkSeed);
+ return new XSTR(fmlRandom.nextInt());
+ }
+
+ public void run() {
+ int xCenter = this.getVeinCenterCoordinate(this.mX >> 4);
+ int zCenter = this.getVeinCenterCoordinate(this.mZ >> 4);
+ Random random = this.getRandom(xCenter, zCenter);
+ xCenter <<= 4;
+ zCenter <<= 4;
+ ChunkCoordIntPair centerChunk = new ChunkCoordIntPair(xCenter, zCenter);
+ if (!BW_WordGenerator.WorldGenContainer.mGenerated.contains(centerChunk)
+ && this.surroundingChunksLoaded(xCenter, zCenter)) {
+ BW_WordGenerator.WorldGenContainer.mGenerated.add(centerChunk);
+ if (BW_OreLayer.sWeight > 0 && BW_OreLayer.sList.size() > 0) {
+ boolean temp = true;
+ int tRandomWeight;
+ for (int i = 0; i < 256 && temp; i++) {
+ tRandomWeight = random.nextInt(BW_OreLayer.sWeight);
+ for (BW_OreLayer tWorldGen : BW_OreLayer.sList) {
+ if (!tWorldGen.isGenerationAllowed(this.mWorld, this.mDimensionType, this.mDimensionType))
+ continue;
+ tRandomWeight -= tWorldGen.mWeight;
+ if (tRandomWeight <= 0) {
+ try {
+ boolean placed;
+ int attempts = 0;
+ do {
+ placed = tWorldGen.executeWorldgen(
+ this.mWorld,
+ random,
+ "",
+ this.mDimensionType,
+ xCenter,
+ zCenter,
+ this.mChunkGenerator,
+ this.mChunkProvider);
+ ++attempts;
+ } while (!placed && attempts < 25);
+ temp = false;
+ break;
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
+ }
+ }
+ }
+ }
+ }
+ Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ);
+ if (tChunk != null) {
+ tChunk.isModified = true;
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
new file mode 100644
index 0000000000..6e0f0543e4
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Arsenopyrite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Bismuthinit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Bismutite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Bornite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.ChromoAluminoPovondrait;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.DescloiziteCUVO4;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.DescloiziteZNVO4;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Djurleit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Fayalit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Ferberite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FluorBuergerit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Forsterit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FuchsitAL;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FuchsitCR;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Hedenbergit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Huebnerit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Loellingit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Olenit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RedZircon;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Roquesit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Thorianit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.VanadioOxyDravit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Wittichenit;
+import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList;
+import static gregtech.api.enums.Materials.Bismuth;
+import static gregtech.api.enums.Materials.Coal;
+import static gregtech.api.enums.Materials.Diamond;
+import static gregtech.api.enums.Materials.Graphite;
+import static gregtech.api.enums.Materials.Lepidolite;
+import static gregtech.api.enums.Materials.Scheelite;
+import static gregtech.api.enums.Materials.Spodumene;
+import static gregtech.api.enums.Materials.Stibnite;
+import static gregtech.api.enums.Materials.Tetrahedrite;
+import static gregtech.api.enums.Materials.Uraninite;
+
+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 {
+
+ @Override
+ public Block getDefaultBlockToReplace() {
+ return Blocks.stone;
+ }
+
+ @Override
+ public int[] getDefaultDamageToReplace() {
+ return new int[] { 0 };
+ }
+
+ @Override
+ public String getDimName() {
+ 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,
+ 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);
+ 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);
+ new BW_WorldGenRoss128b(
+ "ore.mix.ross128.TurmalinAlkali",
+ true,
+ 5,
+ 80,
+ 15,
+ 4,
+ 48,
+ Olenit,
+ FluorBuergerit,
+ ChromoAluminoPovondrait,
+ VanadioOxyDravit);
+ new BW_WorldGenRoss128b(
+ "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);
+ new BW_WorldGenRoss128b(
+ "ore.mix.ross128.CopperSulfits",
+ true,
+ 40,
+ 70,
+ 80,
+ 3,
+ 24,
+ Djurleit,
+ Bornite,
+ Wittichenit,
+ Tetrahedrite);
+ new BW_WorldGenRoss128b(
+ "ore.mix.ross128.Forsterit",
+ true,
+ 20,
+ 90,
+ 50,
+ 2,
+ 32,
+ Forsterit,
+ Fayalit,
+ DescloiziteCUVO4,
+ DescloiziteZNVO4);
+ new BW_WorldGenRoss128b(
+ "ore.mix.ross128.Hedenbergit",
+ true,
+ 20,
+ 90,
+ 50,
+ 2,
+ 32,
+ Hedenbergit,
+ Fayalit,
+ DescloiziteCUVO4,
+ DescloiziteZNVO4);
+ new BW_WorldGenRoss128b(
+ "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);
+ uo_dimensionList.SetConfigValues(ross128b, ross128b, "gas_natural_gas", "gas_natural_gas", 0, 625, 65, 5);
+ }
+
+ @Override
+ public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) {
+ return aDimensionType == ConfigHandler.ross128BID;
+ }
+
+ @Override
+ public boolean isGenerationAllowed(String aDimName, int aDimensionType, int aAllowedDimensionType) {
+ return aDimensionType == ConfigHandler.ross128BID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java
new file mode 100644
index 0000000000..7454b0dd93
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.BArTiMaEuSNeK;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Bornite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.ChromoAluminoPovondrait;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Djurleit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Fayalit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Ferberite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FluorBuergerit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Fluorspar;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FuchsitAL;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.FuchsitCR;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Hedenbergit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Huebnerit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Loellingit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Olenit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Prasiolite;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.RedZircon;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Tiberium;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.VanadioOxyDravit;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Wittichenit;
+import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList;
+import static gregtech.api.enums.Materials.Amethyst;
+import static gregtech.api.enums.Materials.Barite;
+import static gregtech.api.enums.Materials.Galena;
+import static gregtech.api.enums.Materials.Helium_3;
+import static gregtech.api.enums.Materials.NaquadahEnriched;
+import static gregtech.api.enums.Materials.Olivine;
+import static gregtech.api.enums.Materials.SaltWater;
+import static gregtech.api.enums.Materials.Scheelite;
+import static gregtech.api.enums.Materials.Sphalerite;
+import static gregtech.api.enums.Materials.Tetrahedrite;
+
+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,
+ ISubTagContainer sprinkled) {
+ super(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, top, bottom, between, sprinkled);
+ }
+
+ @Override
+ public Block getDefaultBlockToReplace() {
+ return Block.getBlockFromName("GalacticraftCore:tile.moonBlock");
+ }
+
+ @Override
+ public int[] getDefaultDamageToReplace() {
+ int[] ret = new int[12];
+ for (int i = 0; i < 12; i++) {
+ if (i != 5 && i != 3) ret[i] = i;
+ }
+ return ret;
+ }
+
+ @Override
+ public String getDimName() {
+ return StatCollector.translateToLocal("moon.Ross128ba");
+ }
+
+ public static void init_Ores() {
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.tib",
+ true,
+ 30,
+ 60,
+ 6,
+ 1,
+ 16,
+ Tiberium,
+ Tiberium,
+ NaquadahEnriched,
+ NaquadahEnriched);
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.Tungstate",
+ true,
+ 5,
+ 40,
+ 60,
+ 4,
+ 14,
+ Ferberite,
+ Huebnerit,
+ Loellingit,
+ Scheelite);
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.bart",
+ true,
+ 30,
+ 60,
+ 1,
+ 1,
+ 1,
+ BArTiMaEuSNeK,
+ BArTiMaEuSNeK,
+ BArTiMaEuSNeK,
+ BArTiMaEuSNeK);
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.TurmalinAlkali",
+ true,
+ 5,
+ 80,
+ 60,
+ 4,
+ 48,
+ Olenit,
+ FluorBuergerit,
+ ChromoAluminoPovondrait,
+ VanadioOxyDravit);
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.Amethyst",
+ true,
+ 5,
+ 80,
+ 35,
+ 2,
+ 8,
+ Amethyst,
+ Olivine,
+ Prasiolite,
+ Hedenbergit);
+ new BW_WorldGenRoss128ba(
+ "ore.mix.ross128ba.CopperSulfits",
+ true,
+ 40,
+ 70,
+ 80,
+ 3,
+ 24,
+ Djurleit,
+ Bornite,
+ Wittichenit,
+ Tetrahedrite);
+ new BW_WorldGenRoss128ba(
+ "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);
+ }
+
+ public static void init_undergroundFluids() {
+ String ross128b = StatCollector.translateToLocal("moon.Ross128ba");
+ uo_dimensionList.SetConfigValues(
+ ross128b,
+ ross128b,
+ SaltWater.getFluid(1)
+ .getFluid()
+ .getName(),
+ SaltWater.getFluid(1)
+ .getFluid()
+ .getName(),
+ 0,
+ 1250,
+ 40,
+ 5);
+ uo_dimensionList.SetConfigValues(
+ ross128b,
+ ross128b,
+ Helium_3.getGas(1)
+ .getFluid()
+ .getName(),
+ Helium_3.getGas(1)
+ .getFluid()
+ .getName(),
+ 0,
+ 1250,
+ 60,
+ 5);
+ }
+
+ @Override
+ public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) {
+ return aDimensionType == ConfigHandler.ross128BAID;
+ }
+
+ @Override
+ public boolean isGenerationAllowed(String aDimName, int aDimensionType, int aAllowedDimensionType) {
+ return aDimensionType == ConfigHandler.ross128BAID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java
new file mode 100644
index 0000000000..7d599b441a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/GT_WorldgenUtil.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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() {}
+
+ public static final Block GT_TILES = GregTech_API.sBlockMachines;
+
+ public static short getGenerator(Random rand, int tier) {
+ int meta = ConfigHandler.metasForTiers[0][tier][rand.nextInt(ConfigHandler.metasForTiers[0][tier].length)];
+ return GregTech_API.METATILEENTITIES[meta] != null ? (short) meta : GT_WorldgenUtil.getGenerator(rand, tier);
+ }
+
+ public static short getBuffer(Random rand, int tier) {
+ int meta = ConfigHandler.metasForTiers[1][tier][rand.nextInt(ConfigHandler.metasForTiers[1][tier].length)];
+ return GregTech_API.METATILEENTITIES[meta] != null ? (short) meta : GT_WorldgenUtil.getBuffer(rand, tier);
+ }
+
+ public static short getCable(Random rand, int tier) {
+ int meta = ConfigHandler.metasForTiers[2][tier][rand.nextInt(ConfigHandler.metasForTiers[2][tier].length)];
+ return GregTech_API.METATILEENTITIES[meta] != null ? (short) meta : GT_WorldgenUtil.getCable(rand, tier);
+ }
+
+ public static short getMachine(Random rand, int tier) {
+ int meta = ConfigHandler.metasForTiers[3][tier][rand.nextInt(ConfigHandler.metasForTiers[3][tier].length)];
+ return GregTech_API.METATILEENTITIES[meta] != null ? (short) meta : GT_WorldgenUtil.getMachine(rand, tier);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java
new file mode 100644
index 0000000000..ef6b88cc5a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java
@@ -0,0 +1,502 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.maxTierRoss;
+import static net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST;
+
+import java.security.SecureRandom;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.WeightedRandomChestContent;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import net.minecraftforge.common.ChestGenHooks;
+import net.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public abstract class MapGenRuins extends WorldGenerator {
+
+ @SuppressWarnings("unchecked")
+ protected Pair<Block, Integer>[][] ToBuildWith = new Pair[4][0];
+
+ @Override
+ public boolean generate(World p_76484_1_, Random p_76484_2_, int p_76484_3_, int p_76484_4_, int p_76484_5_) {
+ return false;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void setFloorBlocks(int[] metas, Block... blocks) {
+ this.ToBuildWith[0] = new Pair[metas.length];
+ for (int i = 0; i < metas.length; i++) {
+ this.ToBuildWith[0][i] = new Pair<>(blocks[i % blocks.length], metas[i]);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void setWallBlocks(int[] metas, Block... blocks) {
+ this.ToBuildWith[1] = new Pair[metas.length];
+ for (int i = 0; i < metas.length; i++) {
+ this.ToBuildWith[1][i] = new Pair<>(blocks[i % blocks.length], metas[i]);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void setRoofBlocks(int[] metas, Block... blocks) {
+ this.ToBuildWith[2] = new Pair[metas.length];
+ for (int i = 0; i < metas.length; i++) {
+ this.ToBuildWith[2][i] = new Pair<>(blocks[i % blocks.length], metas[i]);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void setMiscBlocks(int[] metas, Block... blocks) {
+ this.ToBuildWith[3] = new Pair[metas.length];
+ for (int i = 0; i < metas.length; i++) {
+ this.ToBuildWith[3][i] = new Pair<>(blocks[i % blocks.length], metas[i]);
+ }
+ }
+
+ int[] statBlocks = new int[4];
+
+ 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);
+ }
+
+ protected void setRandomBlock(World worldObj, int x, int y, int z, Random rand, Pair<Block, Integer>... blocks) {
+ Block toSet = blocks[rand.nextInt(blocks.length)].getKey();
+ int meta = blocks[rand.nextInt(blocks.length)].getValue();
+ this.setBlock(worldObj, x, y, z, toSet, meta);
+ }
+
+ protected void setBlock(World worldObj, int x, int y, int z, Block block, int meta) {
+ this.setBlockAndNotifyAdequately(worldObj, x, y, z, block, meta);
+ }
+
+ protected void setBlock(World worldObj, int x, int y, int z, Pair<Block, Integer> pair) {
+ this.setBlockAndNotifyAdequately(worldObj, x, y, z, pair.getKey(), pair.getValue());
+ }
+
+ private TileEntity setGTMachineBlock(World worldObj, int x, int y, int z, int meta) {
+ boolean isEnabled = true;
+ try {
+ isEnabled = GT_Runnable_MachineBlockUpdate.isEnabled();
+ } catch (Throwable ignored) {
+ isEnabled = false;
+ }
+ if (isEnabled)
+ throw new IllegalStateException("Machine Block Runnable needs to be disabled while creating world!");
+ this.setBlockAndNotifyAdequately(
+ worldObj,
+ x,
+ y,
+ z,
+ GT_WorldgenUtil.GT_TILES,
+ GregTech_API.METATILEENTITIES[meta].getTileEntityBaseType());
+ TileEntity tile = worldObj.getTileEntity(x, y, z);
+ ((IGregTechTileEntity) tile).setInitialValuesAsNBT(null, (short) meta);
+ return tile;
+ }
+
+ protected TileEntity reSetGTTileEntity(IGregTechTileEntity bte, World worldObj, int x, int y, int z, int meta) {
+ worldObj.removeTileEntity(x, y, z);
+ this.setBlock(worldObj, x, y, z, Blocks.air, 0);
+ return this.setGTMachineBlock(worldObj, x, y, z, meta);
+ }
+
+ protected void setGTMachineBlockWChance(World worldObj, int x, int y, int z, Random rand, int airchance, int meta) {
+ if (rand.nextInt(100) > airchance) {
+ this.setGTMachineBlock(worldObj, x, y, z, meta);
+ } else this.setBlock(worldObj, x, y, z, Blocks.air, 0);
+ }
+
+ protected void setGTCablekWChance(World worldObj, int x, int y, int z, Random rand, int airchance, int meta) {
+ if (rand.nextInt(100) > airchance) {
+ this.setGTCable(worldObj, x, y, z, meta);
+ } else this.setBlock(worldObj, x, y, z, Blocks.air, 0);
+ }
+
+ protected void setGTMachine(World worldObj, int x, int y, int z, int meta, String ownerName,
+ ForgeDirection facing) {
+ try {
+ GT_Runnable_MachineBlockUpdate.setDisabled();
+ } catch (Throwable ignored) {}
+ this.setGTMachineBlock(worldObj, x, y, z, meta);
+ BaseMetaTileEntity BTE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z);
+ BTE.setOwnerName(ownerName);
+ BTE.setFrontFacing(facing);
+ BTE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z);
+ this.checkTile(BTE, worldObj, x, y, z, meta, ownerName, facing, 0);
+ try {
+ GT_Runnable_MachineBlockUpdate.setEnabled();
+ } catch (Throwable ignored) {}
+ }
+
+ private void checkTile(BaseMetaTileEntity BTE, World worldObj, int x, int y, int z, int meta, String ownerName,
+ ForgeDirection facing, int depth) {
+ if (depth < 25) {
+ if (BTE.getMetaTileID() != meta || worldObj.getTileEntity(x, y, z) != BTE || BTE.isInvalid()) {
+ this.redoTile(BTE, worldObj, x, y, z, meta, ownerName, facing);
+ this.checkTile(BTE, worldObj, x, y, z, meta, ownerName, facing, depth);
+ depth++;
+ }
+ } else {
+ worldObj.removeTileEntity(x, y, z);
+ worldObj.setBlockToAir(x, y, z);
+ }
+ }
+
+ private void redoTile(BaseMetaTileEntity BTE, World worldObj, int x, int y, int z, int meta, String ownerName,
+ ForgeDirection facing) {
+ this.reSetGTTileEntity(BTE, worldObj, x, y, z, meta);
+ BTE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z);
+ BTE.setOwnerName(ownerName);
+ BTE.setFrontFacing(facing);
+ }
+
+ protected void setGTCable(World worldObj, int x, int y, int z, int meta) {
+ try {
+ GT_Runnable_MachineBlockUpdate.setDisabled();
+ } catch (Throwable ignored) {}
+ BaseMetaPipeEntity BTE = (BaseMetaPipeEntity) this.setGTMachineBlock(worldObj, x, y, z, meta);
+ MetaPipeEntity MPE = (MetaPipeEntity) BTE.getMetaTileEntity();
+ BTE.mConnections |= (byte) (1 << (byte) 4);
+ BTE.mConnections |= (byte) (1 << ForgeDirection.getOrientation(4)
+ .getOpposite()
+ .ordinal());
+ BaseMetaTileEntity BPE = (BaseMetaTileEntity) worldObj.getTileEntity(x, y, z - 1);
+ if (BPE != null) {
+ BTE.mConnections |= (byte) (1 << (byte) 2);
+ }
+ MPE.mConnections = BTE.mConnections;
+ try {
+ GT_Runnable_MachineBlockUpdate.setEnabled();
+ } catch (Throwable ignored) {}
+ }
+
+ public static class RuinsBase extends MapGenRuins {
+
+ private static final String owner = "Ancient Cultures";
+
+ @Override
+ public boolean generate(World worldObj, Random rand1, int x, int y, int z) {
+
+ for (int i = 0; i < rand1.nextInt(144); i++) {
+ rand1.nextLong();
+ }
+
+ Random rand = new XSTR(rand1.nextLong());
+ SecureRandom secureRandom = new SecureRandom();
+
+ if (worldObj.getBlock(x, y, z) == Blocks.air) {
+ while (worldObj.getBlock(x, y, z) == Blocks.air) {
+ y--;
+ }
+ }
+
+ 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();
+ byte set = 0;
+ byte toSet = (byte) (rand.nextInt(maxTierRoss - tier) + 1);
+ short cablemeta = GT_WorldgenUtil.getCable(secureRandom, tier);
+ byte treeinaRow = 0;
+ boolean lastset = rand.nextBoolean();
+ for (int dx = -6; dx <= 6; dx++) {
+ for (int dy = 0; dy <= 8; dy++) {
+ for (int dz = -6; dz <= 6; dz++) {
+ this.setBlock(worldObj, x + dx, y + dy, z + dz, Blocks.air, 0);
+ if (dy == 0) {
+ Pair<Block, Integer> floor = this.ToBuildWith[0][this.statBlocks[0]];
+ this.setBlock(worldObj, x + dx, y + 0, z + dz, floor.getKey(), floor.getValue());
+ } 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]);
+ } 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]);
+ if (dy == 2 && 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]);
+ }
+
+ if (dy == 1) {
+ if (dx == 3 && dz == -3) {
+ this.setBlock(worldObj, x + 3, y + 1, z + dz, Blocks.crafting_table, 0);
+ }
+ if (dx == -3 && (dz == -3 || dz == -2)) {
+ this.setBlock(worldObj, x + -3, y + dy, z + dz, Blocks.chest, 5);
+ IInventory chest = (IInventory) worldObj.getTileEntity(x + dx, y + dy, z + dz);
+ if (chest != null) {
+ WeightedRandomChestContent.generateChestContents(
+ secureRandom,
+ ChestGenHooks.getItems(PYRAMID_JUNGLE_CHEST, rand),
+ chest,
+ ChestGenHooks.getCount(PYRAMID_JUNGLE_CHEST, rand));
+ }
+ }
+
+ if (dx == 4 && dz == 4) {
+ short meta = GT_WorldgenUtil.getGenerator(secureRandom, tier);
+ this.setGTMachine(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ meta,
+ owner,
+ tier > 0 ? ForgeDirection.WEST : ForgeDirection.UP);
+ } else if (dx == 3 && dz == 4) {
+ if (tier > 0) {
+ short meta = GT_WorldgenUtil.getBuffer(secureRandom, tier);
+ this.setGTMachine(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ meta,
+ owner,
+ ForgeDirection.WEST);
+ } else {
+ this.setGTCablekWChance(worldObj, x + dx, y + dy, z + dz, rand, 33, cablemeta);
+ }
+ } else if (dx < 3 && dx > -5 && dz == 4) {
+ this.setGTCablekWChance(worldObj, x + dx, y + dy, z + dz, rand, 33, cablemeta);
+ } else if (dx < 3 && dx > -5 && dz == 3 && set < toSet) {
+ if (!lastset || treeinaRow > 2) {
+ short meta = GT_WorldgenUtil.getMachine(secureRandom, tier);
+ this.setGTMachine(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ meta,
+ owner,
+ ForgeDirection.UP);
+
+ set++;
+ treeinaRow = 0;
+ lastset = true;
+ } else {
+ lastset = rand.nextBoolean();
+ if (lastset) treeinaRow++;
+ }
+ }
+ }
+ } else switch (dy) {
+ case 4:
+ if (Math.abs(dx) == 5) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 4,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ break;
+ }
+ if (Math.abs(dz) == 5 && Math.abs(dx) < 5) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
+ }
+ break;
+ case 5:
+ if (Math.abs(dx) == 4) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 5,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ break;
+ }
+ if (Math.abs(dz) == 5 && Math.abs(dx) < 4) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
+ }
+ break;
+ case 6:
+ if (Math.abs(dx) == 3) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 6,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ break;
+ }
+ if (Math.abs(dz) == 5 && Math.abs(dx) < 3) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
+ }
+ break;
+ case 7:
+ if (Math.abs(dx) == 2) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 7,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ break;
+ }
+ if (Math.abs(dz) == 5 && Math.abs(dx) < 2) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + dy,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[1]);
+ }
+ break;
+ case 8:
+ if (Math.abs(dx) == 1 || Math.abs(dx) == 0) {
+ this.setRandomBlockWAirChance(
+ worldObj,
+ x + dx,
+ y + 8,
+ z + dz,
+ rand,
+ 25,
+ this.ToBuildWith[2]);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ tosetloop: while (set < toSet) {
+ int dy = 1;
+ int dz = 3;
+ for (int dx = 2; dx > -5; dx--) {
+ if (set >= toSet) {
+ break tosetloop;
+ }
+ if (!lastset || treeinaRow > 2 && worldObj.getTileEntity(x + dx, y + dy, z + dz) == null) {
+ short meta = GT_WorldgenUtil.getMachine(secureRandom, tier);
+ this.setGTMachine(worldObj, x + dx, y + dy, z + dz, meta, owner, ForgeDirection.UP);
+
+ set++;
+ treeinaRow = 0;
+ lastset = true;
+ } else {
+ lastset = rand.nextBoolean();
+ if (lastset) {
+ treeinaRow++;
+ }
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
new file mode 100644
index 0000000000..aec0972a67
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps.bacterialVatRecipes;
+import static com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps.bioLabRecipes;
+import static com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps.radioHatchRecipes;
+import static com.github.bartimaeusnek.bartworks.util.BW_Util.calculateSv;
+import static com.github.bartimaeusnek.bartworks.util.BW_Util.specialToByte;
+
+import javax.annotation.Nonnegative;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Recipe;
+
+@SuppressWarnings("UnusedReturnValue")
+public class BWRecipes {
+
+ public static final BWRecipes instance = new BWRecipes();
+
+ public static long calcDecayTicks(int x) {
+ long ret;
+ if (x == 43) ret = 5000;
+ else if (x == 61) ret = 4500;
+ else if (x <= 100) ret = MathUtils.ceilLong((8000D * Math.tanh(-x / 20D) + 8000D) * 1000D);
+ else ret = MathUtils.ceilLong(8000D * Math.tanh(-x / 65D) + 8000D);
+ return ret;
+ }
+
+ public boolean addRadHatch(ItemStack item, int radioLevel, int amount, short[] rgba) {
+ return radioHatchRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ new ItemStack[] { item },
+ null,
+ null,
+ new int[] { rgba[0], rgba[1], rgba[2] },
+ null,
+ null,
+ amount,
+ radioLevel,
+ (int) calcDecayTicks(radioLevel)))
+ != null;
+ }
+
+ public boolean addBioLabRecipe(ItemStack[] aInputs, ItemStack aOutput, ItemStack aSpecialItems, int[] aChances,
+ FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return bioLabRecipes.addRecipe(
+ new GT_Recipe(
+ true,
+ aInputs,
+ new ItemStack[] { aOutput },
+ aSpecialItems,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSpecialValue))
+ != null;
+ }
+
+ public boolean addBioLabRecipeIncubation(ItemStack aInput, BioCulture aOutput, int[] aChances,
+ FluidStack[] aFluidInputs, int aDuration, int aEUt, int aSpecialValue) {
+ return bioLabRecipes.addRecipe(
+ new GT_Recipe(
+ true,
+ new ItemStack[] { BioItemList.getPetriDish(null), aInput },
+ new ItemStack[] { BioItemList.getPetriDish(aOutput) },
+ null,
+ aChances,
+ aFluidInputs,
+ 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 bioLabRecipes.addRecipe(
+ new GT_Recipe(
+ true,
+ new ItemStack[] { BioItemList.getPetriDish(null), aInput },
+ new ItemStack[] { BioItemList.getPetriDish(aOutput) },
+ null,
+ aChances,
+ new FluidStack[] { aFluidInputs },
+ new FluidStack[] { GT_Values.NF },
+ aDuration,
+ aEUt,
+ aSpecialValue))
+ != 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) {
+ int aSievert = 0;
+ if (aSv >= 83 || aSv == 61 || aSv == 43) aSievert += aSv;
+ aSievert = aSievert << 1;
+ aSievert = aSievert | (exactSv ? 1 : 0);
+ aSievert = aSievert << 2;
+ aSievert = aSievert | specialToByte(aSpecialValue);
+ aSievert = aSievert << 4;
+ aSievert = aSievert | glasTier;
+ return bacterialVatRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ aInputs,
+ null,
+ BioItemList.getPetriDish(aCulture),
+ new int[] {},
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSievert))
+ != null;
+ }
+
+ @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) {
+ byte gTier = (byte) glasTier;
+ 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 << 2;
+ aSievert = aSievert | specialToByte(aSpecialValue);
+ aSievert = aSievert << 4;
+ aSievert = aSievert | gTier;
+ return bacterialVatRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ aInputs,
+ null,
+ BioItemList.getPetriDish(aCulture),
+ new int[] {},
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSievert))
+ != null;
+ }
+
+ /**
+ * 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) {
+ int aSievert = 0;
+ aSievert = aSievert | glasTier;
+ return bacterialVatRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ aInputs,
+ null,
+ BioItemList.getPetriDish(culture),
+ new int[] {},
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ aSievert))
+ != null;
+ }
+
+ /**
+ * 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 bacterialVatRecipes.addRecipe(
+ new GT_Recipe(
+ false,
+ aInputs,
+ null,
+ BioItemList.getPetriDish(culture),
+ new int[] {},
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUt,
+ 0))
+ != null;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java
new file mode 100644
index 0000000000..2e384c8e0c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java
@@ -0,0 +1,220 @@
+/*
+ * 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;
+
+@SuppressWarnings("unused")
+public class BW_ColorUtil {
+
+ private BW_ColorUtil() {}
+
+ public static byte getDarknessFromColor(short[] rgba, int index) {
+ int g = rgba[index];
+ if (g >= 0 && g < 64) return 0;
+ if (g >= 64 && g < 160) return 1;
+ else if (g >= 160 && g < 223) return 2;
+ else if (g >= 233 && g <= 255) return 3;
+ return 4;
+ }
+
+ public static Dyes getDyeFromColor(short[] rgba) {
+ rgba = correctCorlorArray(rgba);
+ if (isGrayScale(rgba, 2)) {
+ switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ return Dyes.dyeBlack;
+ case 1:
+ return Dyes.dyeGray;
+ case 2:
+ return Dyes.dyeLightGray;
+ case 3:
+ return Dyes.dyeWhite;
+ }
+ } else {
+ short[] tmp = roundColor(rgba, 2);
+ if (isRedScale(tmp)) {
+ if (isPurpleScale(tmp)) {
+ switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ case 1:
+ if (rgba[3] - 50 > rgba[0]) return Dyes.dyePurple;
+ else return Dyes.dyeRed;
+ case 2:
+ 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
+ && rgba[1] >> 4 == rgba[2] >> 4
+ && rgba[1] + 50 > rgba[0]) {
+ 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;
+ }
+ return Dyes.dyePink;
+ }
+ 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)) {
+ 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:
+ return Dyes.dyeGreen;
+ case 2:
+ case 3:
+ return Dyes.dyeLime;
+ }
+ } else if (isBlueScale(tmp)) {
+ if (isPurpleScale(tmp)) {
+ switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ case 1:
+ return Dyes.dyePurple;
+ case 2:
+ case 3:
+ return Dyes.dyeMagenta;
+ }
+ } else if (isCyanScale(tmp)) {
+ return Dyes.dyeCyan;
+ }
+ switch (getDarknessFromColor(rgba, 0)) {
+ case 0:
+ case 1:
+ return Dyes.dyeBlue;
+ case 2:
+ case 3:
+ return Dyes.dyeLightBlue;
+ }
+ }
+ }
+ return Dyes._NULL;
+ }
+
+ public static boolean isCyanScale(short[] rgba) {
+ return !isRedScale(rgba);
+ }
+
+ public static boolean isPurpleScale(short[] rgba) {
+ return !isGrenScale(rgba);
+ }
+
+ public static boolean isYellowScale(short[] rgba) {
+ return !isBlueScale(rgba);
+ }
+
+ public static boolean isBlueScale(short[] rgba) {
+ rgba = correctCorlorArray(rgba);
+ return rgba[2] * 2 >= rgba[1] + rgba[0];
+ }
+
+ public static boolean isGrenScale(short[] rgba) {
+ rgba = correctCorlorArray(rgba);
+ return rgba[1] * 2 >= rgba[0] + rgba[2];
+ }
+
+ public static boolean isRedScale(short[] rgba) {
+ rgba = correctCorlorArray(rgba);
+ return rgba[0] * 2 >= rgba[1] + rgba[2];
+ }
+
+ public static boolean isGrayScale(short[] rgba, int magin) {
+ rgba = correctCorlorArray(rgba);
+ return rgba[0] >> magin == rgba[1] >> magin && rgba[1] >> magin == rgba[2] >> magin;
+ }
+
+ public static short[] roundColor(short[] rgba, int magin) {
+ short[] tmp = Arrays.copyOf(rgba, 4);
+ tmp[0] = (short) (rgba[0] >> magin);
+ tmp[1] = (short) (rgba[1] >> magin);
+ tmp[2] = (short) (rgba[2] >> magin);
+ return tmp;
+ }
+
+ public static boolean isGrayScale(short[] rgba) {
+ rgba = correctCorlorArray(rgba);
+ return rgba[0] == rgba[1] && rgba[1] == rgba[2];
+ }
+
+ public static short[] correctCorlorArray(short[] rgba) {
+ if (rgba.length > 4) {
+ rgba = Arrays.copyOfRange(rgba, 0, 4);
+ }
+ if (rgba.length < 4) {
+ short[] tmp = Arrays.copyOf(rgba, 4);
+ Arrays.fill(tmp, rgba.length, 4, (short) 0);
+ rgba = tmp;
+ }
+ if (rgba[0] > 255) rgba[0] = 255;
+ if (rgba[1] > 255) rgba[1] = 255;
+ if (rgba[2] > 255) rgba[2] = 255;
+ if (rgba[3] > 255) rgba[3] = 255;
+ if (rgba[0] < 0) rgba[0] = 0;
+ if (rgba[1] < 0) rgba[1] = 0;
+ if (rgba[2] < 0) rgba[2] = 0;
+ if (rgba[3] < 0) rgba[3] = 0;
+ return rgba;
+ }
+
+ public static short[] splitColorToRBGArray(int rgb) {
+ return new short[] { (short) (rgb >> 16 & 0xFF), (short) (rgb >> 8 & 0xFF), (short) (rgb & 0xFF) };
+ }
+
+ public static int getColorFromRGBArray(short[] color) {
+ return (color[0] & 0x0ff) << 16 | (color[1] & 0x0ff) << 8 | color[2] & 0x0ff;
+ }
+
+ public static int getColorFromRGBArray(int[] color) {
+ return (color[0] & 0x0ff) << 16 | (color[1] & 0x0ff) << 8 | color[2] & 0x0ff;
+ }
+
+ public static String getColorForTier(int tier) {
+ return GT_Values.TIER_COLORS[tier];
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java
new file mode 100644
index 0000000000..b68f3fb437
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraft.util.EnumChatFormatting.BLUE;
+import static net.minecraft.util.EnumChatFormatting.DARK_BLUE;
+import static net.minecraft.util.EnumChatFormatting.GRAY;
+import static net.minecraft.util.EnumChatFormatting.GREEN;
+
+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 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 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!";
+
+ public static String[] getTranslatedBrandedTooltip(String key) {
+ String[] dsc = StatCollector.translateToLocal(key)
+ .split(";");
+ String[] fdsc = new String[dsc.length + 1];
+ System.arraycopy(dsc, 0, fdsc, 0, dsc.length);
+ fdsc[dsc.length] = ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get();
+ return fdsc;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
new file mode 100644
index 0000000000..38982f35b3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
@@ -0,0 +1,803 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.D1;
+import static gregtech.api.enums.GT_Values.E;
+import static gregtech.api.enums.GT_Values.M;
+import static gregtech.api.enums.GT_Values.VN;
+import static gregtech.api.enums.GT_Values.W;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+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;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.CraftingManager;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+import net.minecraftforge.oredict.ShapedOreRecipe;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+
+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.objects.ItemData;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Shaped_Recipe;
+import gregtech.api.util.GT_Utility;
+
+public class BW_Util {
+
+ public static final int STANDART = 0;
+ public static final int LOWGRAVITY = -100;
+ public static final int CLEANROOM = -200;
+
+ public static String translateGTItemStack(ItemStack itemStack) {
+ if (!GT_Utility.isStackValid(itemStack)) return "Not a Valid ItemStack:" + itemStack;
+ String ret = GT_LanguageManager.getTranslation(GT_LanguageManager.getTranslateableItemStackName(itemStack));
+ if (!ret.contains("%material")) return ret;
+ String matname = "";
+ if (BW_Util.checkStackAndPrefix(itemStack))
+ matname = GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial.mDefaultLocalName;
+ return ret.replace("%material", matname);
+ }
+
+ public static void set2DCoordTo1DArray(int indexX, int indexY, int sizeY, Object value, Object[] array) {
+ int index = indexX * sizeY + indexY;
+ array[index] = value;
+ }
+
+ public static Object get2DCoordFrom1DArray(int indexX, int indexY, int sizeY, Object[] array) {
+ int index = indexX * sizeY + indexY;
+ return array[index];
+ }
+
+ public static GT_Recipe copyAndSetTierToNewRecipe(GT_Recipe recipe, byte tier) {
+ byte oldTier = GT_Utility.getTier(recipe.mEUt);
+ int newTime = recipe.mDuration;
+ int newVoltage = recipe.mEUt;
+ if (tier < oldTier) {
+ newTime <<= oldTier - tier;
+ newVoltage >>= 2 * (oldTier - tier);
+ } else {
+ newTime >>= tier - oldTier;
+ newVoltage <<= 2 * (tier - oldTier);
+ }
+ recipe.mEUt = newVoltage;
+ recipe.mDuration = newTime;
+ return recipe;
+ }
+
+ public static String subscriptNumbers(String b) {
+ char[] chars = b.toCharArray();
+ char[] nu = new char[chars.length];
+ for (int i = 0; i < chars.length; i++) {
+ nu[i] = switch (chars[i]) {
+ case '0' -> '\u2080';
+ case '1' -> '\u2081';
+ case '2' -> '\u2082';
+ case '3' -> '\u2083';
+ case '4' -> '\u2084';
+ case '5' -> '\u2085';
+ case '6' -> '\u2086';
+ case '7' -> '\u2087';
+ case '8' -> '\u2088';
+ case '9' -> '\u2089';
+ default -> chars[i];
+ };
+ }
+ return new String(nu);
+ }
+
+ public static String subscriptNumber(Number b) {
+ char[] chars = Long.toString(b.longValue())
+ .toCharArray();
+ char[] nu = new char[chars.length];
+ for (int i = 0; i < chars.length; i++) {
+ nu[i] = switch (chars[i]) {
+ case '0' -> '\u2080';
+ case '1' -> '\u2081';
+ case '2' -> '\u2082';
+ case '3' -> '\u2083';
+ case '4' -> '\u2084';
+ case '5' -> '\u2085';
+ case '6' -> '\u2086';
+ case '7' -> '\u2087';
+ case '8' -> '\u2088';
+ case '9' -> '\u2089';
+ default -> chars[i];
+ };
+ }
+ return new String(nu);
+ }
+
+ public static String superscriptNumbers(String b) {
+ char[] chars = b.toCharArray();
+ char[] nu = new char[chars.length];
+ for (int i = 0; i < chars.length; i++) {
+ nu[i] = switch (chars[i]) {
+ case '0' -> '\u2070';
+ case '1' -> '\u2071';
+ case '2' -> '\u00B2';
+ case '3' -> '\u00B3';
+ case '4' -> '\u2074';
+ case '5' -> '\u2075';
+ case '6' -> '\u2076';
+ case '7' -> '\u2077';
+ case '8' -> '\u2078';
+ case '9' -> '\u2079';
+ default -> chars[i];
+ };
+ }
+ return new String(nu);
+ }
+
+ public static String superscriptNumber(Number b) {
+ char[] chars = Long.toString(b.longValue())
+ .toCharArray();
+ char[] nu = new char[chars.length];
+ for (int i = 0; i < chars.length; i++) {
+ nu[i] = switch (chars[i]) {
+ case '0' -> '\u2070';
+ case '1' -> '\u2071';
+ case '2' -> '\u00B2';
+ case '3' -> '\u00B3';
+ case '4' -> '\u2074';
+ case '5' -> '\u2075';
+ case '6' -> '\u2076';
+ case '7' -> '\u2077';
+ case '8' -> '\u2078';
+ case '9' -> '\u2079';
+ default -> chars[i];
+ };
+ }
+ return new String(nu);
+ }
+
+ public static byte specialToByte(int aSpecialValue) {
+ byte special = 0;
+ switch (aSpecialValue) {
+ case LOWGRAVITY:
+ special = 1;
+ break;
+ case CLEANROOM:
+ special = 2;
+ break;
+ case LOWGRAVITY | CLEANROOM:
+ special = 3;
+ break;
+ default:
+ break;
+ }
+ return special;
+ }
+
+ public static int calculateSv(Materials materials) {
+ 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());
+ }
+
+ public static ItemStack setStackSize(ItemStack stack, int size) {
+ if (stack != null) stack.stackSize = size;
+ return stack;
+ }
+
+ public static boolean checkStackAndPrefix(ItemStack itemStack) {
+ 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 int abstractHashGTRecipe(GT_Recipe recipe) {
+ int hash = 31;
+ hash += recipe.mDuration / 20 * 31;
+ hash += GT_Utility.getTier(recipe.mEUt) * 31;
+ hash += BW_Util.specialToByte(recipe.mSpecialValue) * 31;
+ hash += recipe.mInputs.length * 31;
+ for (ItemStack mInput : recipe.mInputs) {
+ if (mInput != null) {
+ hash += mInput.stackSize * 31;
+ hash += Item.getIdFromItem(mInput.getItem()) * 31;
+ }
+ }
+ hash += recipe.mOutputs.length * 31;
+ for (ItemStack mOutput : recipe.mOutputs) {
+ if (mOutput != null) {
+ hash += mOutput.stackSize * 31;
+ hash += Item.getIdFromItem(mOutput.getItem()) * 31;
+ }
+ }
+ hash += recipe.mFluidInputs.length * 31;
+ for (FluidStack mInput : recipe.mFluidInputs) {
+ if (mInput != null) {
+ hash += mInput.amount * 31;
+ hash += mInput.getFluidID() * 31;
+ }
+ }
+ hash += recipe.mFluidOutputs.length * 31;
+ for (FluidStack mOutput : recipe.mFluidOutputs) {
+ if (mOutput != null) {
+ hash += mOutput.amount * 31;
+ hash += mOutput.getFluidID() * 31;
+ }
+ }
+ return hash;
+ }
+
+ @SuppressWarnings({ "unchecked" })
+ public static <T> T[] copyAndRemoveNulls(T[] input, Class<T> clazz) {
+ List<T> ret = Arrays.stream(input)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toList());
+
+ if (ret.size() <= 0) return (T[]) Array.newInstance(clazz, 0);
+
+ T[] retArr = (T[]) Array.newInstance(clazz, ret.size());
+
+ for (int i = 0; i < ret.size(); i++) retArr[i] = ret.get(i);
+
+ return retArr;
+ }
+
+ @Deprecated
+ public static int getMachineVoltageFromTier(int tier) {
+ return (int) (30 * Math.pow(4, tier - 1));
+ }
+
+ public static long getTierVoltage(int tier) {
+ return getTierVoltage((byte) tier);
+ }
+
+ public static long getTierVoltage(byte tier) {
+ return 8L << 2 * tier;
+ }
+
+ public static byte getTier(long voltage) {
+ if (voltage <= Integer.MAX_VALUE - 7) return GT_Utility.getTier(voltage);
+ byte t = 0;
+ while (voltage > 8L) {
+ voltage >>= 2;
+ t++;
+ }
+ return t;
+ }
+
+ public static String getTierName(byte tier) {
+ if (VN.length - 1 <= tier) return "MAX+";
+ return VN[tier];
+ }
+
+ public static String getTierNameFromVoltage(long voltage) {
+ return getTierName(getTier(voltage));
+ }
+
+ public static boolean areStacksEqualOrNull(ItemStack aStack1, ItemStack aStack2) {
+ return aStack1 == null && aStack2 == null || GT_Utility.areStacksEqual(aStack1, aStack2);
+ }
+
+ public static boolean areStacksEqualOrEachNull(ItemStack aStack1, ItemStack aStack2) {
+ return aStack1 == null || aStack2 == null || GT_Utility.areStacksEqual(aStack1, aStack2);
+ }
+
+ public static byte getByteFromRarity(EnumRarity rarity) {
+ if (EnumRarity.uncommon.equals(rarity)) return 1;
+ if (EnumRarity.epic.equals(rarity)) return 2;
+ else if (EnumRarity.rare.equals(rarity)) return 3;
+ return 0;
+ }
+
+ /**
+ * @deprecated Use stuff in {@link com.github.bartimaeusnek.bartworks.API.BorosilicateGlass} instead
+ */
+ @Deprecated
+ public static byte getTierFromGlasMeta(int meta) {
+ return switch (meta) {
+ case 1 -> 4;
+ case 2, 12 -> 5;
+ case 3 -> 6;
+ case 4 -> 7;
+ case 5 -> 8;
+ case 13 -> 9;
+ case 14 -> 10;
+ default -> 3;
+ };
+ }
+
+ public static EnumRarity getRarityFromByte(byte b) {
+ return switch (b) {
+ case 1 -> EnumRarity.uncommon;
+ case 2 -> EnumRarity.rare;
+ case 3 -> EnumRarity.epic;
+ default -> EnumRarity.common;
+ };
+ }
+
+ public static byte getCircuitTierFromOreDictName(String name) {
+ return switch (name) {
+ case "circuitPrimitive" -> 0;
+ case "circuitBasic" -> 1;
+ case "circuitGood" -> 2;
+ case "circuitAdvanced" -> 3;
+ case "circuitData" -> 4;
+ case "circuitElite" -> 5;
+ case "circuitMaster" -> 6;
+ case "circuitUltimate" -> 7;
+ case "circuitSuperconductor" -> 8;
+ case "circuitInfinite" -> 9;
+ case "circuitBio" -> 10;
+ case "circuitNano", "circuitOptical" -> 11;
+ case "circuitPiko", "circuitExotic" -> 12;
+ case "circuitQuantum", "circuitCosmic" -> 13;
+ case "circuitTranscendent" -> 14;
+ default -> -1;
+ };
+ }
+
+ public static byte getCircuitTierFromItemStack(ItemStack stack) {
+ for (String oreName : getOreNames(stack)) {
+ byte tier = getCircuitTierFromOreDictName(oreName);
+ if (tier != -1) {
+ return tier;
+ }
+ }
+ return -1;
+ }
+
+ public static boolean isTieredCircuit(ItemStack stack) {
+ return getCircuitTierFromItemStack(stack) != -1;
+ }
+
+ public static List<String> getOreNames(ItemStack stack) {
+ List<String> ret = new ArrayList<>();
+ for (int oreID : OreDictionary.getOreIDs(stack)) {
+ ret.add(OreDictionary.getOreName(oreID));
+ }
+ return ret;
+ }
+
+ public static byte calculateGlassTier(@Nonnull Block block, @Nonnegative byte meta) {
+
+ byte boroTier = BorosilicateGlass.getTier(block, meta);
+ if (boroTier != -1) return boroTier;
+
+ if ("blockAlloyGlass".equals(block.getUnlocalizedName())) return 4;
+
+ if (block.equals(Blocks.glass)) return 3;
+
+ for (BioVatLogicAdder.BlockMetaPair B : BioVatLogicAdder.BioVatGlass.getGlassMap()
+ .keySet())
+ if (B.getBlock()
+ .equals(block)
+ && B.getaByte()
+ .equals(meta))
+ return BioVatLogicAdder.BioVatGlass.getGlassMap()
+ .get(B);
+
+ if (block.getMaterial()
+ .equals(Material.glass)) return 3;
+
+ return 0;
+ }
+
+ 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<>() {
+
+ 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));
+ // is not a glass ?
+ if (glasstier == 0 || glasstier == notset || glasstier < mintier || glasstier > maxtier) return false;
+ if (getter.apply(te) == notset) setter.accept(te, glasstier);
+ return getter.apply(te) == glasstier;
+ }
+
+ @Override
+ public boolean spawnHint(T te, World world, int x, int y, int z, ItemStack itemStack) {
+ StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), aDots - 1);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return this.placementDelegate.placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
+ return this.placementDelegate.survivalPlaceBlock(t, world, x, y, z, trigger, env);
+ }
+ };
+ }
+
+ public static <T> IStructureElement<T> ofGlassTieredMixed(byte mintier, byte maxtier, int aDots) {
+ return new IStructureElement<>() {
+
+ 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));
+ if (glasstier == 0) return false; // is not a glass ?
+ return glasstier >= mintier && glasstier <= maxtier;
+ }
+
+ @Override
+ public boolean spawnHint(T te, World world, int x, int y, int z, ItemStack itemStack) {
+ StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), aDots - 1);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return this.placementDelegate.placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
+ return this.placementDelegate.survivalPlaceBlock(t, world, x, y, z, trigger, env);
+ }
+ };
+ }
+
+ private static Field sBufferedRecipeList;
+
+ @SuppressWarnings("unchecked")
+ public static List<IRecipe> getGTBufferedRecipeList()
+ throws SecurityException, IllegalArgumentException, IllegalAccessException {
+ if (sBufferedRecipeList == null) {
+ sBufferedRecipeList = FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true);
+ }
+ if (sBufferedRecipeList == null) {
+ sBufferedRecipeList = FieldUtils.getField(GT_ModHandler.class, "sBufferRecipeList", true);
+ }
+ return (List<IRecipe>) sBufferedRecipeList.get(null);
+ }
+
+ public static ShapedOreRecipe createGTCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) {
+ return createGTCraftingRecipe(
+ aResult,
+ new Enchantment[0],
+ new int[0],
+ (aBitMask & GT_ModHandler.RecipeBits.MIRRORED) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.BUFFERED) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.KEEPNBT) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DISMANTLEABLE) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.NOT_REMOVABLE) == 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.REVERSIBLE) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0L,
+ (aBitMask & GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0L,
+ aRecipe);
+ }
+
+ 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);
+ if (aRecipe == null || aRecipe.length <= 0) return null;
+
+ boolean tThereWasARecipe = false;
+
+ for (byte i = 0; i < aRecipe.length; i++) {
+ if (aRecipe[i] instanceof IItemContainer itemContainer) {
+ aRecipe[i] = itemContainer.get(1);
+ continue;
+ }
+ if (aRecipe[i] instanceof Enum<?>enum_) {
+ aRecipe[i] = enum_.name();
+ continue;
+ }
+ 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();
+ }
+ }
+
+ try {
+ StringBuilder shape = new StringBuilder(E);
+ int idx = 0;
+ if (aRecipe[idx] instanceof Boolean) {
+ throw new IllegalArgumentException();
+ }
+
+ ArrayList<Object> tRecipeList = new ArrayList<>(Arrays.asList(aRecipe));
+
+ while (aRecipe[idx] instanceof String string) {
+ StringBuilder s = new StringBuilder(string);
+ idx++;
+ shape.append(s);
+ while (s.length() < 3) s.append(" ");
+ if (s.length() > 3) throw new IllegalArgumentException();
+
+ for (char c : s.toString()
+ .toCharArray()) {
+ switch (c) {
+ case 'b':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolBlade.name());
+ break;
+ case 'c':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolCrowbar.name());
+ break;
+ case 'd':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolScrewdriver.name());
+ break;
+ case 'f':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolFile.name());
+ break;
+ case 'h':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolHardHammer.name());
+ break;
+ case 'i':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolSolderingIron.name());
+ break;
+ case 'j':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolSolderingMetal.name());
+ break;
+ case 'k':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolKnife.name());
+ break;
+ case 'm':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolMortar.name());
+ break;
+ case 'p':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolDrawplate.name());
+ break;
+ case 'r':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolSoftHammer.name());
+ break;
+ case 's':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolSaw.name());
+ break;
+ case 'w':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolWrench.name());
+ break;
+ case 'x':
+ tRecipeList.add(c);
+ tRecipeList.add(ToolDictNames.craftingToolWireCutter.name());
+ break;
+ }
+ }
+ }
+
+ aRecipe = tRecipeList.toArray();
+
+ if (aRecipe[idx] instanceof Boolean) {
+ idx++;
+ }
+ Map<Character, ItemStack> tItemStackMap = new HashMap<>();
+ Map<Character, ItemData> tItemDataMap = new HashMap<>();
+ tItemStackMap.put(' ', null);
+
+ boolean tRemoveRecipe = true;
+
+ 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()));
+ for (Object tContent : aRecipe) GT_Log.err.println(tContent);
+ }
+ return null;
+ }
+ Character chr = (Character) aRecipe[idx];
+ Object in = aRecipe[idx + 1];
+ if (in instanceof ItemStack) {
+ tItemStackMap.put(chr, GT_Utility.copy(in));
+ tItemDataMap.put(chr, GT_OreDictUnificator.getItemData((ItemStack) in));
+ } else if (in instanceof ItemData) {
+ String tString = in.toString();
+ switch (tString) {
+ case "plankWood":
+ tItemDataMap.put(chr, new ItemData(Materials.Wood, M));
+ break;
+ case "stoneNetherrack":
+ tItemDataMap.put(chr, new ItemData(Materials.Netherrack, M));
+ break;
+ case "stoneObsidian":
+ tItemDataMap.put(chr, new ItemData(Materials.Obsidian, M));
+ break;
+ case "stoneEndstone":
+ tItemDataMap.put(chr, new ItemData(Materials.Endstone, M));
+ break;
+ default:
+ tItemDataMap.put(chr, (ItemData) in);
+ break;
+ }
+ ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1);
+ if (tStack == null) tRemoveRecipe = false;
+ else tItemStackMap.put(chr, tStack);
+ aRecipe[idx + 1] = in.toString();
+ } else if (in instanceof String) {
+ if (in.equals(OreDictNames.craftingChest.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Wood, M * 8));
+ else if (in.equals(OreDictNames.craftingBook.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Paper, M * 3));
+ else if (in.equals(OreDictNames.craftingPiston.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Stone, M * 4, Materials.Wood, M * 3));
+ else if (in.equals(OreDictNames.craftingFurnace.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Stone, M * 8));
+ else if (in.equals(OreDictNames.craftingIndustrialDiamond.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Diamond, M));
+ else if (in.equals(OreDictNames.craftingAnvil.toString()))
+ tItemDataMap.put(chr, new ItemData(Materials.Iron, M * 10));
+ ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1);
+ if (tStack == null) tRemoveRecipe = false;
+ else tItemStackMap.put(chr, tStack);
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ if (aReversible && aResult != null) {
+ ItemData[] tData = new ItemData[9];
+ int x = -1;
+ for (char chr : shape.toString()
+ .toCharArray()) {
+ x++;
+ tData[x] = tItemDataMap.get(chr);
+ }
+ if (GT_Utility.arrayContainsNonNull(tData))
+ GT_OreDictUnificator.addItemData(aResult, new ItemData(tData));
+ }
+
+ if (aCheckForCollisions && tRemoveRecipe) {
+ ItemStack[] tRecipe = new ItemStack[9];
+ int x = -1;
+ for (char chr : shape.toString()
+ .toCharArray()) {
+ x++;
+ tRecipe[x] = tItemStackMap.get(chr);
+ if (tRecipe[x] != null && Items.feather.getDamage(tRecipe[x]) == W)
+ Items.feather.setDamage(tRecipe[x], 0);
+ }
+ tThereWasARecipe = GT_ModHandler.removeRecipe(tRecipe) != null;
+ }
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
+
+ if (aResult == null || aResult.stackSize <= 0) return null;
+
+ if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT
+ || aRemoveAllOtherShapedsWithSameOutput
+ || aRemoveAllOtherNativeRecipes)
+ tThereWasARecipe = GT_ModHandler.removeRecipeByOutput(
+ aResult,
+ !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT,
+ aRemoveAllOtherShapedsWithSameOutput,
+ aRemoveAllOtherNativeRecipes) || tThereWasARecipe;
+
+ if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tThereWasARecipe) {
+ 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_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, true)) {
+ tList.remove(i);
+ i--;
+ tList_sS = tList.size();
+ tThereWasARecipe = true;
+ }
+ }
+ }
+
+ if (Items.feather.getDamage(aResult) == W || Items.feather.getDamage(aResult) < 0)
+ Items.feather.setDamage(aResult, 0);
+
+ GT_Utility.updateItemStack(aResult);
+
+ return new GT_Shaped_Recipe(
+ GT_Utility.copy(aResult),
+ aDismantleable,
+ aRemovable,
+ aKeepNBT,
+ aEnchantmentsAdded,
+ aEnchantmentLevelsAdded,
+ aRecipe).setMirrored(aMirrored);
+ }
+
+ public static void shortSleep(long nanos) {
+ try {
+ long start = System.nanoTime();
+ long end;
+ do {
+ end = System.nanoTime();
+ } while (start + nanos >= end);
+ } catch (Exception e) {
+ MainMod.LOGGER.catching(e);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java
new file mode 100644
index 0000000000..c4ff2f721c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.awt.Color;
+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 String getLocalisedName() {
+ return GT_LanguageManager.getTranslation(this.getName());
+ }
+
+ public void setLocalisedName(String localisedName) {
+ GT_LanguageManager.addStringLocalization(this.getName(), localisedName);
+ }
+
+ Color color;
+ BioPlasmid plasmid;
+ BioDNA dDNA;
+ boolean bBreedable;
+ Fluid mFluid;
+
+ 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;
+ this.dDNA = dDNA;
+ this.bBreedable = bBreedable;
+ }
+
+ protected BioCulture(Color color, String name, int ID, BioPlasmid plasmid, BioDNA dDNA) {
+ super(name, ID, dDNA.getRarity());
+ this.color = color;
+ this.plasmid = plasmid;
+ this.dDNA = dDNA;
+ }
+
+ 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);
+ BIO_CULTURE_ARRAY_LIST.add(ret);
+ return ret;
+ }
+
+ public static NBTTagCompound getNBTTagFromCulture(BioCulture bioCulture) {
+ if (bioCulture == null) return new NBTTagCompound();
+ NBTTagCompound ret = new NBTTagCompound();
+ ret.setString("Name", bioCulture.name);
+ // ret.setInteger("ID", bioCulture.ID);
+ ret.setIntArray(
+ "Color",
+ 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);
+ ret.setByte("Rarety", BW_Util.getByteFromRarity(bioCulture.rarity));
+ if (bioCulture.bBreedable) ret.setString(
+ "Fluid",
+ bioCulture.getFluid()
+ .getName());
+ return ret;
+ }
+
+ public static BioCulture getBioCultureFromNBTTag(NBTTagCompound tag) {
+ 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.bBreedable) ret.setFluid(FluidRegistry.getFluid(tag.getString("Fluid")));
+ if (ret.getFluidNotSet()) // should never happen, but better safe than sorry
+ ret.setbBreedable(false);
+ return ret;
+ }
+
+ public static BioCulture getBioCulture(String Name) {
+ if (Name == null || Name.isEmpty()) return null;
+ for (BioCulture b : BIO_CULTURE_ARRAY_LIST) if (b.name.equals(Name)) return b;
+ return null;
+ }
+
+ public static BioCulture getBioCulture(BioDNA DNA) {
+ for (BioCulture b : BIO_CULTURE_ARRAY_LIST) if (b.getdDNA()
+ .equals(DNA)) return b;
+ return null;
+ }
+
+ public Fluid getFluid() {
+ if (this.mFluid == null)
+ throw new IllegalStateException("Fluid has not been set yet! The issuring Culture is: " + this.name);
+ return this.mFluid;
+ }
+
+ public void setFluid(Fluid mFluid) {
+ this.mFluid = mFluid;
+ }
+
+ public boolean getFluidNotSet() {
+ return this.mFluid == null && this.isBreedable();
+ }
+
+ public boolean isBreedable() {
+ return this.bBreedable;
+ }
+
+ public void setbBreedable(boolean bBreedable) {
+ this.bBreedable = bBreedable;
+ }
+
+ public int getColorRGB() {
+ return BW_ColorUtil
+ .getColorFromRGBArray(new int[] { this.color.getRed(), this.color.getGreen(), this.color.getBlue() });
+ }
+
+ public Color getColor() {
+ return this.color;
+ }
+
+ public void setColor(Color color) {
+ this.color = color;
+ }
+
+ public BioPlasmid getPlasmid() {
+ return this.plasmid;
+ }
+
+ public BioCulture setPlasmid(BioPlasmid plasmid) {
+ return this.checkForExisting(
+ new BioCulture(this.color, this.name, this.ID, plasmid, this.dDNA, this.rarity, this.bBreedable));
+ }
+
+ private BioCulture checkForExisting(BioCulture culture) {
+ if (culture == null) return null;
+ for (BioCulture bc : BioCulture.BIO_CULTURE_ARRAY_LIST) if (culture.getdDNA()
+ .equals(bc.getdDNA())
+ && culture.getPlasmid()
+ .equals(bc.getPlasmid()))
+ return bc;
+ return culture;
+ }
+
+ public BioCulture setPlasmidUnsafe(BioPlasmid plasmid) {
+ this.plasmid = plasmid;
+ return this;
+ }
+
+ public BioDNA getdDNA() {
+ return this.dDNA;
+ }
+
+ public BioCulture setdDNA(BioDNA dDNA) {
+ return this.checkForExisting(
+ new BioCulture(this.color, this.name, this.ID, this.plasmid, dDNA, this.rarity, this.bBreedable));
+ }
+
+ public BioCulture setdDNAUnsafe(BioDNA dDNA) {
+ this.dDNA = dDNA;
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass() || !super.equals(o)) return false;
+ BioCulture culture = (BioCulture) o;
+ 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);
+ }
+
+ @Override
+ 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) (this.isBreedable() ? 1 : 0))
+ .array(),
+ 0,
+ 17,
+ 31);
+ }
+
+ @Override
+ public short[] getRGBA() {
+ return new short[] { (short) this.getColor()
+ .getRed(),
+ (short) this.getColor()
+ .getGreen(),
+ (short) this.getColor()
+ .getBlue(),
+ (short) this.getColor()
+ .getAlpha() };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java
new file mode 100644
index 0000000000..22edd60170
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioDNA.java
@@ -0,0 +1,51 @@
+/*
+ * 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 net.minecraft.item.EnumRarity;
+
+public class BioDNA extends BioData {
+
+ public static final BioDNA NULLDNA = createAndRegisterBioDNA("", EnumRarity.epic);
+
+ protected BioDNA(String name, int ID, EnumRarity rarity) {
+ super(name, ID, rarity);
+ }
+
+ protected BioDNA(BioData bioData) {
+ super(bioData);
+ this.name = bioData.name;
+ this.ID = bioData.ID;
+ this.rarity = bioData.rarity;
+ }
+
+ public static BioDNA convertDataToDNA(BioData bioData) {
+ return new BioDNA(bioData);
+ }
+
+ public static BioDNA createAndRegisterBioDNA(String aName, EnumRarity rarity) {
+ BioData ret = BioData.createAndRegisterBioData(aName, rarity);
+ return new BioDNA(ret);
+ }
+
+ public static BioDNA createAndRegisterBioDNA(String aName, EnumRarity rarity, int chance, int tier) {
+ BioData ret = BioData.createAndRegisterBioData(aName, rarity, chance, tier);
+ return new BioDNA(ret);
+ }
+
+ @Override
+ public String toString() {
+ return "BioDNA{" + "name='" + this.name + '\'' + ", ID=" + this.ID + '}';
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java
new file mode 100644
index 0000000000..7a4c87f7d2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioData.java
@@ -0,0 +1,173 @@
+/*
+ * 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.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;
+ protected int ID;
+ protected EnumRarity rarity;
+ protected int chance;
+ protected int tier;
+
+ protected BioData(String name, int ID, EnumRarity rarity, int chance, int tier) {
+ this.name = name;
+ this.ID = ID;
+ this.rarity = rarity;
+ this.chance = chance;
+ this.tier = tier;
+ }
+
+ protected BioData(String name, int ID, EnumRarity rarity) {
+ this.name = name;
+ this.ID = ID;
+ this.rarity = rarity;
+ this.chance = 7500;
+ this.tier = 0;
+ }
+
+ protected BioData(BioData bioData) {
+ this.rarity = bioData.rarity;
+ this.name = bioData.name;
+ this.ID = bioData.ID;
+ this.chance = bioData.chance;
+ this.tier = bioData.tier;
+ }
+
+ public static BioData convertBioPlasmidToBioData(BioPlasmid bioPlasmid) {
+ return new BioData(bioPlasmid.name, bioPlasmid.ID, bioPlasmid.rarity, bioPlasmid.chance, bioPlasmid.tier);
+ }
+
+ public static BioData convertBioDNAToBioData(BioDNA bioDNA) {
+ return new BioData(bioDNA.name, bioDNA.ID, bioDNA.rarity, bioDNA.chance, bioDNA.tier);
+ }
+
+ public static BioData createAndRegisterBioData(String aName, EnumRarity rarity, int chance, int tier) {
+ BioData ret = new BioData(aName, BIO_DATA_ARRAY_LIST.size(), rarity, chance, tier);
+ BIO_DATA_ARRAY_LIST.add(ret);
+ return ret;
+ }
+
+ public static BioData createAndRegisterBioData(String aName, EnumRarity rarity) {
+ BioData ret = new BioData(aName, BIO_DATA_ARRAY_LIST.size(), rarity);
+ BIO_DATA_ARRAY_LIST.add(ret);
+ return ret;
+ }
+
+ public static NBTTagCompound getNBTTagFromBioData(BioData bioData) {
+ NBTTagCompound ret = new NBTTagCompound();
+ ret.setByte("Rarity", BW_Util.getByteFromRarity(bioData.rarity));
+ ret.setString("Name", bioData.name);
+ // ret.setInteger("ID", bioData.ID); buggy when load Order changes
+ ret.setInteger("Chance", bioData.chance);
+ ret.setInteger("Tier", bioData.tier);
+ return ret;
+ }
+
+ public static BioData getBioDataFromNBTTag(NBTTagCompound tag) {
+ if (tag == null) return null;
+ return getBioDataFromName(tag.getString("Name"));
+ }
+
+ public static BioData getBioDataFromName(String Name) {
+ for (BioData bd : BIO_DATA_ARRAY_LIST) if (bd.name.equals(Name)) return bd;
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ 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()
+ && Objects.equals(this.getName(), bioData.getName())
+ && this.getRarity() == bioData.getRarity();
+ }
+
+ @Override
+ 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(),
+ 0,
+ 13,
+ 31);
+ }
+
+ public int getTier() {
+ return this.tier;
+ }
+
+ public void setTier(int tier) {
+ this.tier = tier;
+ }
+
+ @Override
+ public String toString() {
+ return "BioData{" + "name='" + this.name + '\'' + ", ID=" + this.ID + '}';
+ }
+
+ public EnumRarity getRarity() {
+ return this.rarity;
+ }
+
+ public void setRarity(EnumRarity rarity) {
+ this.rarity = rarity;
+ }
+
+ public int getChance() {
+ return this.chance;
+ }
+
+ public void setChance(int chance) {
+ this.chance = chance;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * DO NOT USE GET ID TO GET THE OBJECT! THIS SHOULD ONLY BE USED FOR COMPARISON!
+ *
+ * @return the position in the loading list
+ */
+ public int getID() {
+ return this.ID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java
new file mode 100644
index 0000000000..0d40d9deca
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/BioPlasmid.java
@@ -0,0 +1,51 @@
+/*
+ * 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 net.minecraft.item.EnumRarity;
+
+public class BioPlasmid extends BioData {
+
+ public static final BioPlasmid NULLPLASMID = convertDataToPlasmid(BioData.convertBioDNAToBioData(BioDNA.NULLDNA));
+
+ private BioPlasmid(String name, int ID, EnumRarity rarity) {
+ super(name, ID, rarity);
+ }
+
+ protected BioPlasmid(BioData bioData) {
+ super(bioData);
+ this.name = bioData.name;
+ this.ID = bioData.ID;
+ this.rarity = bioData.rarity;
+ }
+
+ public static BioPlasmid convertDataToPlasmid(BioData bioData) {
+ return new BioPlasmid(bioData);
+ }
+
+ public static BioPlasmid createAndRegisterBioPlasmid(String aName, EnumRarity rarity) {
+ BioData ret = BioData.createAndRegisterBioData(aName, rarity);
+ return new BioPlasmid(ret);
+ }
+
+ public static BioPlasmid createAndRegisterBioPlasmid(String aName, EnumRarity rarity, int chance, int tier) {
+ BioData ret = BioData.createAndRegisterBioData(aName, rarity, chance, tier);
+ return new BioPlasmid(ret);
+ }
+
+ @Override
+ public String toString() {
+ return "BioPlasmid{" + "name='" + this.name + '\'' + ", ID=" + this.ID + '}';
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java
new file mode 100644
index 0000000000..063a310db8
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/CachedReflectionUtils.java
@@ -0,0 +1,31 @@
+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();
+
+ public static Field getField(final Class<?> cls, final String fieldName) {
+ return fields.get(cls)
+ .computeIfAbsent(fieldName, f -> FieldUtils.getField(cls, f, true));
+ }
+
+ public static Field getDeclaredField(final Class<?> cls, final String fieldName) {
+ return declaredFields.get(cls)
+ .computeIfAbsent(fieldName, f -> FieldUtils.getDeclaredField(cls, f, true));
+ }
+
+ private static class ConcurrentMapClassValue extends ClassValue<Map<String, Field>> {
+
+ @Override
+ protected Map<String, Field> computeValue(Class<?> type) {
+ return new ConcurrentHashMap<>();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java
new file mode 100644
index 0000000000..f1d6eeedb3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+public class ChatColorHelper {
+
+ private ChatColorHelper() {}
+
+ public static final String BLACK = (char) 167 + "0";
+ public static final String DARKBLUE = (char) 167 + "1";
+ public static final String DARKGREEN = (char) 167 + "2";
+ public static final String DARKAQUA = (char) 167 + "3";
+ public static final String DARKRED = (char) 167 + "4";
+ public static final String DARKPURPLE = (char) 167 + "5";
+ public static final String GOLD = (char) 167 + "6";
+ public static final String GRAY = (char) 167 + "7";
+ public static final String DARKGRAY = (char) 167 + "8";
+ public static final String BLUE = (char) 167 + "9";
+ public static final String GREEN = (char) 167 + "a";
+ public static final String AQUA = (char) 167 + "b";
+ public static final String RED = (char) 167 + "c";
+ public static final String LIGHT_PURPLE = (char) 167 + "d";
+ public static final String YELLOW = (char) 167 + "e";
+ public static final String WHITE = (char) 167 + "f";
+ public static final String OBFUSCATED = (char) 167 + "k";
+ public static final String BOLD = (char) 167 + "l";
+ public static final String STRIKETHROUGH = (char) 167 + "m";
+ public static final String UNDERLINE = (char) 167 + "n";
+ public static final String ITALIC = (char) 167 + "o";
+ public static final String RESET = (char) 167 + "r";
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java
new file mode 100644
index 0000000000..9feb344fa0
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java
@@ -0,0 +1,187 @@
+/*
+ * 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.HashSet;
+
+import net.minecraft.block.Block;
+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);
+
+ public static byte check_sourroundings(Coords C, Block b) {
+ byte ret = 0;
+ World w = DimensionManager.getWorld(C.wID);
+ int x = C.x, y = C.y, z = C.z;
+
+ if (w.getBlock(x + 1, y, z)
+ .equals(b)) ret = (byte) (ret | 0b000100);
+
+ if (w.getBlock(x - 1, y, z)
+ .equals(b)) ret = (byte) (ret | 0b001000);
+
+ if (w.getBlock(x, y, z + 1)
+ .equals(b)) ret = (byte) (ret | 0b010000);
+
+ if (w.getBlock(x, y, z - 1)
+ .equals(b)) ret = (byte) (ret | 0b100000);
+
+ if (w.getBlock(x, y + 1, z)
+ .equals(b)) ret = (byte) (ret | 0b000001);
+
+ if (w.getBlock(x, y - 1, z)
+ .equals(b)) ret = (byte) (ret | 0b000010);
+
+ return ret;
+ }
+
+ public int get_connected(World w, int x, int y, int z, Block b) {
+ int ret = 0;
+
+ int wID = w.provider.dimensionId;
+
+ byte sides = this.check_sourroundings(w, x, y, z, b);
+
+ if ((sides | 0b111011) == 0b111111 && !this.hashset.contains(new Coords(x + 1, y, z, wID))) {
+ ret++;
+ ret += this.get_connected(w, x + 1, y, z, b);
+ }
+
+ if ((sides | 0b110111) == 0b111111 && !this.hashset.contains(new Coords(x - 1, y, z, wID))) {
+ ret++;
+ ret += this.get_connected(w, x - 1, y, z, b);
+ }
+
+ if ((sides | 0b101111) == 0b111111 && !this.hashset.contains(new Coords(x, y, z + 1, wID))) {
+ ret++;
+ ret += this.get_connected(w, x, y, z + 1, b);
+ }
+
+ if ((sides | 0b011111) == 0b111111 && !this.hashset.contains(new Coords(x, y, z - 1, wID))) {
+ ret++;
+ ret += this.get_connected(w, x, y, z - 1, b);
+ }
+
+ if ((sides | 0b111110) == 0b111111 && !this.hashset.contains(new Coords(x, y + 1, z, wID))) {
+ ret++;
+ ret += this.get_connected(w, x, y + 1, z, b);
+ }
+
+ if ((sides | 0b111101) == 0b111111 && !this.hashset.contains(new Coords(x, y - 1, z, wID))) {
+ ret++;
+ ret += this.get_connected(w, x, y - 1, z, b);
+ }
+
+ return ret;
+ }
+
+ public byte check_sourroundings(World w, int x, int y, int z, Block b) {
+
+ byte ret = 0;
+ int wID = w.provider.dimensionId;
+
+ if (this.hashset.contains(new Coords(x, y, z, wID))) return ret;
+
+ this.hashset.add(new Coords(x, y, z, wID));
+
+ if (w.getBlock(x + 1, y, z)
+ .equals(b)) ret = (byte) (ret | 0b000100);
+
+ if (w.getBlock(x - 1, y, z)
+ .equals(b)) ret = (byte) (ret | 0b001000);
+
+ if (w.getBlock(x, y, z + 1)
+ .equals(b)) ret = (byte) (ret | 0b010000);
+
+ if (w.getBlock(x, y, z - 1)
+ .equals(b)) ret = (byte) (ret | 0b100000);
+
+ if (w.getBlock(x, y + 1, z)
+ .equals(b)) ret = (byte) (ret | 0b000001);
+
+ if (w.getBlock(x, y - 1, z)
+ .equals(b)) ret = (byte) (ret | 0b000010);
+
+ return ret;
+ }
+
+ public boolean get_meta_of_sideblocks(World w, int n, int[] xyz, boolean GT) {
+
+ int wID = w.provider.dimensionId;
+ Coords Controller = new Coords(xyz[0], xyz[1], xyz[2], wID);
+
+ for (Coords C : this.hashset) {
+ if (GT) {
+ if (!new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y + 1, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y - 1, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y - 1, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x + 1, C.y, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x + 1, C.y, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x - 1, C.y, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x - 1, C.y, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y, C.z + 1, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y, C.z + 1) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y, C.z - 1, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y, C.z - 1) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ } else {
+ if (n == w.getBlockMetadata(C.x, C.y + 1, C.z) && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)
+ || n == w.getBlockMetadata(C.x, C.y - 1, C.z)
+ && !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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java
new file mode 100644
index 0000000000..cfd2c70d1d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksCheckerIteration.java
@@ -0,0 +1,146 @@
+/*
+ * 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.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
+
+import net.minecraft.block.Block;
+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.
+ */
+public class ConnectedBlocksCheckerIteration {
+
+ public final HashSet<Coords> hashset = new HashSet<>(2048);
+ public final HashSet<Coords> checked = new HashSet<>(4096);
+ private final Queue<Coords> kwoe = new LinkedList<>();
+
+ public long get_connected(World w, int x, int y, int z, Block b) {
+ this.kwoe.add(new Coords(x, y, z, w.provider.dimensionId));
+ this.hashset.add(new Coords(x, y, z, w.provider.dimensionId));
+ while (!this.kwoe.isEmpty()) {
+ Coords tocheck = this.kwoe.poll();
+ int wID = w.provider.dimensionId;
+ this.checked.add(tocheck);
+ Coords c;
+ if (!this.checked.contains(c = new Coords(tocheck.x + 1, tocheck.y, tocheck.z, wID))
+ && w.getBlock(tocheck.x + 1, tocheck.y, tocheck.z)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ if (!this.checked.contains(c = new Coords(tocheck.x - 1, tocheck.y, tocheck.z, wID))
+ && w.getBlock(tocheck.x - 1, tocheck.y, tocheck.z)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ if (!this.checked.contains(c = new Coords(tocheck.x, tocheck.y, tocheck.z + 1, wID))
+ && w.getBlock(tocheck.x, tocheck.y, tocheck.z + 1)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ if (!this.checked.contains(c = new Coords(tocheck.x, tocheck.y, tocheck.z - 1, wID))
+ && w.getBlock(tocheck.x, tocheck.y, tocheck.z - 1)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ if (!this.checked.contains(c = new Coords(tocheck.x, tocheck.y + 1, tocheck.z, wID))
+ && w.getBlock(tocheck.x, tocheck.y + 1, tocheck.z)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ if (!this.checked.contains(c = new Coords(tocheck.x, tocheck.y - 1, tocheck.z, wID))
+ && w.getBlock(tocheck.x, tocheck.y - 1, tocheck.z)
+ .equals(b)) {
+ this.kwoe.add(c);
+ this.hashset.add(c);
+ }
+ }
+ return this.hashset.size();
+ }
+
+ public boolean get_meta_of_sideblocks(World w, int n, int[] xyz, boolean GT) {
+
+ int wID = w.provider.dimensionId;
+ Coords Controller = new Coords(xyz[0], xyz[1], xyz[2], wID);
+
+ for (Coords C : this.hashset) {
+ if (GT) {
+ if (!new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y + 1, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y - 1, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y - 1, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x + 1, C.y, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x + 1, C.y, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x - 1, C.y, C.z, wID).equals(Controller)
+ && w.getTileEntity(C.x - 1, C.y, C.z) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y, C.z + 1, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y, C.z + 1) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ if (!new Coords(C.x, C.y, C.z - 1, wID).equals(Controller)
+ && w.getTileEntity(C.x, C.y, C.z - 1) instanceof IGregTechTileEntity gtTE
+ && gtTE.getMetaTileID() == n) {
+ return true;
+ }
+ } else {
+ if (n == w.getBlockMetadata(C.x, C.y + 1, C.z) && !new Coords(C.x, C.y + 1, C.z, wID).equals(Controller)
+ || n == w.getBlockMetadata(C.x, C.y - 1, C.z)
+ && !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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java
new file mode 100644
index 0000000000..f8c33dd8e9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Coords.java
@@ -0,0 +1,79 @@
+/*
+ * 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 net.minecraftforge.common.util.ForgeDirection;
+
+public class Coords {
+
+ public int x, z, wID;
+ public short y;
+
+ public Coords(int x, int y, int z, int wID) {
+ this(x, y, z);
+ this.wID = wID;
+ }
+
+ public Coords(int x, int y, int z) {
+ this.x = x;
+ this.y = (short) y;
+ this.z = z;
+ this.wID = 0;
+ }
+
+ public Coords getCoordsFromSide(ForgeDirection direction) {
+ return switch (direction) {
+ case UP -> new Coords(this.x, this.y + 1, this.z, this.wID);
+ case DOWN -> new Coords(this.x, this.y - 1, this.z, this.wID);
+ case WEST -> new Coords(this.x - 1, this.y, this.z, this.wID);
+ case EAST -> new Coords(this.x + 1, this.y, this.z, this.wID);
+ case NORTH -> new Coords(this.x, this.y, this.z - 1, this.wID);
+ case SOUTH -> new Coords(this.x, this.y, this.z + 1, this.wID);
+ default -> throw new UnsupportedOperationException("This is impossible.");
+ };
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ Coords coords = (Coords) o;
+ return this.x == coords.x && this.y == coords.y && this.z == coords.z && this.wID == coords.wID;
+ }
+
+ @Override
+ public int hashCode() {
+ byte[] data = new byte[14];
+ data[0] = (byte) (this.x & 0xff);
+ data[1] = (byte) (this.x >> 4 & 0xff);
+ data[2] = (byte) (this.x >> 8 & 0xff);
+ data[3] = (byte) (this.x >> 12 & 0xff);
+ data[4] = (byte) (this.y & 0xff);
+ data[5] = (byte) (this.y >> 4 & 0xff);
+ data[6] = (byte) (this.z & 0xff);
+ data[7] = (byte) (this.z >> 4 & 0xff);
+ data[8] = (byte) (this.z >> 8 & 0xff);
+ data[9] = (byte) (this.z >> 12 & 0xff);
+ data[10] = (byte) (this.wID & 0xff);
+ data[11] = (byte) (this.wID >> 4 & 0xff);
+ data[12] = (byte) (this.wID >> 8 & 0xff);
+ data[13] = (byte) (this.wID >> 12 & 0xff);
+ return MurmurHash3.murmurhash3_x86_32(data, 0, 14, 31);
+ }
+
+ @Override
+ public String toString() {
+ return this.x + "," + this.y + "," + this.z + "," + this.wID;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java
new file mode 100644
index 0000000000..678f8facba
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/EnumUtils.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+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, 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 });
+ }
+
+ 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 });
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java
new file mode 100644
index 0000000000..e8f4330ed3
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MathUtils.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+/*
+ * Faster implementations for Math stuff
+ */
+@SuppressWarnings("unused")
+public class MathUtils {
+
+ public static long floorLong(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return (long) x;
+ long xi = (long) x;
+ return x < xi ? xi - 1 : xi;
+ }
+
+ public static long ceilLong(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return (long) x;
+ long xi = (long) x;
+ return x > xi ? xi + 1 : xi;
+ }
+
+ public static int floorInt(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return (int) x;
+ int xi = (int) x;
+ return x < xi ? xi - 1 : xi;
+ }
+
+ public static int ceilInt(float x) {
+ if (Float.isInfinite(x) || Float.isNaN(x)) return (int) x;
+ int xi = (int) x;
+ return x > xi ? xi + 1 : xi;
+ }
+
+ public static int ceilInt(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return (int) x;
+ int xi = (int) x;
+ return x > xi ? xi + 1 : xi;
+ }
+
+ public static double floor(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return x;
+ int xi = (int) x;
+ return x < xi ? xi - 1 : xi;
+ }
+
+ public static double ceil(double x) {
+ if (Double.isInfinite(x) || Double.isNaN(x)) return x;
+ int xi = (int) x;
+ return x > xi ? xi + 1 : xi;
+ }
+
+ public static byte clamp(byte amount, byte min, byte max) {
+ byte inner = amount <= max ? amount : max;
+ return min >= inner ? min : inner;
+ }
+
+ public static short clamp(short amount, short min, short max) {
+ short inner = amount <= max ? amount : max;
+ return min >= inner ? min : inner;
+ }
+
+ public static int clamp(int amount, int min, int max) {
+ return Math.max(min, Math.min(amount, max));
+ }
+
+ public static long clamp(long amount, long min, long max) {
+ return Math.max(min, Math.min(amount, max));
+ }
+
+ public static float clamp(float amount, float min, float max) {
+ return Math.max(min, Math.min(amount, max));
+ }
+
+ public static double clamp(double amount, double min, double max) {
+ return Math.max(min, Math.min(amount, max));
+ }
+
+ public static <T extends Comparable<T>> T clamp(T val, T min, T max) {
+ return val.compareTo(min) < 0 ? min : val.compareTo(max) > 0 ? max : val;
+ }
+
+ public static int wrap(int input, int bound) {
+ return (input % bound + bound) % bound;
+ }
+
+ public static long wrap(long input, long bound) {
+ return (input % bound + bound) % bound;
+ }
+
+ public static double wrap(double input, double bound) {
+ return (input % bound + bound) % bound;
+ }
+
+ public static float wrap(float input, float bound) {
+ return (input % bound + bound) % bound;
+ }
+
+ public static float tanh(float x) {
+ float x2 = x * x;
+ float a = x * (135135.0f + x2 * (17325.0f + x2 * (378.0f + x2)));
+ float b = 135135.0f + x2 * (62370.0f + x2 * (3150.0f + x2 * 28.0f));
+ return clamp(a / b, -1, 1);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java
new file mode 100644
index 0000000000..501b473d98
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/MurmurHash3.java
@@ -0,0 +1,309 @@
+/*
+ * 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;
+
+public final class MurmurHash3 {
+
+ public static int fmix32(int h) {
+ h ^= h >>> 16;
+ h *= 0x85ebca6b;
+ h ^= h >>> 13;
+ h *= 0xc2b2ae35;
+ h ^= h >>> 16;
+ return h;
+ }
+
+ public static long fmix64(long k) {
+ k ^= k >>> 33;
+ k *= 0xff51afd7ed558ccdL;
+ k ^= k >>> 33;
+ k *= 0xc4ceb9fe1a85ec53L;
+ k ^= k >>> 33;
+ return k;
+ }
+
+ /**
+ * Gets a long from a byte buffer in little endian byte order.
+ */
+ public static long getLongLittleEndian(byte[] buf, int offset) {
+ return (long) buf[offset + 7] << 56 // no mask needed
+ | (buf[offset + 6] & 0xffL) << 48
+ | (buf[offset + 5] & 0xffL) << 40
+ | (buf[offset + 4] & 0xffL) << 32
+ | (buf[offset + 3] & 0xffL) << 24
+ | (buf[offset + 2] & 0xffL) << 16
+ | (buf[offset + 1] & 0xffL) << 8
+ | buf[offset] & 0xffL; // no shift needed
+ }
+
+ /**
+ * Returns the MurmurHash3_x86_32 hash.
+ */
+ public static int murmurhash3_x86_32(byte[] data, int offset, int len, int seed) {
+
+ final int c1 = 0xcc9e2d51;
+ final int c2 = 0x1b873593;
+
+ int h1 = seed;
+ int roundedEnd = offset + (len & 0xfffffffc); // round down to 4 byte block
+
+ 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;
+ 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;
+ }
+
+ // tail
+ int k1 = 0;
+
+ switch (len & 0x03) {
+ case 3:
+ k1 = (data[roundedEnd + 2] & 0xff) << 16;
+ // fallthrough
+ case 2:
+ k1 |= (data[roundedEnd + 1] & 0xff) << 8;
+ // fallthrough
+ case 1:
+ k1 |= data[roundedEnd] & 0xff;
+ k1 *= c1;
+ k1 = k1 << 15 | k1 >>> 17; // ROTL32(k1,15);
+ k1 *= c2;
+ h1 ^= k1;
+ }
+
+ // finalization
+ h1 ^= len;
+
+ // fmix(h1);
+ h1 ^= h1 >>> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= h1 >>> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= h1 >>> 16;
+
+ return h1;
+ }
+
+ /**
+ * 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) {
+
+ final int c1 = 0xcc9e2d51;
+ final int c2 = 0x1b873593;
+
+ int h1 = seed;
+
+ int pos = offset;
+ int end = offset + len;
+ int k1 = 0;
+ int k2 = 0;
+ int shift = 0;
+ int bits = 0;
+ int nBytes = 0; // length in UTF8 bytes
+
+ while (pos < end) {
+ int code = data.charAt(pos);
+ pos++;
+ if (code < 0x80) {
+ k2 = code;
+ bits = 8;
+
+ /***
+ * // 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;
+ *
+ * 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;
+ ***/
+ } else if (code < 0x800) {
+ k2 = 0xC0 | code >> 6 | (0x80 | code & 0x3F) << 8;
+ bits = 16;
+ } else if (code < 0xD800 || code > 0xDFFF || pos >= end) {
+ // we check for pos>=end to encode an unpaired surrogate as 3 bytes.
+ k2 = 0xE0 | code >> 12 | (0x80 | code >> 6 & 0x3F) << 8 | (0x80 | code & 0x3F) << 16;
+ bits = 24;
+ } else {
+ // surrogate pair
+ // int utf32 = pos < end ? (int) data.charAt(pos++) : 0;
+ int utf32 = data.charAt(pos++);
+ utf32 = (code - 0xD7C0 << 10) + (utf32 & 0x3FF);
+ k2 = 0xff & (0xF0 | utf32 >> 18) | (0x80 | utf32 >> 12 & 0x3F) << 8
+ | (0x80 | utf32 >> 6 & 0x3F) << 16
+ | (0x80 | utf32 & 0x3F) << 24;
+ bits = 32;
+ }
+
+ 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
+
+ shift += bits;
+ if (shift >= 32) {
+ // mix after we have a complete word
+
+ 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;
+
+ shift -= 32;
+ // unfortunately, java won't let you shift 32 bits off, so we need to check for 0
+ if (shift != 0) {
+ k1 = k2 >>> bits - shift; // bits used == bits - newshift
+ } else {
+ k1 = 0;
+ }
+ nBytes += 4;
+ }
+ } // inner
+
+ // handle tail
+ if (shift > 0) {
+ nBytes += shift >> 3;
+ k1 *= c1;
+ k1 = k1 << 15 | k1 >>> 17; // ROTL32(k1,15);
+ k1 *= c2;
+ h1 ^= k1;
+ }
+
+ // finalization
+ h1 ^= nBytes;
+
+ // fmix(h1);
+ h1 ^= h1 >>> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= h1 >>> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= h1 >>> 16;
+
+ return h1;
+ }
+
+ /**
+ * Returns the MurmurHash3_x64_128 hash, placing the result in "out".
+ */
+ public static void murmurhash3_x64_128(byte[] key, int offset, int len, int seed, LongPair out) {
+ // The original algorithm does have a 32 bit unsigned seed.
+ // We have to mask to match the behavior of the unsigned types and prevent sign extension.
+ long h1 = seed & 0x00000000FFFFFFFFL;
+ long h2 = seed & 0x00000000FFFFFFFFL;
+
+ final long c1 = 0x87c37b91114253d5L;
+ final long c2 = 0x4cf5ad432745937fL;
+
+ int roundedEnd = offset + (len & 0xFFFFFFF0); // round down to 16 byte block
+ for (int i = offset; i < roundedEnd; i += 16) {
+ long k1 = getLongLittleEndian(key, i);
+ long k2 = getLongLittleEndian(key, i + 8);
+ k1 *= c1;
+ k1 = Long.rotateLeft(k1, 31);
+ k1 *= c2;
+ h1 ^= k1;
+ h1 = Long.rotateLeft(h1, 27);
+ h1 += h2;
+ h1 = h1 * 5 + 0x52dce729;
+ k2 *= c2;
+ k2 = Long.rotateLeft(k2, 33);
+ k2 *= c1;
+ h2 ^= k2;
+ h2 = Long.rotateLeft(h2, 31);
+ h2 += h1;
+ h2 = h2 * 5 + 0x38495ab5;
+ }
+
+ long k1 = 0;
+ long k2 = 0;
+
+ switch (len & 15) {
+ case 15:
+ k2 = (key[roundedEnd + 14] & 0xffL) << 48;
+ case 14:
+ k2 |= (key[roundedEnd + 13] & 0xffL) << 40;
+ case 13:
+ k2 |= (key[roundedEnd + 12] & 0xffL) << 32;
+ case 12:
+ k2 |= (key[roundedEnd + 11] & 0xffL) << 24;
+ case 11:
+ k2 |= (key[roundedEnd + 10] & 0xffL) << 16;
+ case 10:
+ k2 |= (key[roundedEnd + 9] & 0xffL) << 8;
+ case 9:
+ k2 |= key[roundedEnd + 8] & 0xffL;
+ k2 *= c2;
+ k2 = Long.rotateLeft(k2, 33);
+ k2 *= c1;
+ h2 ^= k2;
+ case 8:
+ k1 = (long) key[roundedEnd + 7] << 56;
+ case 7:
+ k1 |= (key[roundedEnd + 6] & 0xffL) << 48;
+ case 6:
+ k1 |= (key[roundedEnd + 5] & 0xffL) << 40;
+ case 5:
+ k1 |= (key[roundedEnd + 4] & 0xffL) << 32;
+ case 4:
+ k1 |= (key[roundedEnd + 3] & 0xffL) << 24;
+ case 3:
+ k1 |= (key[roundedEnd + 2] & 0xffL) << 16;
+ case 2:
+ k1 |= (key[roundedEnd + 1] & 0xffL) << 8;
+ case 1:
+ k1 |= key[roundedEnd] & 0xffL;
+ k1 *= c1;
+ k1 = Long.rotateLeft(k1, 31);
+ k1 *= c2;
+ h1 ^= k1;
+ }
+
+ // ----------
+ // finalization
+
+ h1 ^= len;
+ h2 ^= len;
+
+ h1 += h2;
+ h2 += h1;
+
+ h1 = fmix64(h1);
+ h2 = fmix64(h2);
+
+ h1 += h2;
+ h2 += h1;
+
+ out.val1 = h1;
+ out.val2 = h2;
+ }
+
+ /**
+ * 128 bits of state
+ */
+ public static final class LongPair {
+
+ public long val1;
+ public long val2;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java
new file mode 100644
index 0000000000..753940f655
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/BartsNoise.java
@@ -0,0 +1,172 @@
+/*
+ * 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;
+
+public class BartsNoise implements INoiseGen {
+
+ public void setUsePhase(boolean usePhase) {
+ this.usePhase = usePhase;
+ }
+
+ public void setRandom(Random random) {
+ this.random = random;
+ }
+
+ boolean usePhase;
+ int octaves;
+ double frequency;
+ double amplitude;
+ long seed;
+ Random random;
+
+ public enum NoiseColor {
+
+ Red(-1),
+ Pink(-0.5),
+ White(0),
+ Blue(0.5),
+ Violet(1);
+
+ NoiseColor(double num) {
+ this.ampl = num;
+ }
+
+ double ampl;
+
+ public BartsNoise getColoredNoise() {
+ BartsNoise noise = new BartsNoise();
+ noise.setAmplitude(this.ampl);
+ return noise;
+ }
+ }
+
+ public BartsNoise(int octaves, double frequency, double amplitude, long seed) {
+ this.octaves = octaves;
+ this.frequency = frequency;
+ this.amplitude = amplitude;
+ this.seed = seed;
+ this.random = new XSTR(seed);
+ }
+
+ public BartsNoise() {
+ this.seed = new XSTR().nextLong();
+ this.random = new XSTR(this.seed);
+ this.octaves = 1;
+ this.frequency = this.random.nextGaussian();
+ this.amplitude = this.random.nextGaussian();
+ }
+
+ public BartsNoise(long seed) {
+ this.seed = seed;
+ this.random = new XSTR(seed);
+ this.octaves = 1;
+ this.frequency = this.random.nextGaussian();
+ this.amplitude = this.random.nextGaussian();
+ }
+
+ public BartsNoise copy() {
+ return new BartsNoise(this.octaves, this.frequency, this.amplitude, this.seed);
+ }
+
+ public BartsNoise copy(long seed) {
+ return new BartsNoise(this.octaves, this.frequency, this.amplitude, seed);
+ }
+
+ public double getCosNoise(double x, double y) {
+ double pr = x * this.frequency;
+ double r1 = Math.cos(pr);
+ if (r1 < 0) r1 = Math.abs(r1);
+ double result = Math.pow(r1, this.amplitude);
+ double pr2 = y * this.frequency;
+ double r2 = Math.cos(pr2);
+ if (r2 < 0) r2 = Math.abs(r2);
+ double result2 = Math.pow(r2, this.amplitude);
+ result *= result2;
+ if (result == Double.POSITIVE_INFINITY) result = Double.MAX_VALUE;
+ if (result == Double.NEGATIVE_INFINITY) result = Double.MIN_VALUE;
+ return MathUtils.wrap(result, 1D);
+ }
+
+ double getNonOctavedNoise(double x, double y) {
+ 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;
+ }
+
+ public double getNoiseSingle(int x, int y) {
+ double result = 0;
+ for (double i = 1; i <= this.octaves; i++) {
+ result += 1d / i * this.getNonOctavedNoise(i * x, i * y);
+ }
+ return result;
+ }
+
+ @Override
+ public double getNoise(int x, int y) {
+ double result = 0;
+ for (double i = 1; i <= this.octaves; i++) {
+ result += 1d / i * this.getNonOctavedNoise(i * x, y);
+ }
+ // result = (this.getNeighbouringNoise(x,y)+result)/2;
+ return MathUtils.wrap(result, 1D);
+ }
+
+ @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
+ // }
+ // }
+ return new double[0][0];
+ }
+
+ @Override
+ public void setAmplitude(double amplitude) {
+ this.amplitude = amplitude;
+ }
+
+ @Override
+ public void setOctaves(int octaves) {
+ this.octaves = octaves;
+ }
+
+ @Override
+ public void setFrequency(double freq) {
+ this.frequency = freq;
+ }
+
+ @Override
+ public void setSeed(long seed) {
+ this.seed = seed;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java
new file mode 100644
index 0000000000..ca318e17b9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NoiseUtil/SimplexNoise.java
@@ -0,0 +1,396 @@
+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
+ * 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 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];
+
+ static {
+ for (int i = 0; i < 512; i++) {
+ perm[i] = p[i & 255];
+ permMod12[i] = (short) (perm[i] % 12);
+ }
+ }
+
+ // Skewing and unskewing factors for 2, 3, and 4 dimensions
+ private static final double F2 = 0.5 * (Math.sqrt(3.0) - 1.0);
+ private static final double G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
+ private static final double F3 = 1.0 / 3.0;
+ private static final double G3 = 1.0 / 6.0;
+ private static final double F4 = (Math.sqrt(5.0) - 1.0) / 4.0;
+ private static final double G4 = (5.0 - Math.sqrt(5.0)) / 20.0;
+
+ // This method is a *lot* faster than using (int)Math.floor(x)
+ private static int fastfloor(double x) {
+ return MathUtils.floorInt(x);
+ }
+
+ private static double dot(Grad g, double x, double y) {
+ return g.x * x + g.y * y;
+ }
+
+ private static double dot(Grad g, double x, double y, double z) {
+ return g.x * x + g.y * y + g.z * z;
+ }
+
+ private static double dot(Grad g, double x, double y, double z, double w) {
+ return g.x * x + g.y * y + g.z * z + g.w * w;
+ }
+
+ // 2D simplex noise
+ public static double noise(double xin, double yin) {
+ double n0, n1, n2; // Noise contributions from the three corners
+ // Skew the input space to determine which simplex cell we're in
+ double s = (xin + yin) * F2; // Hairy factor for 2D
+ int i = fastfloor(xin + s);
+ int j = fastfloor(yin + s);
+ double t = (i + j) * G2;
+ double X0 = i - t; // Unskew the cell origin back to (x,y) space
+ double Y0 = j - t;
+ double x0 = xin - X0; // The x,y distances from the cell origin
+ double y0 = yin - Y0;
+ // For the 2D case, the simplex shape is an equilateral triangle.
+ // Determine which simplex we are in.
+ int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords
+ if (x0 > y0) {
+ i1 = 1;
+ j1 = 0;
+ } // lower triangle, XY order: (0,0)->(1,0)->(1,1)
+ else {
+ 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
+ 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
+ double y2 = y0 - 1.0 + 2.0 * G2;
+ // Work out the hashed gradient indices of the three simplex corners
+ int ii = i & 255;
+ int jj = j & 255;
+ int gi0 = permMod12[ii + perm[jj]];
+ int gi1 = permMod12[ii + i1 + perm[jj + j1]];
+ int gi2 = permMod12[ii + 1 + perm[jj + 1]];
+ // Calculate the contribution from the three corners
+ double t0 = 0.5 - x0 * x0 - y0 * y0;
+ if (t0 < 0) n0 = 0.0;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * dot(grad3[gi0], x0, y0); // (x,y) of grad3 used for 2D gradient
+ }
+ double t1 = 0.5 - x1 * x1 - y1 * y1;
+ if (t1 < 0) n1 = 0.0;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * dot(grad3[gi1], x1, y1);
+ }
+ double t2 = 0.5 - x2 * x2 - y2 * y2;
+ if (t2 < 0) n2 = 0.0;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * dot(grad3[gi2], x2, y2);
+ }
+ // Add contributions from each corner to get the final noise value.
+ // The result is scaled to return values in the interval [-1,1].
+ return 70.0 * (n0 + n1 + n2);
+ }
+
+ // 3D simplex noise
+ public static double noise(double xin, double yin, double zin) {
+ double n0, n1, n2, n3; // Noise contributions from the four corners
+ // Skew the input space to determine which simplex cell we're in
+ double s = (xin + yin + zin) * F3; // Very nice and simple skew factor for 3D
+ int i = fastfloor(xin + s);
+ int j = fastfloor(yin + s);
+ int k = fastfloor(zin + s);
+ double t = (i + j + k) * G3;
+ double X0 = i - t; // Unskew the cell origin back to (x,y,z) space
+ double Y0 = j - t;
+ double Z0 = k - t;
+ double x0 = xin - X0; // The x,y,z distances from the cell origin
+ double y0 = yin - Y0;
+ double z0 = zin - Z0;
+ // For the 3D case, the simplex shape is a slightly irregular tetrahedron.
+ // Determine which simplex we are in.
+ int i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords
+ int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords
+ if (x0 >= y0) {
+ if (y0 >= z0) {
+ i1 = 1;
+ j1 = 0;
+ k1 = 0;
+ i2 = 1;
+ j2 = 1;
+ k2 = 0;
+ } // X Y Z order
+ else {
+ if (x0 >= z0) {
+ i1 = 1;
+ j1 = 0;
+ k1 = 0;
+ } // X Z Y order
+ else {
+ i1 = 0;
+ j1 = 0;
+ k1 = 1;
+ }
+ i2 = 1;
+ j2 = 0;
+ k2 = 1;
+ } // Z X Y order
+ } else if (y0 < z0) {
+ i1 = 0;
+ j1 = 0;
+ k1 = 1;
+ i2 = 0;
+ j2 = 1;
+ k2 = 1;
+ } // Z Y X order
+ else if (x0 < z0) {
+ i1 = 0;
+ j1 = 1;
+ k1 = 0;
+ i2 = 0;
+ j2 = 1;
+ k2 = 1;
+ } // Y Z X order
+ else {
+ i1 = 0;
+ j1 = 1;
+ k1 = 0;
+ i2 = 1;
+ j2 = 1;
+ k2 = 0;
+ } // Y X Z order
+ // A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z),
+ // a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and
+ // a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where
+ // c = 1/6.
+ double x1 = x0 - i1 + G3; // Offsets for second corner in (x,y,z) coords
+ double y1 = y0 - j1 + G3;
+ double z1 = z0 - k1 + G3;
+ double x2 = x0 - i2 + 2.0 * G3; // Offsets for third corner in (x,y,z) coords
+ double y2 = y0 - j2 + 2.0 * G3;
+ double z2 = z0 - k2 + 2.0 * G3;
+ double x3 = x0 - 1.0 + 3.0 * G3; // Offsets for last corner in (x,y,z) coords
+ double y3 = y0 - 1.0 + 3.0 * G3;
+ double z3 = z0 - 1.0 + 3.0 * G3;
+ // Work out the hashed gradient indices of the four simplex corners
+ int ii = i & 255;
+ int jj = j & 255;
+ int kk = k & 255;
+ int gi0 = permMod12[ii + perm[jj + perm[kk]]];
+ int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];
+ int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];
+ int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];
+ // Calculate the contribution from the four corners
+ double t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0;
+ if (t0 < 0) n0 = 0.0;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * dot(grad3[gi0], x0, y0, z0);
+ }
+ double t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1;
+ if (t1 < 0) n1 = 0.0;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * dot(grad3[gi1], x1, y1, z1);
+ }
+ double t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2;
+ if (t2 < 0) n2 = 0.0;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * dot(grad3[gi2], x2, y2, z2);
+ }
+ double t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3;
+ if (t3 < 0) n3 = 0.0;
+ else {
+ t3 *= t3;
+ n3 = t3 * t3 * dot(grad3[gi3], x3, y3, z3);
+ }
+ // Add contributions from each corner to get the final noise value.
+ // The result is scaled to stay just inside [-1,1]
+ return 32.0 * (n0 + n1 + n2 + n3);
+ }
+
+ // 4D simplex noise, better simplex rank ordering method 2012-03-09
+ public static double noise(double x, double y, double z, double w) {
+
+ double n0, n1, n2, n3, n4; // Noise contributions from the five corners
+ // Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in
+ double s = (x + y + z + w) * F4; // Factor for 4D skewing
+ int i = fastfloor(x + s);
+ int j = fastfloor(y + s);
+ int k = fastfloor(z + s);
+ int l = fastfloor(w + s);
+ double t = (i + j + k + l) * G4; // Factor for 4D unskewing
+ double X0 = i - t; // Unskew the cell origin back to (x,y,z,w) space
+ double Y0 = j - t;
+ double Z0 = k - t;
+ double W0 = l - t;
+ double x0 = x - X0; // The x,y,z,w distances from the cell origin
+ double y0 = y - Y0;
+ double z0 = z - Z0;
+ double w0 = w - W0;
+ // For the 4D case, the simplex is a 4D shape I won't even try to describe.
+ // To find out which of the 24 possible simplices we're in, we need to
+ // determine the magnitude ordering of x0, y0, z0 and w0.
+ // Six pair-wise comparisons are performed between each possible pair
+ // of the four coordinates, and the results are used to rank the numbers.
+ int rankx = 0;
+ int ranky = 0;
+ int rankz = 0;
+ int rankw = 0;
+ if (x0 > y0) rankx++;
+ else ranky++;
+ if (x0 > z0) rankx++;
+ else rankz++;
+ if (x0 > w0) rankx++;
+ else rankw++;
+ if (y0 > z0) ranky++;
+ else rankz++;
+ if (y0 > w0) ranky++;
+ else rankw++;
+ if (z0 > w0) rankz++;
+ else rankw++;
+ int i1, j1, k1, l1; // The integer offsets for the second simplex corner
+ int i2, j2, k2, l2; // The integer offsets for the third simplex corner
+ int i3, j3, k3, l3; // The integer offsets for the fourth simplex corner
+ // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order.
+ // Many values of c will never occur, since e.g. x>y>z>w makes x<z, y<w and x<w
+ // impossible. Only the 24 indices which have non-zero entries make any sense.
+ // We use a thresholding to set the coordinates in turn from the largest magnitude.
+ // Rank 3 denotes the largest coordinate.
+ i1 = rankx >= 3 ? 1 : 0;
+ j1 = ranky >= 3 ? 1 : 0;
+ k1 = rankz >= 3 ? 1 : 0;
+ l1 = rankw >= 3 ? 1 : 0;
+ // Rank 2 denotes the second largest coordinate.
+ i2 = rankx >= 2 ? 1 : 0;
+ j2 = ranky >= 2 ? 1 : 0;
+ k2 = rankz >= 2 ? 1 : 0;
+ l2 = rankw >= 2 ? 1 : 0;
+ // Rank 1 denotes the second smallest coordinate.
+ i3 = rankx >= 1 ? 1 : 0;
+ j3 = ranky >= 1 ? 1 : 0;
+ k3 = rankz >= 1 ? 1 : 0;
+ l3 = rankw >= 1 ? 1 : 0;
+ // The fifth corner has all coordinate offsets = 1, so no need to compute that.
+ double x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords
+ double y1 = y0 - j1 + G4;
+ double z1 = z0 - k1 + G4;
+ double w1 = w0 - l1 + G4;
+ double x2 = x0 - i2 + 2.0 * G4; // Offsets for third corner in (x,y,z,w) coords
+ double y2 = y0 - j2 + 2.0 * G4;
+ double z2 = z0 - k2 + 2.0 * G4;
+ double w2 = w0 - l2 + 2.0 * G4;
+ double x3 = x0 - i3 + 3.0 * G4; // Offsets for fourth corner in (x,y,z,w) coords
+ double y3 = y0 - j3 + 3.0 * G4;
+ double z3 = z0 - k3 + 3.0 * G4;
+ double w3 = w0 - l3 + 3.0 * G4;
+ double x4 = x0 - 1.0 + 4.0 * G4; // Offsets for last corner in (x,y,z,w) coords
+ double y4 = y0 - 1.0 + 4.0 * G4;
+ double z4 = z0 - 1.0 + 4.0 * G4;
+ double w4 = w0 - 1.0 + 4.0 * G4;
+ // Work out the hashed gradient indices of the five simplex corners
+ int ii = i & 255;
+ int jj = j & 255;
+ int kk = k & 255;
+ int ll = l & 255;
+ int gi0 = perm[ii + perm[jj + perm[kk + perm[ll]]]] % 32;
+ int gi1 = perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]]]] % 32;
+ int gi2 = perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]]]] % 32;
+ int gi3 = perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]]]] % 32;
+ int gi4 = perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]]]] % 32;
+ // Calculate the contribution from the five corners
+ double t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;
+ if (t0 < 0) n0 = 0.0;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * dot(grad4[gi0], x0, y0, z0, w0);
+ }
+ double t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;
+ if (t1 < 0) n1 = 0.0;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * dot(grad4[gi1], x1, y1, z1, w1);
+ }
+ double t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;
+ if (t2 < 0) n2 = 0.0;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * dot(grad4[gi2], x2, y2, z2, w2);
+ }
+ double t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;
+ if (t3 < 0) n3 = 0.0;
+ else {
+ t3 *= t3;
+ n3 = t3 * t3 * dot(grad4[gi3], x3, y3, z3, w3);
+ }
+ double t4 = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;
+ if (t4 < 0) n4 = 0.0;
+ else {
+ t4 *= t4;
+ n4 = t4 * t4 * dot(grad4[gi4], x4, y4, z4, w4);
+ }
+ // Sum up and scale the result to cover the range [-1,1]
+ return 27.0 * (n0 + n1 + n2 + n3 + n4);
+ }
+
+ // 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) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ Grad(double x, double y, double z, double w) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java
new file mode 100644
index 0000000000..33173d19f2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashMap.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+public class NonNullWrappedHashMap<K, V> extends HashMap<K, V> {
+
+ private static final long serialVersionUID = 46345163103910175L;
+ private V defaultValue;
+
+ public NonNullWrappedHashMap(int initialCapacity, float loadFactor, V defaultValue) {
+ super(initialCapacity, loadFactor);
+ this.defaultValue = Objects.requireNonNull(defaultValue);
+ }
+
+ public NonNullWrappedHashMap(int initialCapacity, V defaultValue) {
+ super(initialCapacity);
+ this.defaultValue = Objects.requireNonNull(defaultValue);
+ }
+
+ public NonNullWrappedHashMap(V defaultValue) {
+ this.defaultValue = Objects.requireNonNull(defaultValue);
+ }
+
+ public NonNullWrappedHashMap(Map<? extends K, ? extends V> m, V defaultValue) {
+ super(m);
+ this.defaultValue = Objects.requireNonNull(defaultValue);
+ }
+
+ @Override
+ public V get(Object key) {
+ return this.getOrDefault(key, this.defaultValue);
+ }
+
+ @Override
+ public V getOrDefault(Object key, V defaultValue) {
+ return Objects.requireNonNull(
+ Optional.ofNullable(super.getOrDefault(key, defaultValue))
+ .orElse(this.defaultValue));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java
new file mode 100644
index 0000000000..5490c4bdaf
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/NonNullWrappedHashSet.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Collection;
+import java.util.HashSet;
+
+public class NonNullWrappedHashSet<E> extends HashSet<E> {
+
+ private static final long serialVersionUID = 8377161849188229010L;
+
+ public NonNullWrappedHashSet() {}
+
+ public NonNullWrappedHashSet(Collection<? extends E> c) {
+ this.addAll(c);
+ }
+
+ public NonNullWrappedHashSet(int initialCapacity, float loadFactor) {
+ super(initialCapacity, loadFactor);
+ }
+
+ public NonNullWrappedHashSet(int initialCapacity) {
+ super(initialCapacity);
+ }
+
+ @Override
+ public boolean add(E e) {
+ if (e != null) return super.add(e);
+ return false;
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends E> c) {
+ boolean wasChanged = false;
+ for (E element : c) {
+ if (element != null) wasChanged |= this.add(element);
+ }
+ return wasChanged;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java
new file mode 100644
index 0000000000..cd9bc1746e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/Pair.java
@@ -0,0 +1,81 @@
+/*
+ * 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.nio.ByteBuffer;
+import java.util.Arrays;
+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) {
+ this.pair = pair;
+ }
+
+ public Pair(A k, B v) {
+ this.pair[0] = k;
+ this.pair[1] = v;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Pair)) return false;
+
+ Pair<?, ?> pair1 = (Pair<?, ?>) o;
+
+ // Probably incorrect - comparing Object[] arrays with Arrays.equals
+ return Arrays.equals(this.pair, pair1.pair);
+ }
+
+ @Override
+ public int hashCode() {
+ return MurmurHash3.murmurhash3_x86_32(
+ ByteBuffer.allocate(8)
+ .putInt(this.pair[0].hashCode())
+ .putInt(this.pair[1].hashCode())
+ .array(),
+ 0,
+ 8,
+ 31);
+ }
+
+ @Override
+ public A getKey() {
+ return (A) this.pair[0];
+ }
+
+ @Override
+ public B getValue() {
+ return (B) this.pair[1];
+ }
+
+ @Override
+ public B setValue(Object value) {
+ this.pair[1] = value;
+ return (B) this.pair[1];
+ }
+
+ public Pair<A, B> copyWithNewValue(B value) {
+ return new Pair<>((A) this.pair[0], value);
+ }
+
+ public Pair<A, B> replaceValue(B value) {
+ this.setValue(value);
+ return this;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java
new file mode 100644
index 0000000000..d0850b20c5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java
@@ -0,0 +1,187 @@
+package com.github.bartimaeusnek.bartworks.util;
+
+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.
+ *
+ * @author GlodBlock
+ */
+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.
+ *
+ * @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) {
+ if (aFluidInputs == null) aFluidInputs = new FluidStack[0];
+ if (aItemStacks == null) aItemStacks = new ItemStack[0];
+ HashMap<Integer, Integer> tCompressedFluidInput = compressFluid(aFluidInputs);
+ HashMap<Integer, Integer> tCompressedItemInput = compressItem(aItemStacks);
+ HashMap<Integer, Integer> tCompressedFluidRecipe = compressFluid(aRecipe.mFluidInputs);
+ HashMap<Integer, Integer> tCompressedItemRecipe = compressItem(aRecipe.mInputs);
+ 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));
+ }
+ }
+ for (int tItem : tCompressedItemRecipe.keySet()) {
+ /* Wildcard Stuff */
+ if (tItem >> 16 == Short.MAX_VALUE) {
+ int tCountWildcard = 0;
+ for (int tInputItem : tCompressedItemInput.keySet()) {
+ if ((tInputItem & 0xffff) == (tItem & 0xffff)) {
+ tCountWildcard += tCompressedItemInput.get(tInputItem);
+ }
+ }
+ tCurrentPara = Math.min(tCurrentPara, tCountWildcard / tCompressedItemRecipe.get(tItem));
+ } else if (tCompressedItemRecipe.get(tItem) != 0) {
+ /* OreDict Stuff */
+ int tCountOre = 0;
+ ItemStack tRealRecipe = GT_Utility.intToStack(tItem);
+ for (int tInputItem : tCompressedItemInput.keySet()) {
+ ItemStack tRealStack = GT_Utility.intToStack(tInputItem);
+ if (GT_OreDictUnificator.isInputStackEqual(tRealStack, tRealRecipe)) {
+ tCountOre += tCompressedItemInput.get(tInputItem);
+ }
+ }
+ tCurrentPara = Math.min(tCurrentPara, tCountOre / tCompressedItemRecipe.get(tItem));
+ }
+ }
+
+ for (int tFluid : tCompressedFluidRecipe.keySet()) {
+ int tOldSize = tCompressedFluidRecipe.get(tFluid);
+ tCompressedFluidRecipe.put(tFluid, tOldSize * tCurrentPara);
+ }
+ for (int tItem : tCompressedItemRecipe.keySet()) {
+ int tOldSize = tCompressedItemRecipe.get(tItem);
+ tCompressedItemRecipe.put(tItem, tOldSize * tCurrentPara);
+ }
+
+ for (FluidStack tFluid : aFluidInputs) {
+ if (tFluid != null && tCompressedFluidRecipe.containsKey(tFluid.getFluidID())) {
+ if (tFluid.amount >= tCompressedFluidRecipe.get(tFluid.getFluidID())) {
+ tFluid.amount -= tCompressedFluidRecipe.get(tFluid.getFluidID());
+ tCompressedFluidRecipe.remove(tFluid.getFluidID());
+ } else {
+ 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();) {
+ int tItem = i.next();
+ if (tItem >> 16 == Short.MAX_VALUE) {
+ for (ItemStack tInputItem : aItemStacks) {
+ int InputID = GT_Utility.stackToInt(tInputItem);
+ if ((InputID & 0xffff) == (tItem & 0xffff)) {
+ if (tInputItem.stackSize >= tCompressedItemRecipe.get(tItem)) {
+ tInputItem.stackSize -= tCompressedItemRecipe.get(tItem);
+ i.remove();
+ break;
+ }
+ tCompressedItemRecipe.put(tItem, tCompressedItemRecipe.get(tItem) - tInputItem.stackSize);
+ tInputItem.stackSize = 0;
+ }
+ }
+ } else {
+ ItemStack tRealRecipe = GT_Utility.intToStack(tItem);
+ int tTargetAmount = tCompressedItemRecipe.get(tItem);
+ for (ItemStack input : aItemStacks) {
+ if (GT_OreDictUnificator.isInputStackEqual(input, tRealRecipe)) {
+ int d = Math.min(tTargetAmount, input.stackSize);
+ tTargetAmount -= d;
+ tCompressedItemRecipe.put(tItem, tTargetAmount);
+ input.stackSize -= d;
+ }
+ if (tTargetAmount == 0) {
+ i.remove();
+ break;
+ }
+ }
+ }
+ }
+
+ return tCurrentPara;
+ }
+
+ /**
+ * 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.
+ */
+ public static Pair<ArrayList<FluidStack>, ArrayList<ItemStack>> getMultiOutput(GT_Recipe aRecipe, int aPall) {
+ ArrayList<FluidStack> tFluidList = new ArrayList<>();
+ ArrayList<ItemStack> tItemList = new ArrayList<>();
+ if (aRecipe == null) return new Pair<>(tFluidList, tItemList);
+ if (aRecipe.mFluidOutputs != null && aRecipe.mFluidOutputs.length > 0) {
+ for (FluidStack tFluid : aRecipe.mFluidOutputs) {
+ if (tFluid != null && tFluid.amount > 0) {
+ tFluidList.add(new FluidStack(tFluid.getFluid(), tFluid.amount * aPall));
+ }
+ }
+ }
+ if (aRecipe.mOutputs != null && aRecipe.mOutputs.length > 0) {
+ for (ItemStack tItem : aRecipe.mOutputs) {
+ if (tItem != null && tItem.stackSize > 0) {
+ int tAmount = tItem.stackSize * aPall;
+ while (tAmount > tItem.getMaxStackSize()) {
+ tItemList.add(GT_Utility.copyAmount(tItem.getMaxStackSize(), tItem));
+ tAmount -= tItem.getMaxStackSize();
+ }
+ tItemList.add(GT_Utility.copyAmount(tAmount, tItem));
+ }
+ }
+ }
+ return new Pair<>(tFluidList, tItemList);
+ }
+
+ public static HashMap<Integer, Integer> compressItem(ItemStack[] aItemStacks) {
+ HashMap<Integer, Integer> tCompressed = new HashMap<>();
+ for (ItemStack tItem : aItemStacks) {
+ if (tItem != null) {
+ int tItemID = GT_Utility.stackToInt(tItem);
+ int tItemSize = tItem.stackSize;
+ tCompressed.merge(tItemID, tItemSize, Integer::sum);
+ }
+ }
+ return tCompressed;
+ }
+
+ public static HashMap<Integer, Integer> compressFluid(FluidStack[] aFluidStack) {
+ HashMap<Integer, Integer> tCompressed = new HashMap<>();
+ for (FluidStack tFluid : aFluidStack) {
+ if (tFluid != null) {
+ int tFluidID = tFluid.getFluidID();
+ int tFluidSize = tFluid.amount;
+ tCompressed.merge(tFluidID, tFluidSize, Integer::sum);
+ }
+ }
+ return tCompressed;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ResultWrongSievert.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ResultWrongSievert.java
new file mode 100644
index 0000000000..b6216f3c42
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/ResultWrongSievert.java
@@ -0,0 +1,82 @@
+package com.github.bartimaeusnek.bartworks.util;
+
+import net.minecraft.network.PacketBuffer;
+import net.minecraft.util.StatCollector;
+
+import gregtech.api.recipe.check.CheckRecipeResult;
+import gregtech.api.util.GT_Utility;
+
+public class ResultWrongSievert implements CheckRecipeResult {
+
+ public enum NeededSievertType {
+ EXACTLY,
+ MINIMUM
+ }
+
+ private NeededSievertType type;
+ private int required;
+
+ public ResultWrongSievert(int required, NeededSievertType type) {
+ this.required = required;
+ this.type = type;
+ }
+
+ public String getID() {
+ return "wrong_sievert";
+ }
+
+ @Override
+ public boolean wasSuccessful() {
+ return false;
+ }
+
+ @Override
+ public String getDisplayString() {
+ return switch (this.type) {
+ case EXACTLY -> StatCollector.translateToLocalFormatted(
+ "GT5U.gui.text.wrong_sievert_exactly",
+ GT_Utility.formatNumbers(this.required));
+ case MINIMUM -> StatCollector
+ .translateToLocalFormatted("GT5U.gui.text.wrong_sievert_min", GT_Utility.formatNumbers(this.required));
+ };
+ }
+
+ @Override
+ public CheckRecipeResult newInstance() {
+ return new ResultWrongSievert(0, NeededSievertType.EXACTLY);
+ }
+
+ @Override
+ public void encode(PacketBuffer buffer) {
+ buffer.writeVarIntToBuffer(this.required);
+ buffer.writeVarIntToBuffer(this.type.ordinal());
+ }
+
+ @Override
+ public void decode(PacketBuffer buffer) {
+ this.required = buffer.readVarIntFromBuffer();
+ this.type = NeededSievertType.values()[buffer.readVarIntFromBuffer()];
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ ResultWrongSievert that = (ResultWrongSievert) o;
+ return this.required == that.required;
+ }
+
+ /**
+ * Cannot process recipe because the machine doesn't have the minimum amount of sievert
+ */
+ public static CheckRecipeResult insufficientSievert(int required) {
+ return new ResultWrongSievert(required, NeededSievertType.MINIMUM);
+ }
+
+ /**
+ * Cannot process recipe because the machine doesn't have the exact amount of sievert
+ */
+ public static CheckRecipeResult wrongSievert(int required) {
+ return new ResultWrongSievert(required, NeededSievertType.EXACTLY);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java
new file mode 100644
index 0000000000..4c1c82b9bf
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/StreamUtils.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.bartworks.util;
+
+import java.util.Optional;
+import java.util.function.Predicate;
+
+import gregtech.api.recipe.RecipeMap;
+import gregtech.api.util.GT_Recipe;
+
+public class StreamUtils {
+
+ private StreamUtils() {}
+
+ public static Predicate<RecipeMap<?>> filterVisualMaps() {
+ return recipeMap -> {
+ Optional<GT_Recipe> op = recipeMap.getAllRecipes()
+ .stream()
+ .findAny();
+ return op.isPresent() && !op.get().mFakeRecipe;
+ };
+ }
+
+ public static boolean filterVisualMaps(RecipeMap<?> recipeMap) {
+ return filterVisualMaps().test(recipeMap);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java
new file mode 100644
index 0000000000..241f20c1f9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java
@@ -0,0 +1,392 @@
+/*
+ * 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.Collection;
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
+import java.util.Spliterator;
+
+import org.apache.commons.lang3.NotImplementedException;
+
+public class AccessPriorityList<E> implements List<E>, Deque<E>, Set<E> {
+
+ transient int size = 0;
+ transient AccessPriorityListNode<E> head;
+ transient AccessPriorityListNode<E> tail;
+
+ public static <E> AccessPriorityList<E> create() {
+ return new AccessPriorityList<>();
+ }
+
+ public AccessPriorityList() {}
+
+ @Override
+ public void addFirst(E t) {
+ final AccessPriorityListNode<E> first = this.head;
+ final AccessPriorityListNode<E> newNode = new AccessPriorityListNode<>(null, t, first);
+ this.head = newNode;
+ if (first == null) this.tail = newNode;
+ else first.setBefore(newNode);
+ this.size++;
+ }
+
+ @Override
+ public void addLast(E t) {
+ final AccessPriorityListNode<E> last = this.tail;
+ final AccessPriorityListNode<E> newNode = new AccessPriorityListNode<>(last, t, null);
+ this.tail = newNode;
+ if (last == null) this.head = newNode;
+ else last.setNext(newNode);
+ this.size++;
+ }
+
+ @Override
+ public boolean offerFirst(E e) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean offerLast(E e) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E removeFirst() {
+ E first = this.head.getELEMENT();
+ AccessPriorityListNode<E> node = this.head;
+ this.head = node.getNext();
+ this.head.setBefore(null);
+ node.destroy();
+ node = null;
+ this.size--;
+ return first;
+ }
+
+ @Override
+ public E removeLast() {
+ E last = this.tail.getELEMENT();
+ AccessPriorityListNode<E> node = this.tail;
+ this.tail = node.getBefore();
+ this.tail.setNext(null);
+ node.destroy();
+ node = null;
+ this.size--;
+ return last;
+ }
+
+ @Override
+ public E pollFirst() {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E pollLast() {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E getFirst() {
+ return this.peekFirst();
+ }
+
+ @Override
+ public E getLast() {
+ return this.peekLast();
+ }
+
+ @Override
+ public E peekFirst() {
+ return this.head != null ? this.head.getELEMENT() : null;
+ }
+
+ @Override
+ public E peekLast() {
+ return this.tail != null ? this.tail.getELEMENT() : null;
+ }
+
+ @Override
+ public boolean removeFirstOccurrence(Object o) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean removeLastOccurrence(Object o) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public int size() {
+ return this.size;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return this.size == 0;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public Iterator<E> iterator() {
+ return new AccessPriorityListIterators.AccessPriorityListIterator<>(this.head);
+ }
+
+ public Iterator<AccessPriorityListNode<E>> nodeIterator() {
+ return new AccessPriorityListIterators.AccessPriorityListNodeIterator<>(this.head);
+ }
+
+ @Override
+ public Iterator<E> descendingIterator() {
+ return new AccessPriorityListIterators.AccessPriorityListReverseIterator<>(this.tail);
+ }
+
+ @Override
+ public Object[] toArray() {
+ Object[] ret = new Object[this.size];
+ int index = 0;
+ for (Iterator<E> it = this.iterator(); it.hasNext(); index++) ret[index] = it.next();
+ return ret;
+ }
+
+ @Override
+ public <T> T[] toArray(T[] a) {
+ T[] ret = (T[]) new Object[this.size];
+ int index = 0;
+ for (Iterator<T> it = (Iterator<T>) this.iterator(); it.hasNext(); index++) ret[index] = it.next();
+ return ret;
+ }
+
+ @Override
+ public boolean add(E e) {
+ this.addLast(e);
+ return true;
+ }
+
+ private void moveNodeUp(AccessPriorityListNode<E> node) {
+ if (node == this.head || node.getBefore() == null) return;
+ final AccessPriorityListNode<E> before = node.getBefore();
+ final AccessPriorityListNode<E> beforeBefore = before.getBefore();
+ final AccessPriorityListNode<E> next = node.getNext();
+
+ // <0,1,2> <1,2,3> N<2,3,4> <3,4,5>
+
+ node.setBefore(beforeBefore);
+ // <0,1,2> <1,2,3> N<0,3,4> <3,4,5>
+
+ if (beforeBefore != null) beforeBefore.setNext(node);
+ else this.head = node;
+ // <0,1,3> <1,2,3> N<0,3,4> <3,4,5>
+
+ before.setBefore(node);
+ // <0,1,3> <3,2,3> N<0,3,4> <3,4,5>
+
+ before.setNext(next);
+ // <0,1,3> <3,2,4> N<0,3,4> <3,4,5>
+
+ if (next != null) next.setBefore(before);
+ else this.tail = before;
+ // <0,1,3> N<0,3,4> <3,2,4> <2,4,5>
+
+ node.setNext(before);
+ // <0,1,3> N<0,3,2> <3,2,4> <2,4,5>
+ }
+
+ AccessPriorityListNode<E> getNode(int index) {
+ if (index <= this.size / 2) {
+ AccessPriorityListNode<E> x = this.head;
+ for (int i = 0; i < index; i++) x = x.getNext();
+ return x;
+ }
+ AccessPriorityListNode<E> x = this.tail;
+ for (int i = this.size - 1; i > index; i--) x = x.getBefore();
+ return x;
+ }
+
+ @Override
+ public boolean offer(E e) {
+ throw new NotImplementedException("");
+ }
+
+ private boolean isValidIndex(int index) {
+ if (index >= 0 && index < this.size) return true;
+ throw new ArrayIndexOutOfBoundsException("NOT A VAILD INDEX!");
+ }
+
+ @Override
+ public E remove() {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E poll() {
+ return this.removeFirst();
+ }
+
+ @Override
+ public E element() {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E peek() {
+ return this.getFirst();
+ }
+
+ @Override
+ public void push(E e) {
+ this.addFirst(e);
+ }
+
+ @Override
+ public E pop() {
+ return this.removeFirst();
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ // Object p;
+ // for (Iterator it = this.iterator(); it.hasNext(); o.equals(p)){
+ // p = it.next();
+ // }
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends E> c) {
+ if (c == null) return false;
+ c.forEach(this::addLast);
+ return true;
+ }
+
+ @Override
+ public boolean addAll(int index, Collection<? extends E> c) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public void clear() {
+ if (this.tail != null) {
+ AccessPriorityListNode<E> node = this.tail;
+ while (node.getBefore() != null) {
+ node.setNext(null);
+ node.setPriority(0L);
+ node = node.getBefore();
+ node.getNext()
+ .setBefore(null);
+ }
+ this.size = 0;
+ this.head = null;
+ this.tail = null;
+ }
+ }
+
+ public void addPrioToNode(AccessPriorityListNode<E> node) {
+ this.addPrioToNode(node, 1L);
+ }
+
+ public void addPrioToNode(AccessPriorityListNode<E> node, long prio) {
+ long current = node.getPriority();
+ 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()) {
+ this.moveNodeUp(node);
+ }
+ }
+
+ public void addPrioToNode(int index, long prio) {
+ if (!this.isValidIndex(index)) return;
+ AccessPriorityListNode<E> node = this.getNode(index);
+ this.addPrioToNode(node, prio);
+ }
+
+ public void addPrioToNode(int index) {
+ this.addPrioToNode(index, 1L);
+ }
+
+ @Override
+ public E get(int index) {
+ if (!this.isValidIndex(index)) return null;
+ AccessPriorityListNode<E> node = this.getNode(index);
+ return node.getELEMENT();
+ }
+
+ @Override
+ public E set(int index, E element) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public void add(int index, E element) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public E remove(int index) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public int indexOf(Object o) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public int lastIndexOf(Object o) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public ListIterator<E> listIterator() {
+ return new AccessPriorityListIterators.AccessPriorityListListIterator<>(this.head, this.tail, false);
+ }
+
+ @Override
+ public ListIterator<E> listIterator(int index) {
+ return new AccessPriorityListIterators.AccessPriorityListListIterator<>(this, index);
+ }
+
+ @Override
+ public List<E> subList(int fromIndex, int toIndex) {
+ throw new NotImplementedException("");
+ }
+
+ @Override
+ public Spliterator<E> spliterator() {
+ throw new NotImplementedException("");
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java
new file mode 100644
index 0000000000..f24105db17
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java
@@ -0,0 +1,163 @@
+/*
+ * 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) {
+ this.head = head;
+ this.tail = tail;
+ this.current = reverse ? tail : head;
+ this.reverse = reverse;
+ }
+
+ public AccessPriorityListListIterator(AccessPriorityList<E> list, int index) {
+ this.head = list.head;
+ this.tail = list.tail;
+ this.current = list.getNode(index);
+ this.counter = index;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return this.reverse ? this.head != this.current : this.tail != this.current;
+ }
+
+ @Override
+ public E next() {
+ this.counter++;
+ E ret = this.current.getELEMENT();
+ this.current = this.current.getNext();
+ return ret;
+ }
+
+ @Override
+ public boolean hasPrevious() {
+ return !this.reverse ? this.head != this.current : this.tail != this.current;
+ }
+
+ @Override
+ public E previous() {
+ this.counter--;
+ E ret = this.current.getELEMENT();
+ this.current = this.current.getBefore();
+ return ret;
+ }
+
+ @Override
+ public int nextIndex() {
+ return this.counter + 1;
+ }
+
+ @Override
+ public int previousIndex() {
+ return this.counter - 1;
+ }
+
+ @Override
+ public void remove() {
+ throw new NotImplementedException("Not Implemented");
+ }
+
+ @Override
+ public void set(E e) {
+ throw new NotImplementedException("Not Implemented");
+ }
+
+ @Override
+ public void add(E e) {
+ throw new NotImplementedException("Not Implemented");
+ }
+ }
+
+ public static class AccessPriorityListIterator<E> implements Iterator<E> {
+
+ final AccessPriorityListNode<E> head;
+ AccessPriorityListNode<E> current;
+
+ public AccessPriorityListIterator(AccessPriorityListNode<E> head) {
+ this.head = this.current = head;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return this.current != null;
+ }
+
+ @Override
+ public E next() {
+ E ret = this.current.getELEMENT();
+ this.current = this.current.getNext();
+ return ret;
+ }
+ }
+
+ public static class AccessPriorityListReverseIterator<E> implements Iterator<E> {
+
+ final AccessPriorityListNode<E> tail;
+ AccessPriorityListNode<E> current;
+
+ public AccessPriorityListReverseIterator(AccessPriorityListNode<E> tail) {
+ this.tail = this.current = tail;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return this.current != null;
+ }
+
+ @Override
+ public E next() {
+ E ret = this.current.getELEMENT();
+ this.current = this.current.getBefore();
+ return ret;
+ }
+ }
+
+ public static class AccessPriorityListNodeIterator<E> implements Iterator<AccessPriorityListNode<E>> {
+
+ final AccessPriorityListNode<E> head;
+ AccessPriorityListNode<E> current;
+
+ public AccessPriorityListNodeIterator(AccessPriorityListNode<E> head) {
+ this.head = this.current = head;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return this.current != null;
+ }
+
+ @Override
+ public AccessPriorityListNode<E> next() {
+ AccessPriorityListNode<E> ret = this.current;
+ this.current = this.current.getNext();
+ return ret;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java
new file mode 100644
index 0000000000..72b266917f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListNode.java
@@ -0,0 +1,72 @@
+/*
+ * 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;
+
+public class AccessPriorityListNode<E> {
+
+ public static final AccessPriorityListNode<?> EMPTY_NODE = new AccessPriorityListNode<>(null);
+
+ private final E ELEMENT;
+ private long priority = Long.MIN_VALUE;
+ private AccessPriorityListNode<E> next;
+ private AccessPriorityListNode<E> before;
+
+ public AccessPriorityListNode(E element) {
+ this.ELEMENT = element;
+ }
+
+ public AccessPriorityListNode(AccessPriorityListNode<E> before, E element, AccessPriorityListNode<E> next) {
+ this.ELEMENT = element;
+ this.connect(next, before);
+ }
+
+ public void connect(AccessPriorityListNode<E> next, AccessPriorityListNode<E> before) {
+ this.setNext(next);
+ this.setBefore(before);
+ }
+
+ public E getELEMENT() {
+ return this.ELEMENT;
+ }
+
+ public long getPriority() {
+ return this.priority;
+ }
+
+ public void setPriority(long priority) {
+ this.priority = priority;
+ }
+
+ public AccessPriorityListNode<E> getNext() {
+ return this.next;
+ }
+
+ public void setNext(AccessPriorityListNode<E> next) {
+ this.next = next;
+ }
+
+ public AccessPriorityListNode<E> getBefore() {
+ return this.before;
+ }
+
+ public void setBefore(AccessPriorityListNode<E> before) {
+ this.before = before;
+ }
+
+ void destroy() {
+ this.before = null;
+ this.next = null;
+ this.priority = 0L;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java
new file mode 100644
index 0000000000..d797e68d8a
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/flowerset/FlowerSet.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.function.Function;
+
+public class FlowerSet<T> implements Set<T> {
+
+ public FlowerSet(int petals, Function<FlowerNode<T>, Integer> comparerison) {
+ this.petals = petals;
+ this.comparerison = comparerison;
+ }
+
+ final int petals;
+ final Function<FlowerNode<T>, Integer> comparerison;
+
+ public static <U> FlowerSet<U> createBase64(Function<FlowerNode<U>, Integer> comparerison) {
+ return new FlowerSet<>(64, comparerison);
+ }
+
+ public static <U> FlowerSet<U> createHexflower(Function<FlowerNode<U>, Integer> comparerison) {
+ return new FlowerSet<>(16, comparerison);
+ }
+
+ @Override
+ public int size() {
+ return 0;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return false;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return false;
+ }
+
+ @Override
+ public Iterator<T> iterator() {
+ return null;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[0];
+ }
+
+ @Override
+ public <T1> T1[] toArray(T1[] a) {
+ return null;
+ }
+
+ @Override
+ public boolean add(T t) {
+ return false;
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return false;
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ return false;
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends T> c) {
+ return false;
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c) {
+ return false;
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c) {
+ return false;
+ }
+
+ @Override
+ public void clear() {}
+
+ static class FlowerNode<V> {
+
+ private final FlowerSet<V> map;
+ final V value;
+ final FlowerNode<V>[] links;
+
+ @SuppressWarnings("unchecked")
+ public FlowerNode(V value, FlowerSet<V> map) {
+ this.value = value;
+ this.map = map;
+ this.links = new FlowerNode[map.petals];
+ }
+
+ private static final int DEPTH = 20480;
+
+ public void TryToSetSingleNode(FlowerNode<V> node, FlowerNode<V> toset, int place, int depth) {
+ if (depth > DEPTH) throw new IllegalStateException("Recursive Call went too deep.");
+ if (node.links[place] == null) node.links[place] = toset;
+ else {
+ this.TryToSetSingleNode(node.links[place], toset, place, depth);
+ depth++;
+ }
+ }
+
+ public void TryToSetSingleNode(FlowerNode<V> node, FlowerNode<V> toset, int place) {
+ if (node.links[place] == null) node.links[place] = toset;
+ else this.TryToSetSingleNode(node.links[place], toset, place, 0);
+ }
+
+ @SafeVarargs
+ public final void SetUpLinks(FlowerNode<V>... links) {
+ for (FlowerNode<V> node : links) {
+ int place = this.map.comparerison.apply(node);
+ this.TryToSetSingleNode(this, node, place);
+ }
+ }
+ }
+
+ static class Functions {
+
+ public static <V> Function<FlowerNode<V>, Integer> HashBasedFunction() {
+ return function -> function.hashCode() % function.map.petals;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java
new file mode 100644
index 0000000000..6ead05ce96
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/log/DebugLog.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.logging.FileHandler;
+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;
+
+ public static void initDebugLog(FMLPreInitializationEvent event) throws IOException {
+ if (DebugLog.init) return;
+ DebugLog.fh = new FileHandler(
+ new File(
+ new File(
+ event.getModConfigurationDirectory()
+ .getParentFile(),
+ "logs"),
+ "BWLog.log").toString());
+ DebugLog.utilLog = Logger.getLogger("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";
+ }
+ };
+ DebugLog.fh.setFormatter(formatter);
+ DebugLog.init = true;
+ }
+
+ public static void log(String record) {
+ if (!DebugLog.init) return;
+ DebugLog.utilLog.info(record);
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java
new file mode 100644
index 0000000000..8d9d539524
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/bartworks/util/package-info.java
@@ -0,0 +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.
+ */
+@API(owner = Mods.Names.BART_WORKS, apiVersion = API_REFERENCE.VERSION, provides = "bartworks util")
+package com.github.bartimaeusnek.bartworks.util;
+
+import com.github.bartimaeusnek.bartworks.API.API_REFERENCE;
+
+import cpw.mods.fml.common.API;
+import gregtech.api.enums.Mods;
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
new file mode 100644
index 0000000000..b1264fb9af
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.GTPlusPlus;
+import static gregtech.api.enums.Mods.GalacticraftCore;
+import static gregtech.api.enums.Mods.TecTech;
+
+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.API_REFERENCE;
+import com.github.bartimaeusnek.crossmod.GTpp.loader.RadioHatchCompat;
+import com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy;
+import com.github.bartimaeusnek.crossmod.tectech.TecTechResearchLoader;
+
+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;
+
+@Mod(
+ modid = BartWorksCrossmod.MOD_ID,
+ name = BartWorksCrossmod.NAME,
+ version = BartWorksCrossmod.VERSION,
+ dependencies = """
+ required-after:IC2;\
+ required-after:gregtech;\
+ required-after:bartworks;\
+ after:GalacticraftMars;\
+ after:GalacticraftCore;\
+ after:Micdoodlecore;\
+ after:miscutils;\
+ after:EMT;\
+ after:tectech;""")
+public class BartWorksCrossmod {
+
+ public static final String NAME = "BartWorks Mod Additions";
+ public static final String VERSION = API_REFERENCE.VERSION;
+ public static final String MOD_ID = "bartworkscrossmod";
+ public static final Logger LOGGER = LogManager.getLogger(BartWorksCrossmod.NAME);
+
+ @Mod.Instance(BartWorksCrossmod.MOD_ID)
+ public static BartWorksCrossmod instance;
+
+ @Mod.EventHandler
+ public void preInit(FMLPreInitializationEvent preinit) {
+ if (GalacticraftCore.isModLoaded()) {
+ GalacticraftProxy.preInit(preinit);
+ }
+ }
+
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent init) {
+ if (GalacticraftCore.isModLoaded()) {
+ GalacticraftProxy.init(init);
+ }
+ }
+
+ @Mod.EventHandler
+ public void postInit(FMLPostInitializationEvent init) {
+ if (GalacticraftCore.isModLoaded()) {
+ GalacticraftProxy.postInit(init);
+ }
+ if (GTPlusPlus.isModLoaded()) {
+ RadioHatchCompat.run();
+ }
+ if (TecTech.isModLoaded()) {
+ TecTechResearchLoader.runResearches();
+ }
+ }
+
+ @Mod.EventHandler
+ public void onFMLServerStart(FMLServerStartingEvent event) {
+ if (GTPlusPlus.isModLoaded()) {
+ for (Object s : RadioHatchCompat.TranslateSet) {
+ StringTranslate.inject(new ReaderInputStream(new StringReader((String) s)));
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java
new file mode 100644
index 0000000000..b8fcdb9135
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java
@@ -0,0 +1,285 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.GTPlusPlus;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.RegistryNamespaced;
+import net.minecraftforge.oredict.OreDictionary;
+
+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;
+
+public class RadioHatchCompat {
+
+ private static Class<?> intf;
+ private static Class<?> materialClass;
+ private static Class<?> enu;
+ private static Class<?> materialStackClass;
+
+ private static Field isRadioactive;
+ private static Field f;
+ private static Field componentType;
+ private static Field radlevel;
+ private static Field protons;
+
+ private static Field vMaterialInput;
+ private static Field stackMaterial;
+ private static Field RGBA;
+ private static Field localizedName;
+ private static Field unlocalizedName;
+
+ private static Object rod;
+ private static Object longRod;
+
+ public static HashSet<String> TranslateSet = new HashSet<>();
+
+ static {
+ try {
+ RadioHatchCompat.intf = Class.forName("gtPlusPlus.core.item.base.BaseItemComponent");
+ RadioHatchCompat.enu = Class.forName("gtPlusPlus.core.item.base.BaseItemComponent$ComponentTypes");
+ RadioHatchCompat.materialClass = Class.forName("gtPlusPlus.core.material.Material");
+ RadioHatchCompat.materialStackClass = Class.forName("gtPlusPlus.core.material.MaterialStack");
+
+ RadioHatchCompat.f = RadioHatchCompat.intf.getField("componentMaterial");
+ RadioHatchCompat.isRadioactive = RadioHatchCompat.materialClass.getField("isRadioactive");
+ RadioHatchCompat.componentType = RadioHatchCompat.intf.getDeclaredField("componentType");
+ RadioHatchCompat.radlevel = RadioHatchCompat.materialClass.getField("vRadiationLevel");
+
+ RadioHatchCompat.vMaterialInput = RadioHatchCompat.materialClass.getDeclaredField("vMaterialInput");
+ RadioHatchCompat.stackMaterial = RadioHatchCompat.materialStackClass.getDeclaredField("stackMaterial");
+ RadioHatchCompat.protons = RadioHatchCompat.materialClass.getDeclaredField("vProtons");
+ RadioHatchCompat.RGBA = RadioHatchCompat.materialClass.getDeclaredField("RGBA");
+ RadioHatchCompat.localizedName = RadioHatchCompat.materialClass.getDeclaredField("localizedName");
+ RadioHatchCompat.unlocalizedName = RadioHatchCompat.materialClass.getDeclaredField("unlocalizedName");
+
+ RadioHatchCompat.vMaterialInput.setAccessible(true);
+ RadioHatchCompat.stackMaterial.setAccessible(true);
+ RadioHatchCompat.protons.setAccessible(true);
+ RadioHatchCompat.RGBA.setAccessible(true);
+ RadioHatchCompat.localizedName.setAccessible(true);
+ RadioHatchCompat.unlocalizedName.setAccessible(true);
+
+ Object[] arr = RadioHatchCompat.enu.getEnumConstants();
+ for (Object o : arr) {
+ if (RadioHatchCompat.rod != null && RadioHatchCompat.longRod != null) break;
+ if ("ROD".equalsIgnoreCase(o.toString())) RadioHatchCompat.rod = o;
+ else if ("RODLONG".equalsIgnoreCase(o.toString())) RadioHatchCompat.longRod = o;
+ }
+
+ } catch (NoSuchFieldException | ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static void run() {
+ DebugLog.log("Starting Generation of missing GT++ rods/longrods");
+ try {
+ Class<? extends Item> rodclass = (Class<? extends Item>) Class
+ .forName("gtPlusPlus.core.item.base.rods.BaseItemRod");
+ Class<? extends Item> longrodclass = (Class<? extends Item>) Class
+ .forName("gtPlusPlus.core.item.base.rods.BaseItemRodLong");
+ Constructor<? extends Item> c1 = rodclass.getConstructor(RadioHatchCompat.materialClass);
+ Constructor<? extends Item> c2 = longrodclass.getConstructor(RadioHatchCompat.materialClass);
+ Field cOwners = GameData.class.getDeclaredField("customOwners");
+ cOwners.setAccessible(true);
+ Field map = RegistryNamespaced.class.getDeclaredField("field_148758_b");
+ 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);
+ ModContainer gtpp = null;
+ ModContainer bartworks = null;
+
+ for (ModContainer container : Loader.instance()
+ .getModList()) {
+ if (gtpp != null && bartworks != null) break;
+ if (BartWorksCrossmod.MOD_ID.equalsIgnoreCase(container.getModId())) bartworks = container;
+ else if (container.getModId()
+ .equalsIgnoreCase(GTPlusPlus.ID)) gtpp = container;
+ }
+
+ for (Object mats : (Set<?>) RadioHatchCompat.materialClass.getField("mMaterialMap")
+ .get(null)) {
+ if (RadioHatchCompat.isRadioactive.getBoolean(mats)) {
+
+ 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";
+ 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()) {
+ Item it2 = c2.newInstance(mats);
+ UniqueIdentifierMap.replace(it2, "miscutils:" + it2.getUnlocalizedName());
+ GameRegistry.UniqueIdentifier ui2 = GameRegistry.findUniqueIdentifierFor(it2);
+ ownerItems.replace(ui2, bartworks, gtpp);
+
+ DebugLog
+ .log("Generate: " + RadioHatchCompat.longRod + RadioHatchCompat.unlocalizedName.get(mats));
+ }
+ }
+ }
+ } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException
+ | InstantiationException | ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static IRadMaterial GTppRadChecker(ItemStack lStack) {
+ 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
+ : 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()));
+ }
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ static class GTPPRadAdapter implements IRadMaterial {
+
+ static final HashMap<Object, Integer> BUFFER = new HashMap<>();
+
+ GTPPRadAdapter(Object m) {
+ this.m = m;
+ }
+
+ GTPPRadAdapter(int amount, Object m) {
+ this.amount = (byte) amount;
+ this.m = m;
+ }
+
+ byte amount;
+ final Object m;
+
+ private static ArrayList<?> getMaterialInput(Object GTPPMaterial) throws IllegalAccessException {
+ Object ret = RadioHatchCompat.vMaterialInput.get(GTPPMaterial);
+ return ret instanceof ArrayList ? (ArrayList<?>) ret : new ArrayList<>();
+ }
+
+ private static boolean isElement(Object GTPPMaterial) throws IllegalAccessException {
+ return RadioHatchCompat.GTPPRadAdapter.getMaterialInput(GTPPMaterial)
+ .isEmpty();
+ }
+
+ private static List<?> getElemets(Object GTPPMaterial) throws IllegalAccessException {
+ ArrayList<Object> elements = new ArrayList<>();
+ Queue<Object> toCheck = new LinkedList<>();
+ ArrayList<?> materialInputs = RadioHatchCompat.GTPPRadAdapter.getMaterialInput(GTPPMaterial);
+ if (materialInputs.isEmpty()) return Collections.singletonList(GTPPMaterial);
+ for (Object materialStack : materialInputs) {
+ if (!RadioHatchCompat.GTPPRadAdapter.isElement(RadioHatchCompat.stackMaterial.get(materialStack)))
+ toCheck.add(RadioHatchCompat.stackMaterial.get(materialStack));
+ else elements.add(RadioHatchCompat.stackMaterial.get(materialStack));
+ }
+ while (!toCheck.isEmpty()) {
+ elements.addAll(GTPPRadAdapter.getElemets(toCheck.poll()));
+ }
+ return elements;
+ }
+
+ private static Integer calulateRad(Object m) {
+ int ret = 0;
+ try {
+ List<?> pureElements = RadioHatchCompat.GTPPRadAdapter.getElemets(m);
+ for (Object materialObj : pureElements) if (RadioHatchCompat.isRadioactive.getBoolean(materialObj))
+ ret += RadioHatchCompat.radlevel.getByte(m)
+ + RadioHatchCompat.GTPPRadAdapter.clampToZero(RadioHatchCompat.protons.getLong(materialObj));
+ else ret += RadioHatchCompat.radlevel.getByte(m);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return ret;
+ }
+
+ @Override
+ public int getRadiationLevel(ItemStack aStack) {
+ return RadioHatchCompat.GTPPRadAdapter.BUFFER
+ .computeIfAbsent(this.m, radlvl -> RadioHatchCompat.GTPPRadAdapter.calulateRad(this.m));
+ }
+
+ private static long clampToZero(long number) {
+ return number > 0 ? number : 0;
+ }
+
+ @Override
+ public byte getAmountOfMaterial(ItemStack aStack) {
+ return this.amount;
+ }
+
+ @Override
+ public short[] getColorForGUI(ItemStack aStack) {
+ short[] rgba = { 0, 0, 0, 0 };
+ try {
+ rgba = (short[]) RadioHatchCompat.RGBA.get(this.m);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return rgba;
+ }
+
+ @Override
+ public String getNameForGUI(ItemStack aStack) {
+ String ret = "";
+ try {
+ ret = (String) RadioHatchCompat.localizedName.get(this.m);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return ret;
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java
new file mode 100644
index 0000000000..adb3d42754
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/cls/CLSCompat.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Optional;
+
+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
+ private static long lastUpdate = 0;
+ private static Class alexiilMinecraftDisplayer;
+ private static Class alexiilProgressDisplayer;
+ private static Method displayProgress;
+ private static Field isRegisteringBartWorks;
+
+ static {
+ try {
+ alexiilMinecraftDisplayer = Class.forName("alexiil.mods.load.MinecraftDisplayer");
+ alexiilProgressDisplayer = Class.forName("alexiil.mods.load.ProgressDisplayer");
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+
+ Optional.ofNullable(alexiilMinecraftDisplayer)
+ .ifPresent(e -> {
+ try {
+ isRegisteringBartWorks = e.getField("isRegisteringBartWorks");
+ } catch (NoSuchFieldException ex) {
+ ex.printStackTrace();
+ }
+ });
+
+ Optional.ofNullable(alexiilProgressDisplayer)
+ .ifPresent(e -> {
+ try {
+ displayProgress = e.getMethod("displayProgress", String.class, float.class);
+ } catch (NoSuchMethodException ex) {
+ ex.printStackTrace();
+ }
+ });
+ }
+
+ public static Integer[] initCls() {
+ int sizeStep;
+ int sizeStep2 = 1;
+
+ try {
+ isRegisteringBartWorks.set(null, true);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+
+ if (Werkstoff.werkstoffHashSet.size() >= 100) sizeStep = Werkstoff.werkstoffHashSet.size() / 100 - 1;
+ else sizeStep = sizeStep2 = Werkstoff.werkstoffHashSet.size();
+
+ return new Integer[] { sizeStep, sizeStep2, sizeStep };
+ }
+
+ public static int invokeStepSize(Werkstoff werkstoff, Integer[] steps, int size) {
+ --steps[0];
+
+ long time = System.currentTimeMillis();
+ if (time - lastUpdate >= MINIMAL_UPDATE_INTERVAL) {
+ try {
+ displayProgress.invoke(null, werkstoff.getDefaultName(), (float) size / 10000);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ lastUpdate = time;
+ }
+
+ if (steps[0] == 0 && Werkstoff.werkstoffHashSet.size() >= 100) steps[0] = steps[2];
+
+ size += steps[1];
+ return size;
+ }
+
+ public static void disableCls() {
+ try {
+ isRegisteringBartWorks.set(null, false);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java
new file mode 100644
index 0000000000..da9bd49397
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java
@@ -0,0 +1,304 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS;
+import static gregtech.api.enums.GT_HatchElement.Energy;
+import static gregtech.api.enums.GT_HatchElement.InputBus;
+import static gregtech.api.enums.GT_HatchElement.InputHatch;
+import static gregtech.api.enums.GT_HatchElement.Maintenance;
+import static gregtech.api.enums.GT_HatchElement.OutputBus;
+import static gregtech.api.enums.GT_Values.VN;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.ChunkProviderServer;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.google.common.collect.ImmutableList;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.IHatchElement;
+import gregtech.api.objects.XSTR;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.shutdown.ShutDownReasonRegistry;
+import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
+
+public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_DrillerBase {
+
+ private VoidMinerUtility.DropMap dropMap = null;
+ private VoidMinerUtility.DropMap extraDropMap = null;
+ private float totalWeight;
+ private int multiplier = 1;
+
+ protected final byte TIER_MULTIPLIER;
+
+ private boolean mBlacklist = false;
+
+ /**
+ * @Deprecated Use {@link VoidMinerUtility#addBlockToDimensionList}
+ */
+ @Deprecated
+ public static void addBlockToDimensionList(int dimId, Block block, int meta, float weight) {
+ VoidMinerUtility.addBlockToDimensionList(dimId, block, meta, weight);
+ }
+
+ public GT_TileEntity_VoidMiner_Base(int aID, String aName, String aNameRegional, int tier) {
+ super(aID, aName, aNameRegional);
+ this.TIER_MULTIPLIER = (byte) Math.max(tier, 1);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setBoolean("mBlacklist", this.mBlacklist);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.mBlacklist = aNBT.getBoolean("mBlacklist");
+ }
+
+ public GT_TileEntity_VoidMiner_Base(String aName, int tier) {
+ super(aName);
+ this.TIER_MULTIPLIER = (byte) tier;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return this.TIER_MULTIPLIER + 5; // min tier = LuV
+ }
+
+ @Override
+ protected boolean checkHatches() {
+ return true;
+ }
+
+ @Override
+ protected void setElectricityStats() {
+ try {
+ this.mEUt = this.isPickingPipes ? 60 : Math.toIntExact(GT_Values.V[this.getMinTier()]);
+ } catch (ArithmeticException e) {
+ e.printStackTrace();
+ this.mEUt = Integer.MAX_VALUE - 7;
+ }
+ this.mOutputItems = new ItemStack[0];
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 10;
+ this.mEfficiency = this.getCurrentEfficiency(null);
+ this.mEfficiencyIncrease = 10000;
+ this.mEUt = this.mEUt > 0 ? -this.mEUt : this.mEUt;
+ }
+
+ @Override
+ 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 (this.dropMap == null || this.totalWeight == 0) this.calculateDropMap();
+
+ if (this.totalWeight != 0.f) {
+ this.handleFluidConsumption();
+ this.handleOutputs();
+ return true;
+ } else {
+ this.stopMachine(ShutDownReasonRegistry.NONE);
+ return false;
+ }
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ String casings = this.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()])
+ .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 * this.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")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(
+ this.getFrameMaterial().mName + " Frame Boxes",
+ "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[this.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")
+ .toolTipFinisher(MULTIBLOCK_ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS);
+ return tt;
+ }
+
+ @Override
+ protected List<IHatchElement<? super GT_MetaTileEntity_DrillerBase>> getAllowedHatches() {
+ return ImmutableList.of(InputHatch, InputBus, OutputBus, Maintenance, Energy);
+ }
+
+ /**
+ * method used to pick the next ore in the dropMap.
+ *
+ * @return the chosen ore
+ */
+ private ItemStack nextOre() {
+ float currentWeight = 0.f;
+ while (true) {
+ float randomNumber = XSTR.XSTR_INSTANCE.nextFloat() * this.totalWeight;
+ for (Map.Entry<GT_Utility.ItemId, Float> entry : this.dropMap.getInternalMap()
+ .entrySet()) {
+ currentWeight += entry.getValue();
+ if (randomNumber < currentWeight) return entry.getKey()
+ .getItemStack();
+ }
+ for (Map.Entry<GT_Utility.ItemId, Float> entry : this.extraDropMap.getInternalMap()
+ .entrySet()) {
+ currentWeight += entry.getValue();
+ if (randomNumber < currentWeight) return entry.getKey()
+ .getItemStack();
+ }
+ }
+ }
+
+ /**
+ * 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() {
+ for (FluidStack s : this.getStoredFluids()) {
+ for (int i = 0; i < VoidMinerUtility.NOBLE_GASSES.length; i++) {
+ FluidStack ng = VoidMinerUtility.NOBLE_GASSES[i];
+ if (ng.isFluidEqual(s)) {
+ this.multiplier = this.TIER_MULTIPLIER * VoidMinerUtility.NOBEL_GASSES_MULTIPLIER[i];
+ return s;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 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
+ */
+ private boolean consumeNobleGas(FluidStack gasToConsume) {
+ for (FluidStack s : this.getStoredFluids()) {
+ if (s.isFluidEqual(gasToConsume) && s.amount >= 1) {
+ s.amount -= 1;
+ this.updateSlots();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * handler for the fluid consumption
+ */
+ private void handleFluidConsumption() {
+ FluidStack storedNobleGas = this.getNobleGasInputAndSetMultiplier();
+ if (storedNobleGas == null || !this.consumeNobleGas(storedNobleGas)) this.multiplier = this.TIER_MULTIPLIER;
+ }
+
+ /**
+ * Handles the ores added manually with {@link VoidMinerUtility#addMaterialToDimensionList}
+ *
+ * @param id the specified dim id
+ */
+ private void handleExtraDrops(int id) {
+ if (VoidMinerUtility.extraDropsDimMap.containsKey(id)) {
+ extraDropMap = VoidMinerUtility.extraDropsDimMap.get(id);
+ }
+ }
+
+ /**
+ * Gets the DropMap of the dim for the specified dim id
+ *
+ * @param id the dim number
+ */
+ private void handleModDimDef(int id) {
+ if (VoidMinerUtility.dropMapsByDimId.containsKey(id)) {
+ this.dropMap = VoidMinerUtility.dropMapsByDimId.get(id);
+ } else {
+ String chunkProviderName = ((ChunkProviderServer) this.getBaseMetaTileEntity()
+ .getWorld()
+ .getChunkProvider()).currentChunkProvider.getClass()
+ .getName();
+
+ if (VoidMinerUtility.dropMapsByChunkProviderName.containsKey(chunkProviderName)) {
+ this.dropMap = VoidMinerUtility.dropMapsByChunkProviderName.get(chunkProviderName);
+ }
+ }
+ }
+
+ /**
+ * 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() {
+ this.dropMap = new VoidMinerUtility.DropMap();
+ this.extraDropMap = new VoidMinerUtility.DropMap();
+ int id = this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId;
+ this.handleModDimDef(id);
+ this.handleExtraDrops(id);
+ this.totalWeight = dropMap.getTotalWeight() + extraDropMap.getTotalWeight();
+ }
+
+ /**
+ * Output logic of the VM
+ */
+ private void handleOutputs() {
+ final List<ItemStack> inputOres = this.getStoredInputs()
+ .stream()
+ .filter(GT_Utility::isOre)
+ .collect(Collectors.toList());;
+ final ItemStack output = this.nextOre();
+ output.stackSize = multiplier;
+ if (inputOres.size() == 0 || this.mBlacklist && inputOres.stream()
+ .noneMatch(is -> GT_Utility.areStacksEqual(is, output))
+ || !this.mBlacklist && inputOres.stream()
+ .anyMatch(is -> GT_Utility.areStacksEqual(is, output)))
+ this.addOutput(output);
+ this.updateSlots();
+ }
+
+ @Override
+ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ this.mBlacklist = !this.mBlacklist;
+ GT_Utility.sendChatToPlayer(aPlayer, "Mode: " + (this.mBlacklist ? "Blacklist" : "Whitelist"));
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java
new file mode 100644
index 0000000000..5f15bd6c09
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiners.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_TileEntity_VoidMiners {
+
+ public static class VMLUV extends GT_TileEntity_VoidMiner_Base {
+
+ public VMLUV(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 1);
+ }
+
+ public VMLUV(String aName, int tier) {
+ super(aName, tier);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_UV;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Europium;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 8;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new VMLUV(this.mName, this.TIER_MULTIPLIER);
+ }
+ }
+
+ public static class VMZPM extends GT_TileEntity_VoidMiner_Base {
+
+ public VMZPM(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 2);
+ }
+
+ public VMZPM(String aName, int tier) {
+ super(aName, tier);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_MiningBlackPlutonium;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.BlackPlutonium;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 179;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new VMZPM(this.mName, this.TIER_MULTIPLIER);
+ }
+ }
+
+ public static class VMUV extends GT_TileEntity_VoidMiner_Base {
+
+ public VMUV(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 3);
+ }
+
+ public VMUV(String aName, int tier) {
+ super(aName, tier);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_MiningNeutronium;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Neutronium;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 178;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new VMUV(this.mName, this.TIER_MULTIPLIER);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/VoidMinerUtility.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/VoidMinerUtility.java
new file mode 100644
index 0000000000..5254da24f1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/VoidMinerUtility.java
@@ -0,0 +1,316 @@
+package com.github.bartimaeusnek.crossmod.galacticgreg;
+
+import static bloodasp.galacticgreg.registry.GalacticGregRegistry.getModContainers;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+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 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.ModContainer;
+import bloodasp.galacticgreg.api.ModDimensionDef;
+import bloodasp.galacticgreg.bartworks.BW_Worldgen_Ore_Layer_Space;
+import bloodasp.galacticgreg.bartworks.BW_Worldgen_Ore_SmallOre_Space;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.ISubTagContainer;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.GT_Worldgen_GT_Ore_Layer;
+import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces;
+
+public class VoidMinerUtility {
+
+ public static final FluidStack[] NOBLE_GASSES = { WerkstoffLoader.Neon.getFluidOrGas(1),
+ WerkstoffLoader.Krypton.getFluidOrGas(1), WerkstoffLoader.Xenon.getFluidOrGas(1),
+ WerkstoffLoader.Oganesson.getFluidOrGas(1) };
+ public static final int[] NOBEL_GASSES_MULTIPLIER = { 4, 8, 16, 64 };
+
+ public static class DropMap {
+
+ private float totalWeight;
+ private final Map<GT_Utility.ItemId, Float> internalMap;
+
+ public DropMap() {
+ internalMap = new HashMap<>();
+ totalWeight = 0;
+ }
+
+ /**
+ * Method used to add an ore to the DropMap
+ *
+ * @param weight the non normalised weight
+ * @param isBWOres true for BW ores, false for GT ores
+ */
+ public void addDrop(int meta, float weight, boolean isBWOres) {
+ if (isBWOres) {
+ addDrop(WerkstoffLoader.BWOres, meta, weight);
+ } else {
+ addDrop(GregTech_API.sBlockOres1, meta, weight);
+ }
+ }
+
+ /**
+ * Method used to add any item to the DropMap. Will be blocked if blacklisted.
+ *
+ * @param weight the non normalised weight
+ */
+ public void addDrop(Block block, int meta, float weight) {
+ if (ConfigHandler.voidMinerBlacklist.contains(
+ String.format(
+ "%s:%d",
+ GameRegistry.findUniqueIdentifierFor(block)
+ .toString(),
+ meta)))
+ return;
+ Item item = Item.getItemFromBlock(block);
+ addDrop(item, meta, weight);
+ }
+
+ /**
+ * Method used to add any item to the DropMap. Will be blocked if blacklisted.
+ *
+ * @param weight the non normalised weight
+ */
+ public void addDrop(ItemStack itemStack, float weight) {
+ Item item = itemStack.getItem();
+ int meta = Items.feather.getDamage(itemStack);
+ if (ConfigHandler.voidMinerBlacklist.contains(
+ String.format(
+ "%s:%d",
+ GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(item))
+ .toString(),
+ meta)))
+ return;
+ addDrop(item, meta, weight);
+ }
+
+ private void addDrop(Item item, int meta, float weight) {
+ GT_Utility.ItemId ore = GT_Utility.ItemId.createNoCopy(item, meta, null);
+ internalMap.merge(ore, weight, Float::sum);
+ totalWeight += weight;
+ }
+
+ public float getTotalWeight() {
+ return totalWeight;
+ }
+
+ public Map<GT_Utility.ItemId, Float> getInternalMap() {
+ return internalMap;
+ }
+ }
+
+ public static final Map<Integer, DropMap> dropMapsByDimId = new HashMap<>();
+ public static final Map<String, DropMap> dropMapsByChunkProviderName = new HashMap<>();
+ public static final Map<Integer, DropMap> extraDropsDimMap = new HashMap<>();
+
+ // Adds tellurium to OW to ensure a way to get it, as it's used in Magneto Resonatic
+ // Dust and Circuit Compound MK3 Dust
+ static {
+ addMaterialToDimensionList(0, Materials.Tellurium, 8.0f);
+ }
+
+ /**
+ * Computes the ores of the dims
+ */
+ public static void generateDropMaps() {
+ // vanilla dims
+ dropMapsByDimId.put(-1, getDropMapVanilla(-1));
+ dropMapsByDimId.put(0, getDropMapVanilla(0));
+ dropMapsByDimId.put(1, getDropMapVanilla(1));
+ // Twilight Forest
+ dropMapsByDimId.put(7, getDropMapVanilla(7));
+
+ // ross dims
+ dropMapsByDimId.put(ConfigHandler.ross128BID, getDropMapRoss(ConfigHandler.ross128BID));
+ dropMapsByDimId.put(ConfigHandler.ross128BAID, getDropMapRoss(ConfigHandler.ross128BAID));
+
+ // other space dims
+ for (ModContainer modContainer : getModContainers()) {
+ for (ModDimensionDef dimDef : modContainer.getDimensionList()) {
+ dropMapsByChunkProviderName.put(dimDef.getChunkProviderName(), getDropMapSpace(dimDef));
+ }
+ }
+ }
+
+ /**
+ * Method to generate a DropMap that contains ores of a vanilla GT worldgen
+ */
+ private static DropMap getDropMapVanilla(int dimId) {
+ DropMap dropMap = new DropMap();
+
+ // Ore Veins
+ Predicate<GT_Worldgen_GT_Ore_Layer> oreLayerPredicate = makeOreLayerPredicate(dimId);
+ GT_Worldgen_GT_Ore_Layer.sList.stream()
+ .filter(gt_worldgen -> gt_worldgen.mEnabled && oreLayerPredicate.test(gt_worldgen))
+ .forEach(element -> {
+ dropMap.addDrop(element.mPrimaryMeta, element.mWeight, false);
+ dropMap.addDrop(element.mSecondaryMeta, element.mWeight, false);
+ dropMap.addDrop(element.mSporadicMeta, element.mWeight / 8f, false);
+ dropMap.addDrop(element.mBetweenMeta, element.mWeight / 8f, false);
+ });
+
+ // Small Ores
+ Predicate<GT_Worldgen_GT_Ore_SmallPieces> smallOresPredicate = makeSmallOresPredicate(dimId);
+ GT_Worldgen_GT_Ore_SmallPieces.sList.stream()
+ .filter(gt_worldgen -> gt_worldgen.mEnabled && smallOresPredicate.test(gt_worldgen))
+ .forEach(element -> dropMap.addDrop(element.mMeta, element.mAmount, false));
+ return dropMap;
+ }
+
+ /**
+ * Makes a predicate for the GT normal ore veins worldgen
+ *
+ * @return the predicate
+ */
+ private static Predicate<GT_Worldgen_GT_Ore_Layer> makeOreLayerPredicate(int dimensionId) {
+ return switch (dimensionId) {
+ case -1 -> gt_worldgen -> gt_worldgen.mNether;
+ case 0 -> gt_worldgen -> gt_worldgen.mOverworld;
+ case 1 -> gt_worldgen -> gt_worldgen.mEnd || gt_worldgen.mEndAsteroid;
+ /*
+ * explicitly giving different dim numbers so that it default to false in the config, keeping compat with
+ * the current worldgen config
+ */
+ case 7 -> gt_worldgen -> gt_worldgen.isGenerationAllowed("Twilight Forest", 0, 7);
+ default -> throw new IllegalStateException();
+ };
+ }
+
+ /**
+ * Makes a predicate for the GT normal small ore worldgen
+ *
+ * @return the predicate
+ */
+ private static Predicate<GT_Worldgen_GT_Ore_SmallPieces> makeSmallOresPredicate(int dimensionId) {
+ return switch (dimensionId) {
+ case -1 -> gt_worldgen -> gt_worldgen.mNether;
+ case 0 -> gt_worldgen -> gt_worldgen.mOverworld;
+ case 1 -> gt_worldgen -> gt_worldgen.mEnd;
+ /*
+ * explicitly giving different dim numbers so that it default to false in the config, keeping compat with
+ * the current worldgen config
+ */
+ case 7 -> gt_worldgen -> gt_worldgen.isGenerationAllowed("Twilight Forest", 0, 7);
+ default -> throw new IllegalStateException();
+ };
+ }
+
+ /**
+ * Create a DropMap that contains ores of Ross dims
+ *
+ * @param aID dim id of Ross128b or Ross128ba
+ */
+ private static DropMap getDropMapRoss(int aID) {
+ DropMap dropMap = new DropMap();
+ for (BW_OreLayer oreLayer : BW_OreLayer.sList) {
+ if (oreLayer.mEnabled && oreLayer.isGenerationAllowed("", aID, 0)) {
+ List<ItemStack> data = oreLayer.getStacks();
+ dropMap.addDrop(data.get(0), oreLayer.mWeight);
+ dropMap.addDrop(data.get(1), oreLayer.mWeight);
+ dropMap.addDrop(data.get(2), oreLayer.mWeight / 8f);
+ dropMap.addDrop(data.get(3), oreLayer.mWeight / 8f);
+ }
+ }
+ return dropMap;
+ }
+
+ /**
+ * Create a DropMap contains the ores from the galacticGreg space worldgen corresponding to the target dim
+ *
+ * @param finalDef ModDimensionDef corresponding to the target dim
+ */
+ private static DropMap getDropMapSpace(ModDimensionDef finalDef) {
+ DropMap dropMap = new DropMap();
+
+ // Normal Ore Veins
+ GalacticGreg.oreVeinWorldgenList.stream()
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled
+ && gt_worldgen instanceof GT_Worldgen_GT_Ore_Layer_Space oreLayerSpace
+ && oreLayerSpace.isEnabledForDim(finalDef))
+ .map(gt_worldgen -> (GT_Worldgen_GT_Ore_Layer_Space) gt_worldgen)
+ .forEach(element -> {
+ dropMap.addDrop(element.mPrimaryMeta, element.mWeight, false);
+ dropMap.addDrop(element.mSecondaryMeta, element.mWeight, false);
+ dropMap.addDrop(element.mSporadicMeta, element.mWeight / 8f, false);
+ dropMap.addDrop(element.mBetweenMeta, element.mWeight / 8f, false);
+ });
+
+ // Normal Small Ores
+ GalacticGreg.smallOreWorldgenList.stream()
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled
+ && gt_worldgen instanceof GT_Worldgen_GT_Ore_SmallPieces_Space oreSmallPiecesSpace
+ && oreSmallPiecesSpace.isEnabledForDim(finalDef))
+ .map(gt_worldgen -> (GT_Worldgen_GT_Ore_SmallPieces_Space) gt_worldgen)
+ .forEach(element -> dropMap.addDrop(element.mMeta, element.mAmount, false));
+
+ // BW Ore Veins
+ try {
+ GalacticGreg.oreVeinWorldgenList.stream()
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled
+ && gt_worldgen instanceof BW_Worldgen_Ore_Layer_Space oreLayerSpace
+ && oreLayerSpace.isEnabledForDim(finalDef))
+ .map(gt_worldgen -> (BW_Worldgen_Ore_Layer_Space) gt_worldgen)
+ .forEach(oreLayer -> {
+ List<ItemStack> data = oreLayer.getStacks();
+ dropMap.addDrop(data.get(0), oreLayer.mWeight);
+ dropMap.addDrop(data.get(1), oreLayer.mWeight);
+ dropMap.addDrop(data.get(2), oreLayer.mWeight / 8f);
+ dropMap.addDrop(data.get(3), oreLayer.mWeight / 8f);
+ });
+ } catch (NullPointerException ignored) {}
+
+ // BW Small Ores
+ try {
+ GalacticGreg.smallOreWorldgenList.stream()
+ .filter(
+ gt_worldgen -> gt_worldgen.mEnabled
+ && gt_worldgen instanceof BW_Worldgen_Ore_SmallOre_Space smallOreSpace
+ && smallOreSpace.isEnabledForDim(finalDef))
+ .map(gt_worldgen -> (BW_Worldgen_Ore_SmallOre_Space) gt_worldgen)
+ .forEach(element -> dropMap.addDrop(element.mPrimaryMeta, element.mDensity, element.bwOres != 0));
+ } catch (NullPointerException ignored) {}
+ return dropMap;
+ }
+
+ public static void addBlockToDimensionList(int dimId, Block block, int meta, float weight) {
+ if (!extraDropsDimMap.containsKey(dimId)) {
+ extraDropsDimMap.put(dimId, new DropMap());
+ }
+ extraDropsDimMap.get(dimId)
+ .addDrop(block, meta, weight);
+ }
+
+ /**
+ * Public method giving other mods the ability to add manually a material with an ore version into the external
+ * dropMap for a specified dim id
+ *
+ * @param DimensionID the dim id targeted
+ * @param Material the material with an ore version
+ * @param weight the non normalised version of the given weight
+ */
+ public static void addMaterialToDimensionList(int DimensionID, ISubTagContainer Material, float weight) {
+ if (Material instanceof Materials gtMaterial) {
+ addBlockToDimensionList(DimensionID, GregTech_API.sBlockOres1, gtMaterial.mMetaItemSubID, weight);
+ } else if (Material instanceof Werkstoff werkstoff) {
+ addBlockToDimensionList(DimensionID, WerkstoffLoader.BWOres, werkstoff.getmID(), weight);
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java
new file mode 100644
index 0000000000..972254e2d9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/GalacticraftProxy.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public class GalacticraftProxy {
+
+ public static GT_UO_DimensionList uo_dimensionList = new GT_UO_DimensionList();
+ static Configuration gtConf;
+
+ private GalacticraftProxy() {}
+
+ public static void postInit(FMLPostInitializationEvent e) {
+ if (SideReference.Side.Server || SideReference.EffectiveSide.Server) {
+ GalacticraftProxy.serverPostInit(e);
+ } else {
+ GalacticraftProxy.clientPostInit(e);
+ }
+ GalacticraftProxy.commonPostInit(e);
+ }
+
+ public static void preInit(FMLPreInitializationEvent e) {
+ if (SideReference.Side.Server || SideReference.EffectiveSide.Server) {
+ GalacticraftProxy.serverpreInit(e);
+ } else {
+ GalacticraftProxy.clientpreInit(e);
+ }
+ GalacticraftProxy.commonpreInit(e);
+ }
+
+ private static void serverpreInit(FMLPreInitializationEvent e) {}
+
+ 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.uo_dimensionList.getConfig(GalacticraftProxy.gtConf, "undergroundfluid");
+ BW_WorldGenRoss128b.initundergroundFluids();
+ BW_WorldGenRoss128ba.init_undergroundFluids();
+ if (GalacticraftProxy.gtConf.hasChanged()) GalacticraftProxy.gtConf.save();
+ BW_WorldGenRoss128b.initOres();
+ BW_WorldGenRoss128ba.init_Ores();
+ MinecraftForge.EVENT_BUS.register(BWAtmosphereManager.INSTANCE);
+ }
+
+ public static void init(FMLInitializationEvent e) {
+ if (SideReference.Side.Server || SideReference.EffectiveSide.Server) {
+ GalacticraftProxy.serverInit(e);
+ } else {
+ GalacticraftProxy.clientInit(e);
+ }
+ GalacticraftProxy.commonInit(e);
+ }
+
+ private static void serverInit(FMLInitializationEvent e) {}
+
+ private static void clientInit(FMLInitializationEvent e) {}
+
+ private static void commonInit(FMLInitializationEvent e) {
+ if (ConfigHandler.Ross128Enabled) Ross128SolarSystem.init();
+ }
+
+ private static void serverPostInit(FMLPostInitializationEvent e) {}
+
+ private static void clientPostInit(FMLPostInitializationEvent e) {}
+
+ private static void commonPostInit(FMLPostInitializationEvent e) {}
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java
new file mode 100644
index 0000000000..c9cff6cd9e
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.crossmod.galacticraft;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+
+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;
+
+public class PlanetsHelperClass {
+
+ public static EntityLanderBase getLanderType(EntityPlayerMP player) {
+ return switch (ConfigHandler.landerType) {
+ case 1 -> new EntityLander(player);
+ case 2 -> new EntityLandingBalloons(player);
+ default -> new EntityEntryPod(player);
+ };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java
new file mode 100644
index 0000000000..b6fa575b5c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.GalacticraftMars;
+
+import java.util.Random;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldServer;
+
+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;
+
+public class UniversalTeleportType implements ITeleportType {
+
+ @Override
+ public boolean useParachute() {
+ return false;
+ }
+
+ @Override
+ public Vector3 getPlayerSpawnLocation(WorldServer world, EntityPlayerMP player) {
+ return this.getEntitySpawnLocation(world, player);
+ }
+
+ @Override
+ public Vector3 getEntitySpawnLocation(WorldServer world, Entity entity) {
+ if (entity instanceof EntityPlayerMP) {
+ GCPlayerStats stats = GCPlayerStats.get((EntityPlayerMP) entity);
+ return new Vector3(stats.coordsTeleportedFromX, 500D, stats.coordsTeleportedFromZ);
+ }
+ return new Vector3(entity.posX, 500D, entity.posZ);
+ }
+
+ @Override
+ public Vector3 getParaChestSpawnLocation(WorldServer world, EntityPlayerMP player, Random rand) {
+ return null;
+ }
+
+ @Override
+ public void onSpaceDimensionChanged(World newWorld, EntityPlayerMP player, boolean ridingAutoRocket) {
+ if (ridingAutoRocket) return;
+ if (player != null && GCPlayerStats.get(player).teleportCooldown <= 0) {
+ if (player.capabilities.isFlying) {
+ player.capabilities.isFlying = false;
+ }
+
+ EntityLanderBase elb;
+ if (GalacticraftMars.isModLoaded()) elb = PlanetsHelperClass.getLanderType(player);
+ else elb = new EntityLander(player);
+
+ if (!newWorld.isRemote) {
+ newWorld.spawnEntityInWorld(elb);
+ }
+ GCPlayerStats.get(player).teleportCooldown = 10;
+ }
+ }
+
+ @Override
+ public void setupAdventureSpawn(EntityPlayerMP player) {}
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java
new file mode 100644
index 0000000000..fa6d2db382
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+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 micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
+import micdoodle8.mods.galacticraft.api.galaxies.GalaxyRegistry;
+import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas;
+
+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 });
+ }
+
+ public static final BWAtmosphereManager INSTANCE = new BWAtmosphereManager();
+
+ 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);
+ }
+
+ public static void removeGasFromWorld(int worldID, ISubTagContainer gas) {
+ for (Pair<ISubTagContainer, Integer> pair : BWAtmosphereManager.gasConcentration.get(worldID)) {
+ if (pair.getKey()
+ .equals(gas)) {
+ BWAtmosphereManager.gasConcentration.get(worldID)
+ .remove(pair);
+ return;
+ }
+ }
+ }
+
+ public static void addGasToWorld(int worldID, ISubTagContainer gas, int amount) {
+ Pair<ISubTagContainer, Integer> toadd = new Pair<>(gas, amount);
+ BWAtmosphereManager.gasConcentration.put(worldID, toadd);
+ }
+
+ public static void addGasToWorld(int worldID, Pair<ISubTagContainer, Integer> toPut) {
+ BWAtmosphereManager.gasConcentration.put(worldID, toPut);
+ }
+
+ @SafeVarargs
+ public static void addGasToWorld(int worldID, Pair<ISubTagContainer, Integer>... toPut) {
+ Arrays.stream(toPut)
+ .forEach(toadd -> BWAtmosphereManager.gasConcentration.put(worldID, toadd));
+ }
+
+ private static boolean addGCGasToWorld(int worldID, IAtmosphericGas gas, int aNumber, int aMaxNumber) {
+ if (IAtmosphericGas.CO2.equals(gas)) {
+ BWAtmosphereManager.addGasToWorld(
+ worldID,
+ Materials.CarbonDioxide,
+ BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]);
+ return true;
+ }
+ String name = gas.toString();
+ name = name.charAt(0) + name.substring(1)
+ .toLowerCase(Locale.US);
+ ISubTagContainer mat = Materials.get(name);
+ if (mat == Materials._NULL) {
+ mat = WerkstoffLoader.getWerkstoff(name);
+ }
+ if (mat == Werkstoff.default_null_Werkstoff) {
+ return false;
+ }
+ BWAtmosphereManager.addGasToWorld(worldID, mat, BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]);
+ return true;
+ }
+
+ @SubscribeEvent
+ 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());
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java
new file mode 100644
index 0000000000..af9d9647af
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.crossmod.galacticraft.blocks;
+
+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) {
+ super(name, texture, SpaceTab.getInstance(), Material.rock);
+ }
+
+ @Override
+ public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
+ return true;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java
new file mode 100644
index 0000000000..5d9b9c3cc1
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.crossmod.galacticraft.creativetabs;
+
+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");
+
+ private SpaceTab(String label) {
+ super(label);
+ }
+
+ public static SpaceTab getInstance() {
+ return SpaceTab.instance;
+ }
+
+ @Override
+ public Item getTabIconItem() {
+ return ItemRegistry.DESTRUCTOPACK;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java
new file mode 100644
index 0000000000..61c52865cf
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.crossmod.galacticraft.planets;
+
+import micdoodle8.mods.galacticraft.api.prefab.world.gen.WorldProviderSpace;
+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;
+ }
+
+ @Override
+ public String getDimensionName() {
+ return this.getCelestialBody()
+ .getLocalizedName();
+ }
+
+ @Override
+ public boolean hasSunset() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
new file mode 100644
index 0000000000..b477154d39
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.Thaumcraft;
+import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE;
+import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFalling;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraft.world.gen.ChunkProviderGenerate;
+import net.minecraft.world.gen.MapGenBase;
+import net.minecraft.world.gen.MapGenCaves;
+import net.minecraft.world.gen.MapGenRavine;
+import net.minecraft.world.gen.feature.WorldGenLakes;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.terraingen.PopulateChunkEvent;
+import net.minecraftforge.event.terraingen.TerrainGen;
+
+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();
+ private final World worldObj;
+ private final MapGenBase caveGenerator = new MapGenCaves();
+ private final MapGenBase ravineGenerator = new MapGenRavine();
+ private final MapGenRuins.RuinsBase ruinsBase = new MapGenRuins.RuinsBase();
+
+ public ChunkProviderRoss128b(World par1World, long seed, boolean mapFeaturesEnabled) {
+ super(par1World, seed, mapFeaturesEnabled);
+ this.worldObj = par1World;
+ }
+
+ @Override
+ public List<SpawnListEntry> getPossibleCreatures(EnumCreatureType p_73155_1_, int p_73155_2_, int p_73155_3_,
+ int p_73155_4_) {
+ return null;
+ }
+
+ @Override
+ public Chunk provideChunk(int p_73154_1_, int p_73154_2_) {
+ this.rand.setSeed(p_73154_1_ * 341873128712L + p_73154_2_ * 132897987541L);
+ 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()
+ .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];
+ if (biomeGenBase.biomeID == BiomeGenBase.mushroomIsland.biomeID) {
+ this.biomesForGeneration[i] = BiomeGenBase.taiga;
+ } else if (biomeGenBase.biomeID == BiomeGenBase.mushroomIslandShore.biomeID) {
+ this.biomesForGeneration[i] = BiomeGenBase.stoneBeach;
+ }
+ if (Thaumcraft.isModLoaded()) {
+ if (ThaumcraftHandler.isTaintBiome(biomeGenBase.biomeID))
+ this.biomesForGeneration[i] = BiomeGenBase.taiga;
+ else if (ConfigHandler.disableMagicalForest
+ && ThaumcraftHandler.isMagicalForestBiome(biomeGenBase.biomeID))
+ this.biomesForGeneration[i] = BiomeGenBase.birchForest;
+ }
+ }
+ this.replaceBlocksForBiome(p_73154_1_, p_73154_2_, ablock, abyte, this.biomesForGeneration);
+ this.caveGenerator.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock);
+ this.ravineGenerator.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock);
+
+ Chunk chunk = new Chunk(this.worldObj, ablock, abyte, p_73154_1_, p_73154_2_);
+ byte[] abyte1 = chunk.getBiomeArray();
+
+ for (int k = 0; k < abyte1.length; ++k) {
+ abyte1[k] = (byte) this.biomesForGeneration[k].biomeID;
+ }
+
+ chunk.generateSkylightMap();
+ return chunk;
+ }
+
+ @Override
+ public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) {
+ BlockFalling.fallInstantly = true;
+ int k = p_73153_2_ * 16;
+ int l = p_73153_3_ * 16;
+ BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
+ this.rand.setSeed(this.worldObj.getSeed());
+ if (p_73153_2_ % 4 == 0 || p_73153_3_ % 4 == 0) {
+ long i1 = this.rand.nextLong() / 2L * 2L + 1L;
+ long j1 = this.rand.nextLong() / 2L * 2L + 1L;
+ this.rand.setSeed(p_73153_2_ * i1 + 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));
+
+ int x1;
+ int y1;
+ int z1;
+ 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);
+ z1 = l + this.rand.nextInt(16) + 8;
+ int rni = this.rand.nextInt(8);
+ 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
+ && biomegenbase != BiomeGenBase.river
+ && biomegenbase != BiomeGenBase.frozenOcean
+ && biomegenbase != BiomeGenBase.frozenRiver
+ && this.rand.nextInt(ConfigHandler.ross128bRuinChance) == 0) {
+ x1 = k + this.rand.nextInt(16) + 3;
+ y1 = this.rand.nextInt(256);
+ z1 = l + this.rand.nextInt(16) + 3;
+ this.ruinsBase.generate(this.worldObj, this.rand, x1, y1, z1);
+ }
+
+ biomegenbase.decorate(this.worldObj, this.rand, k, l);
+
+ k += 8;
+ l += 8;
+
+ boolean doGen = TerrainGen.populate(p_73153_1_, this.worldObj, this.rand, p_73153_2_, p_73153_3_, false, ICE);
+ for (x1 = 0; doGen && x1 < 16; ++x1) {
+ for (y1 = 0; y1 < 16; ++y1) {
+ z1 = this.worldObj.getPrecipitationHeight(k + x1, l + y1);
+
+ if (this.worldObj.isBlockFreezable(x1 + k, z1 - 1, y1 + l)) {
+ this.worldObj.setBlock(x1 + k, z1 - 1, y1 + l, Blocks.ice, 0, 2);
+ }
+
+ if (this.worldObj.func_147478_e(x1 + k, z1, y1 + l, true)) {
+ this.worldObj.setBlock(x1 + k, z1, y1 + l, Blocks.snow_layer, 0, 2);
+ }
+ }
+ }
+
+ 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));
+
+ BlockFalling.fallInstantly = false;
+ }
+
+ @Override
+ 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_) {
+ 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) {
+ blocks[i] = Blocks.dirt;
+ metas[i] = 2;
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java
new file mode 100644
index 0000000000..d5368b3f0d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java
@@ -0,0 +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.
+ */
+
+package com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b;
+
+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");
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java
new file mode 100644
index 0000000000..7a0c9a743c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
+import micdoodle8.mods.galacticraft.api.vector.Vector3;
+
+public class WorldProviderRoss128b extends AbstractWorldProviderSpace {
+
+ @Override
+ public boolean canRespawnHere() {
+ return true;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public Vec3 getFogColor(float cy, float noidea) {
+ float angle = MathHelper.cos(cy * (float) Math.PI * 2.0F) * 2.0F + 0.5F;
+
+ if (angle < 0.0F) {
+ angle = 0.0F;
+ }
+
+ if (angle > 1.0F) {
+ angle = 1.0F;
+ }
+
+ float red = 200 / 255f;
+ float green = 80 / 255f;
+ float blue = 0.0F;
+ red *= angle * 0.94F + 0.06F;
+ green *= angle * 0.94F + 0.06F;
+ return Vec3.createVectorHelper(red, green, blue);
+ }
+
+ @Override
+ public Vector3 getFogColor() {
+ // unused
+ return null;
+ }
+
+ @Override
+ public float getSunBrightness(float par1) {
+ return super.getSunBrightness(par1) * 0.975f;
+ }
+
+ @Override
+ public float calculateCelestialAngle(long par1, float par3) {
+ return super.calculateCelestialAngle(par1, par3);
+ }
+
+ @Override
+ public Vector3 getSkyColor() {
+ float red = 200 / 255f;
+ float green = 120 / 255f;
+ float blue = 0.0F;
+ return new Vector3(red, green, blue);
+ }
+
+ @Override
+ public long getDayLength() {
+ return (long) (24000 * 9.9f);
+ }
+
+ @Override
+ public Class<? extends IChunkProvider> getChunkProviderClass() {
+ return ChunkProviderRoss128b.class;
+ }
+
+ @Override
+ public Class<? extends WorldChunkManager> getWorldChunkManagerClass() {
+ return WorldChunkManager.class;
+ }
+
+ @Override
+ public float getGravity() {
+ return -0.0035F;
+ }
+
+ @Override
+ public double getMeteorFrequency() {
+ return 0D;
+ }
+
+ @Override
+ public double getFuelUsageMultiplier() {
+ return 1.35D;
+ }
+
+ @Override
+ public boolean canSpaceshipTierPass(int tier) {
+ return Ross128SolarSystem.Ross128b.getTierRequirement() <= tier;
+ }
+
+ @Override
+ public float getFallDamageModifier() {
+ return 1.35F;
+ }
+
+ @Override
+ public float getSoundVolReductionAmount() {
+ return 1F;
+ }
+
+ @Override
+ public float getThermalLevelModifier() {
+ return 0.01f;
+ }
+
+ @Override
+ public float getWindLevel() {
+ return 1.35f;
+ }
+
+ @Override
+ public CelestialBody getCelestialBody() {
+ return Ross128SolarSystem.Ross128b;
+ }
+
+ @Override
+ public double getYCoordinateToTeleport() {
+ return 500D;
+ }
+
+ @Override
+ public double getSolarEnergyMultiplier() {
+ return 1.38D;
+ }
+
+ @Override
+ public boolean hasBreathableAtmosphere() {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java
new file mode 100644
index 0000000000..18a8eadd2c
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.Arrays;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFalling;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+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;
+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;
+
+public class ChunkProviderRoss128ba extends ChunkProviderMoon {
+
+ private final XSTR rand = new XSTR();
+ private final World worldObj;
+ private BiomeGenBase[] biomesForGeneration;
+ private final MapGenBaseMeta caveGenerator;
+
+ public ChunkProviderRoss128ba(World world, long seed, boolean mapFeaturesEnabled) {
+ super(world, seed, mapFeaturesEnabled);
+ this.biomesForGeneration = new BiomeGenBase[] { BiomeGenBaseMoon.moonFlat };
+ this.caveGenerator = new MapGenCavesMoon();
+ this.worldObj = world;
+ }
+
+ @Override
+ public Chunk provideChunk(int cx, int cz) {
+ this.rand.setSeed(cx * 341873128712L + cz * 132897987541L);
+ Block[] ids = new Block[65536];
+ byte[] meta = new byte[65536];
+ Arrays.fill(ids, Blocks.air);
+ this.generateTerrain(cx, cz, ids, meta);
+ 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);
+ this.caveGenerator.generate(this, this.worldObj, cx, cz, ids, meta);
+ Chunk Chunk = new Chunk(this.worldObj, ids, meta, cx, cz);
+ Chunk.generateSkylightMap();
+ return Chunk;
+ }
+
+ @Override
+ public void decoratePlanet(World par1World, Random par2Random, int par3, int par4) {}
+
+ @Override
+ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
+ super.populate(par1IChunkProvider, par2, par3);
+ BlockFalling.fallInstantly = true;
+ ChunkProviderRoss128b.BWOreGen.generate(this.rand, par2, par3, this.worldObj, this, this);
+ BlockFalling.fallInstantly = false;
+ }
+
+ private int getIndex(int x, int y, int z) {
+ return (x * 16 + z) * 256 + y;
+ }
+
+ final Block lowerBlockID = GCBlocks.blockMoon;
+ final BartsNoise noiseGen = new BartsNoise(2, 0.008F, 1D, System.nanoTime());
+ final BartsNoise noiseGen2 = new BartsNoise(2, 0.01F, 1D, System.nanoTime());
+ final BartsNoise noiseGen3 = new BartsNoise(2, 0.002F, 1D, System.nanoTime());
+
+ @Override
+ public void generateTerrain(int chunkX, int chunkZ, Block[] idArray, byte[] metaArray) {
+ for (int x = 0; x < 16; ++x) {
+ for (int z = 0; z < 16; ++z) {
+ double d = this.noiseGen.getNoise(x + chunkX * 16, z + chunkZ * 16);
+ double d2 = this.noiseGen2.getNoise(x + chunkX * 16, z + chunkZ * 16);
+ double d3 = this.noiseGen3.getCosNoise(x + chunkX * 16, z + chunkZ * 16);
+
+ double yDev = d * 4 + d2 * 2 + d3;
+
+ for (int y = 0; y < 128; ++y) {
+ if (y < 60.0D + yDev) {
+ idArray[this.getIndex(x, y, z)] = this.lowerBlockID;
+ int var10001 = this.getIndex(x, y, z);
+ metaArray[var10001] = 4;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java
new file mode 100644
index 0000000000..38c014a467
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/WorldProviderRoss128ba.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 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;
+
+import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
+import micdoodle8.mods.galacticraft.api.vector.Vector3;
+import micdoodle8.mods.galacticraft.core.world.gen.WorldChunkManagerMoon;
+
+public class WorldProviderRoss128ba extends AbstractWorldProviderSpace {
+
+ @Override
+ public Vector3 getFogColor() {
+ return new Vector3(0, 0, 0);
+ }
+
+ @Override
+ public Vector3 getSkyColor() {
+ return new Vector3(0, 0, 0);
+ }
+
+ @Override
+ public long getDayLength() {
+ return MathUtils.floorLong(24000f * 9.9f / 100f);
+ }
+
+ @Override
+ public boolean hasSunset() {
+ return false;
+ }
+
+ @Override
+ public Class<? extends IChunkProvider> getChunkProviderClass() {
+ return ChunkProviderRoss128ba.class;
+ }
+
+ @Override
+ public Class<? extends WorldChunkManager> getWorldChunkManagerClass() {
+ return WorldChunkManagerMoon.class;
+ }
+
+ @Override
+ public double getYCoordinateToTeleport() {
+ return 500;
+ }
+
+ @Override
+ public float getGravity() {
+ return 0.060f;
+ }
+
+ @Override
+ public double getMeteorFrequency() {
+ return 9D;
+ }
+
+ @Override
+ public double getFuelUsageMultiplier() {
+ return 0.7D;
+ }
+
+ @Override
+ public boolean canSpaceshipTierPass(int i) {
+ return i >= Ross128SolarSystem.Ross128ba.getTierRequirement();
+ }
+
+ @Override
+ public float getFallDamageModifier() {
+ return 0.2f;
+ }
+
+ @Override
+ public float getSoundVolReductionAmount() {
+ return 20f;
+ }
+
+ @Override
+ public float getThermalLevelModifier() {
+ return 0;
+ }
+
+ @Override
+ public float getWindLevel() {
+ return 0;
+ }
+
+ @Override
+ public CelestialBody getCelestialBody() {
+ return Ross128SolarSystem.Ross128ba;
+ }
+
+ @Override
+ public double getSolarEnergyMultiplier() {
+ return 1.9D;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java
new file mode 100644
index 0000000000..f7bdec79eb
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.GalaxySpace;
+
+import java.util.Arrays;
+
+import net.minecraft.util.ResourceLocation;
+
+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 micdoodle8.mods.galacticraft.api.GalacticraftRegistry;
+import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
+import micdoodle8.mods.galacticraft.api.galaxies.GalaxyRegistry;
+import micdoodle8.mods.galacticraft.api.galaxies.Moon;
+import micdoodle8.mods.galacticraft.api.galaxies.Planet;
+import micdoodle8.mods.galacticraft.api.galaxies.SolarSystem;
+import micdoodle8.mods.galacticraft.api.galaxies.Star;
+import micdoodle8.mods.galacticraft.api.vector.Vector3;
+import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas;
+import micdoodle8.mods.galacticraft.core.GalacticraftCore;
+
+public class Ross128SolarSystem {
+
+ public static SolarSystem Ross128System;
+ public static Star Ross128;
+ public static Planet Ross128b;
+ public static Moon Ross128ba;
+
+ private Ross128SolarSystem() {}
+
+ public static void init() {
+
+ Ross128SolarSystem.Ross128System = new SolarSystem("Ross128System", "milkyWay")
+ .setMapPosition(new Vector3(-0.5D, 0.65D, 0.0D));
+ Ross128SolarSystem.Ross128 = (Star) new Star("Ross128").setParentSolarSystem(Ross128SolarSystem.Ross128System)
+ .setTierRequired(-1);
+ Ross128SolarSystem.Ross128.setUnreachable();
+ Ross128SolarSystem.Ross128
+ .setBodyIcon(new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/MapObjs/Ross128.png"));
+ Ross128SolarSystem.Ross128System.setMainStar(Ross128SolarSystem.Ross128);
+
+ Ross128SolarSystem.Ross128b = new Planet("Ross128b").setParentSolarSystem(Ross128SolarSystem.Ross128System);
+ Ross128SolarSystem.Ross128b.setRingColorRGB(0x9F / 255f, 0x8A / 255f, 0x79 / 255f);
+ Ross128SolarSystem.Ross128b.setPhaseShift(1.25F);
+ Ross128SolarSystem.Ross128b.setBodyIcon(
+ 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.setDimensionInfo(ConfigHandler.ross128BID, WorldProviderRoss128b.class);
+ Ross128SolarSystem.Ross128b.setTierRequired(ConfigHandler.ross128btier);
+
+ Ross128SolarSystem.Ross128ba = new Moon("Ross128ba").setParentPlanet(Ross128SolarSystem.Ross128b);
+ Ross128SolarSystem.Ross128ba.setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(10f, 15f))
+ .setRelativeOrbitTime(1 / 0.01F);
+ Ross128SolarSystem.Ross128ba.setBodyIcon(
+ new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/MapObjs/Ross128ba.png"));
+ Ross128SolarSystem.Ross128ba.setDimensionInfo(ConfigHandler.ross128BAID, WorldProviderRoss128ba.class);
+ Ross128SolarSystem.Ross128ba
+ .setTierRequired(GalaxySpace.isModLoaded() ? Math.min(ConfigHandler.ross128btier + 2, 8) : 3);
+
+ GalaxyRegistry.registerSolarSystem(Ross128SolarSystem.Ross128System);
+ GalaxyRegistry.registerPlanet(Ross128SolarSystem.Ross128b);
+ GalaxyRegistry.registerMoon(Ross128SolarSystem.Ross128ba);
+ GalacticraftRegistry.registerRocketGui(
+ WorldProviderRoss128b.class,
+ new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/overworldRocketGui.png"));
+ GalacticraftRegistry.registerRocketGui(
+ WorldProviderRoss128ba.class,
+ new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/moonRocketGui.png"));
+ GalacticraftRegistry.registerTeleportType(WorldProviderRoss128b.class, new UniversalTeleportType());
+ GalacticraftRegistry.registerTeleportType(WorldProviderRoss128ba.class, new UniversalTeleportType());
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java
new file mode 100644
index 0000000000..cc9b1dcc2d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+
+public class GT_NBT_DataBase {
+
+ private static final BiMap<NBTTagCompound, Long> tagIdBiMap = HashBiMap.create();
+ private static final BiMap<GT_NBT_DataBase, Long> GTNBTBIMAP = HashBiMap.create();
+
+ private static long maxID = Long.MIN_VALUE + 1;
+
+ private final NBTTagCompound tagCompound;
+
+ private final String mDataName;
+ private final String mDataTitle;
+ private long id;
+
+ GT_NBT_DataBase(String mDataName, String mDataTitle, NBTTagCompound tagCompound) {
+ this.mDataName = mDataName;
+ this.mDataTitle = mDataTitle;
+ this.tagCompound = tagCompound;
+ this.id = GT_NBT_DataBase.maxID;
+ GT_NBT_DataBase.tagIdBiMap.put(tagCompound, this.id);
+ GT_NBT_DataBase.GTNBTBIMAP.put(this, this.id);
+ ++GT_NBT_DataBase.maxID;
+ }
+
+ static GT_NBT_DataBase getGTTagFromId(Long id) {
+ return GT_NBT_DataBase.GTNBTBIMAP.inverse()
+ .get(id);
+ }
+
+ static Long getIdFromGTTag(GT_NBT_DataBase tagCompound) {
+ return GT_NBT_DataBase.GTNBTBIMAP.get(tagCompound);
+ }
+
+ static NBTTagCompound getTagFromId(Long id) {
+ return GT_NBT_DataBase.tagIdBiMap.inverse()
+ .get(id);
+ }
+
+ static Long getIdFromTag(NBTTagCompound tagCompound) {
+ return GT_NBT_DataBase.tagIdBiMap.get(tagCompound);
+ }
+
+ public NBTTagCompound getTagCompound() {
+ return this.tagCompound;
+ }
+
+ public String getmDataName() {
+ return this.mDataName;
+ }
+
+ static long getMaxID() {
+ return GT_NBT_DataBase.maxID;
+ }
+
+ public String getmDataTitle() {
+ return this.mDataTitle;
+ }
+
+ public long getId() {
+ return this.id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ private GT_NBT_DataBase(NBTTagCompound tagCompound, String mDataName, String mDataTitle, long id) {
+ this.tagCompound = tagCompound;
+ this.mDataName = mDataName;
+ this.mDataTitle = mDataTitle;
+ this.id = id;
+ }
+
+ 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/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
new file mode 100644
index 0000000000..fdfe3d7ee9
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+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.enums.Mods;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.behaviors.Behaviour_DataOrb;
+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;
+
+@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = Mods.Names.OPEN_COMPUTERS)
+public class TileEntity_GTDataServer extends TileEntity
+ implements ISidedInventory, ITileAddsInformation, ITileHasDifferentTextureSides, SimpleComponent {
+
+ private final BiMap<Long, GT_NBT_DataBase> OrbDataBase = HashBiMap.create();
+
+ private ItemStack[] mItems = new ItemStack[2];
+ private byte TickTimer;
+
+ @Optional.Method(modid = Mods.Names.OPEN_COMPUTERS)
+ public String getComponentName() {
+ return "GT-Data Server";
+ }
+
+ @Optional.Method(modid = Mods.Names.OPEN_COMPUTERS)
+ @Callback
+ public Object[] listData(Context context, Arguments args) {
+ Set<String> ret = new HashSet<>();
+ for (Map.Entry<Long, GT_NBT_DataBase> entry : this.OrbDataBase.entrySet()) {
+ ret.add(
+ entry.getValue()
+ .getId() + Long.MAX_VALUE
+ + ". "
+ + entry.getValue()
+ .getmDataTitle());
+ }
+ return ret.toArray(new String[0]);
+ }
+
+ @Optional.Method(modid = Mods.Names.OPEN_COMPUTERS)
+ @Callback
+ public Object[] imprintOrb(Context context, Arguments args) {
+ return new Object[] { false };
+ }
+
+ private boolean isServerSide() {
+ return !this.worldObj.isRemote || SideReference.Side.Server;
+ }
+
+ @Override
+ public void updateEntity() {
+ if (this.TickTimer++ % 20 != 0) return;
+
+ if (this.isServerSide()) {
+ if (GT_Utility.areStacksEqual(this.mItems[0], ItemList.Tool_DataOrb.get(1))
+ && this.mItems[0].hasTagCompound()) {
+ if (GT_NBT_DataBase.getIdFromTag(this.mItems[0].getTagCompound()) == null) {
+ this.OrbDataBase.put(
+ GT_NBT_DataBase.getMaxID(),
+ new GT_NBT_DataBase(
+ Behaviour_DataOrb.getDataName(this.mItems[0]),
+ Behaviour_DataOrb.getDataTitle(this.mItems[0]),
+ this.mItems[0].getTagCompound()));
+ } else {
+ long id = GT_NBT_DataBase.getIdFromTag(this.mItems[0].getTagCompound());
+ this.OrbDataBase.put(id, GT_NBT_DataBase.getGTTagFromId(id));
+ }
+ }
+ if (GT_Utility.areStacksEqual(this.mItems[0], ItemList.Tool_DataStick.get(1))
+ && this.mItems[0].hasTagCompound()) {
+
+ String bookTitle = GT_Utility.ItemNBT.getBookTitle(this.mItems[0]);
+ String punchcardData = GT_Utility.ItemNBT.getPunchCardData(this.mItems[0]);
+ 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"
+ : data == 2 ? "Punch Card Data" : data == 3 ? "Map Data" : "Custom Data";
+ if (GT_NBT_DataBase.getIdFromTag(this.mItems[0].getTagCompound()) == null) {
+ this.OrbDataBase.put(
+ GT_NBT_DataBase.getMaxID(),
+ new GT_NBT_DataBase(name, title, this.mItems[0].getTagCompound()));
+ } else {
+ long id = GT_NBT_DataBase.getIdFromTag(this.mItems[0].getTagCompound());
+ this.OrbDataBase.put(id, GT_NBT_DataBase.getGTTagFromId(id));
+ }
+ }
+ }
+ }
+
+ @Override
+ public String[] getInfoData() {
+ return new String[0];
+ }
+
+ @Override
+ public void registerBlockIcons(IIconRegister par1IconRegister) {}
+
+ @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 this.mItems.length;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int slotIn) {
+ return slotIn == 0 ? this.mItems[0] : this.mItems[1];
+ }
+
+ @Override
+ public ItemStack decrStackSize(int index, int count) {
+ return null;
+ }
+
+ @Override
+ public ItemStack getStackInSlotOnClosing(int index) {
+ return null;
+ }
+
+ @Override
+ public void setInventorySlotContents(int index, ItemStack stack) {
+ if (index > 1 || index < 0) return;
+ this.mItems[index] = stack;
+ }
+
+ @Override
+ public String getInventoryName() {
+ return null;
+ }
+
+ @Override
+ public boolean hasCustomInventoryName() {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 1;
+ }
+
+ @Override
+ public boolean isUseableByPlayer(EntityPlayer player) {
+ return true;
+ }
+
+ @Override
+ public void openInventory() {}
+
+ @Override
+ public void closeInventory() {}
+
+ @Override
+ public boolean isItemValidForSlot(int index, ItemStack stack) {
+ return index == 0;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java
new file mode 100644
index 0000000000..a760c5e256
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechResearchLoader.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 static gregtech.api.enums.Mods.GalactiGreg;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
+
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
+import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+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.enums.TierEU;
+import gregtech.api.util.GT_OreDictUnificator;
+
+public class TecTechResearchLoader {
+
+ public static void runResearches() {
+ Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null
+ ? FluidRegistry.getFluid("molten.indalloy140")
+ : FluidRegistry.getFluid("molten.solderingalloy");
+
+ if (GalactiGreg.isModLoaded()) {
+ TT_recipeAdder.addResearchableAssemblylineRecipe(
+ ItemRegistry.voidminer[0].copy(),
+ 1024000,
+ 256,
+ (int) TierEU.RECIPE_ZPM,
+ 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) },
+ ItemRegistry.voidminer[1].copy(),
+ 5 * MINUTES,
+ (int) TierEU.RECIPE_ZPM);
+
+ TT_recipeAdder.addResearchableAssemblylineRecipe(
+ ItemRegistry.voidminer[1].copy(),
+ 8192000,
+ 512,
+ (int) TierEU.RECIPE_UV,
+ 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) },
+ ItemRegistry.voidminer[2].copy(),
+ 5 * MINUTES,
+ (int) TierEU.RECIPE_UV);
+ }
+
+ TT_recipeAdder.addResearchableAssemblylineRecipe(
+ ItemList.Machine_Multi_ImplosionCompressor.get(1L),
+ 64000,
+ 48,
+ (int) TierEU.RECIPE_UV,
+ 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.SuperconductorUHV, 64),
+ ItemList.Electric_Piston_UV.get(64), },
+ new FluidStack[] { new FluidStack(solderIndalloy, 1440), Materials.Osmium.getMolten(1440),
+ Materials.Neutronium.getMolten(1440) },
+ ItemRegistry.eic.copy(),
+ 5 * MINUTES,
+ (int) TierEU.RECIPE_UV);
+
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java
new file mode 100644
index 0000000000..e3a2065ed5
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/LowPowerLaser.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public interface LowPowerLaser extends IMetaTileEntity, IConnectsToEnergyTunnel {
+
+ boolean isSender();
+
+ boolean isReceiver();
+
+ boolean isTunnel();
+
+ default boolean isConnectedCorrectly(ForgeDirection side) {
+ return false;
+ }
+
+ default void setEUVar(long aEnergy) {}
+
+ default long getAMPERES() {
+ return -1;
+ }
+
+ default long maxEUInput() {
+ return -1;
+ }
+
+ default long maxEUOutput() {
+ return -1;
+ }
+
+ default long maxEUStore() {
+ return -1;
+ }
+
+ default long getTotalPower() {
+ return this.getAMPERES() * Math.max(this.maxEUOutput(), this.maxEUInput()) - this.getAMPERES() / 20;
+ }
+
+ default void moveAroundLowPower(IGregTechTileEntity aBaseMetaTileEntity) {
+ byte color = this.getBaseMetaTileEntity()
+ .getColorization();
+ if (color >= 0) {
+ ForgeDirection front = aBaseMetaTileEntity.getFrontFacing();
+ ForgeDirection opposite = front.getOpposite();
+
+ for (short dist = 1; dist < 250; ++dist) {
+ IGregTechTileEntity tGTTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityAtSideAndDistance(front, dist);
+ if (tGTTileEntity == null || tGTTileEntity.getColorization() != color) {
+ return;
+ }
+
+ IMetaTileEntity aMetaTileEntity = tGTTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return;
+ }
+
+ if (aMetaTileEntity instanceof LowPowerLaser lowPowerLaser && lowPowerLaser.isReceiver()
+ && opposite == tGTTileEntity.getFrontFacing()) {
+ if (this.maxEUOutput() > lowPowerLaser.maxEUInput()
+ || this.getAMPERES() > lowPowerLaser.getAMPERES()) {
+ aMetaTileEntity.doExplosion(this.maxEUOutput());
+ this.setEUVar(aBaseMetaTileEntity.getStoredEU() - this.maxEUOutput());
+ return;
+ }
+
+ if (this.maxEUOutput() == lowPowerLaser.maxEUInput()) {
+ long diff = Math.min(
+ this.getAMPERES() * 20L * this.maxEUOutput(),
+ Math.min(
+ lowPowerLaser.maxEUStore() - aMetaTileEntity.getBaseMetaTileEntity()
+ .getStoredEU(),
+ aBaseMetaTileEntity.getStoredEU()));
+ this.setEUVar(aBaseMetaTileEntity.getStoredEU() - diff);
+ lowPowerLaser.setEUVar(
+ aMetaTileEntity.getBaseMetaTileEntity()
+ .getStoredEU() + diff);
+ }
+ return;
+ }
+
+ if ((!(aMetaTileEntity instanceof LowPowerLaser lowPowerLaser) || !lowPowerLaser.isTunnel())
+ && !(aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_Energy)) {
+ return;
+ }
+
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_Energy tePipeEnergy) {
+ if (tePipeEnergy.connectionCount < 2) {
+ return;
+ }
+ tePipeEnergy.markUsed();
+ return;
+ }
+
+ if (aMetaTileEntity instanceof LowPowerLaser lowPowerLaser && lowPowerLaser.isTunnel()
+ && !lowPowerLaser.isConnectedCorrectly(front)) {
+ return;
+ }
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java
new file mode 100644
index 0000000000..c1d751739f
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.Optional;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+
+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) {
+ 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) {
+ 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) {
+ 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) {
+ super(aName, aTier, aInvSlotCount, aDescription, aTextures);
+ this.AMPERES = aAmperes;
+ }
+
+ @Override
+ public long getAMPERES() {
+ return this.AMPERES;
+ }
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity iGregTechTileEntity, int i, ForgeDirection side,
+ ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity iGregTechTileEntity, int i, ForgeDirection side,
+ ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public boolean isInputFacing(ForgeDirection side) {
+ return true;
+ }
+
+ @Override
+ public boolean isOutputFacing(ForgeDirection side) {
+ return true;
+ }
+
+ @Override
+ public boolean shouldJoinIc2Enet() {
+ return true;
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return true;
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound nbtTagCompound) {
+ Optional.ofNullable(nbtTagCompound)
+ .ifPresent(tag -> tag.setLong("AMPERES", this.AMPERES));
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound nbtTagCompound) {
+ if (nbtTagCompound != null && nbtTagCompound.hasKey("AMPERES")) {
+ this.AMPERES = nbtTagCompound.getLong("AMPERES");
+ }
+ }
+
+ @Override
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ return true;
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(ForgeDirection facing) {
+ return true;
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return false;
+ }
+
+ @Override
+ public boolean isEnetOutput() {
+ return false;
+ }
+
+ @Override
+ public long maxEUInput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public long maxEUOutput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public boolean isTeleporterCompatible() {
+ return false;
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return GT_Values.V[this.mTier + 1];
+ }
+
+ @Override
+ public long maxEUStore() {
+ return 512L + GT_Values.V[this.mTier + 1] * 24L * this.AMPERES;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java
new file mode 100644
index 0000000000..b79ddb4a44
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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.minecraftforge.common.util.ForgeDirection;
+
+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;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+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) {
+ 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) {
+ super(aName, aTier, aAmperes, 0, aDescription, aTextures);
+ }
+
+ @Override
+ public boolean isSender() {
+ return this.getBaseMetaTileEntity()
+ .isAllowedToWork();
+ }
+
+ @Override
+ public boolean isReceiver() {
+ return !this.getBaseMetaTileEntity()
+ .isAllowedToWork();
+ }
+
+ @Override
+ public boolean isTunnel() {
+ return false;
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return !this.getBaseMetaTileEntity()
+ .isAllowedToWork() ? this.AMPERES : 0;
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return this.getBaseMetaTileEntity()
+ .isAllowedToWork() ? this.AMPERES + this.AMPERES / 4 : 0;
+ }
+
+ @Override
+ public boolean hasAlternativeModeText() {
+ return true;
+ }
+
+ @Override
+ public String getAlternativeModeText() {
+ return this.isReceiver() ? "Set to receiving mode" : "Set to sending mode";
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return this.getBaseMetaTileEntity()
+ .isAllowedToWork();
+ }
+
+ @Override
+ public boolean isEnetOutput() {
+ return !this.getBaseMetaTileEntity()
+ .isAllowedToWork();
+ }
+
+ @Override
+ public boolean canConnect(ForgeDirection side) {
+ return side == this.getBaseMetaTileEntity()
+ .getFrontFacing();
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new TT_MetaTileEntity_LowPowerLaserBox(
+ this.mName,
+ this.mTier,
+ this.AMPERES,
+ this.mDescriptionArray,
+ this.mTextures);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork());
+
+ byte Tick = (byte) (int) (aTick % 20L);
+ if (16 == Tick) {
+ if (aBaseMetaTileEntity.getStoredEU() > 0L) {
+ this.setEUVar(aBaseMetaTileEntity.getStoredEU() - this.AMPERES);
+ if (aBaseMetaTileEntity.getStoredEU() < 0L) {
+ this.setEUVar(0L);
+ }
+ }
+ if (this.getBaseMetaTileEntity()
+ .isAllowedToWork() && aBaseMetaTileEntity.getStoredEU() > this.getMinimumStoredEU()) {
+ this.moveAroundLowPower(aBaseMetaTileEntity);
+ }
+ }
+ }
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ 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] };
+ }
+
+ return rTextures;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
+ int aColorIndex, boolean aActive, boolean aRedstone) {
+ return this.mTextures[Math.min(2, side.ordinal()) + (side == facing ? 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() };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java
new file mode 100644
index 0000000000..5a9cd8048b
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 org.apache.commons.lang3.ArrayUtils;
+
+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;
+
+public class TT_MetaTileEntity_LowPowerLaserDynamo extends GT_MetaTileEntity_Hatch_DynamoTunnel
+ implements LowPowerLaser {
+
+ public TT_MetaTileEntity_LowPowerLaserDynamo(int aID, String aName, String aNameRegional, int aTier, int aAmp) {
+ super(aID, aName, aNameRegional, aTier, aAmp);
+ }
+
+ 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.mDescriptionArray,
+ this.mTextures);
+ }
+
+ @Override
+ public boolean isSender() {
+ return true;
+ }
+
+ @Override
+ public boolean isReceiver() {
+ return false;
+ }
+
+ @Override
+ public boolean isTunnel() {
+ return false;
+ }
+
+ @Override
+ public long getAMPERES() {
+ return this.Amperes;
+ }
+
+ @Override
+ public String[] getDescription() {
+ return ArrayUtils.addAll(
+ this.mDescriptionArray,
+ 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
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ byte Tick = (byte) (int) (aTick % 20L);
+ if (16 == Tick && aBaseMetaTileEntity.getStoredEU() > 0L) {
+ this.setEUVar(aBaseMetaTileEntity.getStoredEU() - this.Amperes);
+ if (aBaseMetaTileEntity.getStoredEU() < 0L) {
+ this.setEUVar(0L);
+ }
+ }
+ if (aBaseMetaTileEntity.getStoredEU() > this.getMinimumStoredEU()) {
+ this.moveAroundLowPower(aBaseMetaTileEntity);
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java
new file mode 100644
index 0000000000..6b6b6c3558
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 org.apache.commons.lang3.ArrayUtils;
+
+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;
+
+public class TT_MetaTileEntity_LowPowerLaserHatch extends GT_MetaTileEntity_Hatch_EnergyTunnel
+ implements LowPowerLaser {
+
+ public TT_MetaTileEntity_LowPowerLaserHatch(int aID, String aName, String aNameRegional, int aTier, int aAmp) {
+ super(aID, aName, aNameRegional, aTier, aAmp);
+ }
+
+ 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 ArrayUtils.addAll(
+ this.mDescriptionArray,
+ 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.mDescriptionArray,
+ this.mTextures);
+ }
+
+ @Override
+ public boolean isSender() {
+ return false;
+ }
+
+ @Override
+ public boolean isReceiver() {
+ return true;
+ }
+
+ @Override
+ public boolean isTunnel() {
+ return false;
+ }
+
+ @Override
+ public long getAMPERES() {
+ return this.Amperes;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java
new file mode 100644
index 0000000000..38ad31688d
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_CoverBehavior;
+import gregtech.common.GT_Client;
+import ic2.core.Ic2Items;
+
+public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Cable implements LowPowerLaser {
+
+ public TT_MetaTileEntity_Pipe_Energy_LowPower(int aID, String aName, String aNameRegional) {
+ 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) {
+ super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new TT_MetaTileEntity_Pipe_Energy_LowPower(
+ this.mName,
+ this.mThickNess,
+ this.mMaterial,
+ this.mCableLossPerMeter,
+ this.mAmperage,
+ this.mVoltage,
+ this.mInsulated,
+ this.mCanShock);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aTick % 20 == 13 && aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected == 4) {
+ aBaseMetaTileEntity.issueTextureUpdate();
+ }
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection siide, byte aConnections,
+ int aColorIndex, boolean aConnected, boolean aRedstone) {
+ return new ITexture[] { TextureFactory.of(
+ Block.getBlockFromItem(Ic2Items.glassFiberCableBlock.getItem()),
+ Ic2Items.glassFiberCableBlock.getItemDamage(),
+ siide) };
+ }
+
+ @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() };
+ }
+
+ @Override
+ public boolean isSender() {
+ return false;
+ }
+
+ @Override
+ public boolean isReceiver() {
+ return false;
+ }
+
+ @Override
+ public boolean isTunnel() {
+ return true;
+ }
+
+ public boolean canConnect(ForgeDirection side) {
+ return true;
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return false;
+ }
+
+ @Override
+ public boolean isConnectedCorrectly(ForgeDirection side) {
+ return this.isConnectedAtSide(side) && this.isConnectedAtSide(side.getOpposite());
+ }
+
+ @Override
+ public boolean shouldJoinIc2Enet() {
+ return false;
+ }
+
+ @Override
+ public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
+ return 0L;
+ }
+
+ @Override
+ @Deprecated
+ public long transferElectricity(ForgeDirection side, long aVoltage, long aAmperage,
+ ArrayList<TileEntity> aAlreadyPassedTileEntityList) {
+ return 0L;
+ }
+
+ @Override
+ public long transferElectricity(ForgeDirection side, long aVoltage, long aAmperage,
+ HashSet<TileEntity> aAlreadyPassedSet) {
+ return 0L;
+ }
+
+ @Override
+ public boolean letsIn(GT_CoverBehavior coverBehavior, ForgeDirection side, int aCoverID, int aCoverVariable,
+ ICoverable aTileEntity) {
+ return true;
+ }
+
+ @Override
+ public boolean letsOut(GT_CoverBehavior coverBehavior, ForgeDirection side, int aCoverID, int aCoverVariable,
+ ICoverable aTileEntity) {
+ return true;
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java
new file mode 100644
index 0000000000..2959bc2fb2
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/tgregworks/MaterialsInjector.java
@@ -0,0 +1,82 @@
+package com.github.bartimaeusnek.crossmod.tgregworks;
+
+import static gregtech.api.enums.Mods.TinkersGregworks;
+
+import net.minecraftforge.common.config.Property;
+
+import com.github.bartimaeusnek.bartworks.API.API_REFERENCE;
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import vexatos.tgregworks.TGregworks;
+import vexatos.tgregworks.item.ItemTGregPart;
+import vexatos.tgregworks.reference.Config;
+
+@Mod(
+ modid = MaterialsInjector.MOD_ID,
+ name = MaterialsInjector.NAME,
+ version = MaterialsInjector.VERSION,
+ dependencies = """
+ required-after:IC2;\
+ required-after:gregtech;\
+ required-after:bartworks;\
+ before:TGregworks;\
+ before:miscutils;""")
+public class MaterialsInjector {
+
+ public static final String NAME = "BartWorks Mod Additions - TGregworks Container";
+ public static final String VERSION = API_REFERENCE.VERSION;
+ public static final String MOD_ID = "bartworkscrossmodtgregworkscontainer";
+
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent init) {
+ if (TinkersGregworks.isModLoaded()) {
+ MaterialsInjector.run();
+ }
+ }
+
+ public static void run() {
+ 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)
+ .forEach(m -> {
+ setConfigProps(m);
+ registerParts(m);
+ });
+
+ TGregworks.registry.configProps.clear();
+ TGregworks.registry.configIDs.clear();
+
+ ItemTGregPart.toolMaterialNames = TGregworks.registry.toolMaterialNames;
+ }
+
+ private static void registerParts(Materials m) {
+ TGregworks.registry.toolMaterialNames.add(m.mDefaultLocalName);
+ int matID = TGregworks.registry.getMaterialID(m);
+
+ TGregworks.registry.addToolMaterial(matID, m);
+ TGregworks.registry.addBowMaterial(matID, m);
+ TGregworks.registry.addArrowMaterial(matID, m);
+
+ TGregworks.registry.matIDs.put(m, matID);
+ TGregworks.registry.materialIDMap.put(matID, m);
+ }
+
+ 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);
+ TGregworks.registry.configProps.put(m, configProp);
+ TGregworks.registry.configIDs.add(configProp.getInt());
+ }
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java
new file mode 100644
index 0000000000..c52e440383
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 net.minecraftforge.common.util.ForgeDirection;
+
+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;
+
+public class GT_Multi_IndustrialCrucible extends GT_MetaTileEntity_MultiBlockBase {
+
+ public GT_Multi_IndustrialCrucible(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_Multi_IndustrialCrucible(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack itemStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return null;
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[0];
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, ForgeDirection side, ForgeDirection facing,
+ int colorIndex, boolean b3, boolean b4) {
+ return new ITexture[0];
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java
new file mode 100644
index 0000000000..79e606d536
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer;
+import gregtech.api.util.GT_ModHandler;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+
+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);
+ }
+
+ public GT_WandBuffer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) {
+ super(aName, aTier, aDescription, aTextures, aSlotCount);
+ }
+
+ public GT_WandBuffer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) {
+ super(aName, aTier, aDescription, aTextures, aSlotCount);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L;
+ this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L;
+ this.mBatteryCount = 0;
+ this.mChargeableCount = 0;
+
+ for (ItemStack tStack : this.mInventory) {
+ if (ThaumcraftHandler.isWand(tStack)) {
+ ++this.mBatteryCount;
+ ++this.mChargeableCount;
+ }
+ }
+ }
+ }
+
+ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return ThaumcraftHandler.isWand(aStack);
+ }
+
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return ThaumcraftHandler.isWand(aStack);
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 1;
+ }
+
+ @Override
+ public long[] getStoredEnergy() {
+ boolean scaleOverflow = false;
+ boolean storedOverflow = false;
+ long tScale = this.getBaseMetaTileEntity()
+ .getEUCapacity();
+ long tStored = this.getBaseMetaTileEntity()
+ .getStoredEU();
+ long tStep;
+ if (this.mInventory != null) {
+
+ for (ItemStack aStack : this.mInventory) {
+ if (GT_ModHandler.isElectricItem(aStack)) {
+ if (aStack.getItem() instanceof GT_MetaBase_Item) {
+ Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack);
+ if (stats != null) {
+ if (stats[0] > 4611686018427387903L) {
+ scaleOverflow = true;
+ }
+
+ tScale += stats[0];
+ tStep = ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack);
+ if (tStep > 4611686018427387903L) {
+ storedOverflow = true;
+ }
+
+ tStored += tStep;
+ }
+ } else if (aStack.getItem() instanceof IElectricItem) {
+ tStored += (long) ElectricItem.manager.getCharge(aStack);
+ tScale += (long) ((IElectricItem) aStack.getItem()).getMaxCharge(aStack);
+ }
+ }
+ }
+ }
+
+ if (scaleOverflow) {
+ tScale = 9223372036854775807L;
+ }
+
+ if (storedOverflow) {
+ tStored = 9223372036854775807L;
+ }
+
+ return new long[] { tStored, tScale };
+ }
+}
diff --git a/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
new file mode 100644
index 0000000000..9492a6c077
--- /dev/null
+++ b/bartworks/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
+ * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION 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 java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.biome.BiomeGenBase;
+
+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;
+
+public class ThaumcraftHandler {
+
+ private ThaumcraftHandler() {}
+
+ private static Integer taintBiomeID;
+ private static Integer magicalForestBiomeID;
+ private static Class<?> mWandInterface;
+
+ static {
+ try {
+ ThaumcraftHandler.mWandInterface = Class.forName("thaumcraft.common.items.wands.ItemWandCasting");
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static boolean isWand(ItemStack aStack) {
+ try {
+ return aStack != null && ThaumcraftHandler.mWandInterface.isAssignableFrom(
+ aStack.getItem()
+ .getClass());
+ } catch (Throwable var3) {
+ return false;
+ }
+ }
+
+ 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);
+ return biomeID == (ThaumcraftHandler.magicalForestBiomeID = biome.biomeID);
+ } catch (ClassCastException | ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+ return biomeID == ThaumcraftHandler.magicalForestBiomeID;
+ }
+
+ 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);
+ return biomeID == (ThaumcraftHandler.taintBiomeID = TaintBiome.biomeID);
+ } catch (ClassCastException | ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+ return biomeID == ThaumcraftHandler.taintBiomeID;
+ }
+
+ public static class AspectAdder {
+
+ public static Class<?> mAspectListClass;
+ public static Class<?> mAspectClass;
+ public static Method registerObjectTag;
+ public static Method addToList;
+ public static Method getName;
+ public static Method writeAspectListToNBT;
+ public static Method readAspectListFromNBT;
+ public static Method add;
+ public static Method getAmount;
+ public static Method getAspects;
+ public static Method isResearchComplete;
+ public static Field linkedAspektList;
+
+ static {
+ 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.registerObjectTag = Class.forName("thaumcraft.api.ThaumcraftApi")
+ .getMethod("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")
+ .getMethod("isResearchComplete", String.class, String.class);
+ ThaumcraftHandler.AspectAdder.linkedAspektList = ThaumcraftHandler.AspectAdder.mAspectListClass
+ .getField("aspects");
+ } catch (ClassNotFoundException | NoSuchMethodException | NoSuchFieldException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @SafeVarargs
+ public static void addAspectViaBW(ItemStack stack, Pair<Object, Integer>... aspectPair) {
+ if (stack == null || stack.getItem() == null || stack.getUnlocalizedName() == null) return;
+ try {
+ Object aspectList = ThaumcraftHandler.AspectAdder.mAspectListClass.getConstructor()
+ .newInstance();
+ for (Pair<Object, Integer> a : aspectPair) {
+ 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);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void addAspectViaGT(ItemStack stack, TC_Aspects.TC_AspectStack... tc_aspectStacks) {
+ try {
+ Object aspectList = ThaumcraftHandler.AspectAdder.mAspectListClass.getConstructor()
+ .newInstance();
+ 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 (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
diff --git a/bartworks/src/main/resources/assets/bartworks/lang/de_DE.lang b/bartworks/src/main/resources/assets/bartworks/lang/de_DE.lang
new file mode 100644
index 0000000000..23edaf6124
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/lang/de_DE.lang
@@ -0,0 +1,152 @@
+BW_GlasBlocks.0.name=Borosilicat Glass Block
+BW_GlasBlocks.1.name=Nickel Verstärkter Borosilicate Glass Block
+BW_GlasBlocks.10.name=Farbiger Borosilicate Glass Block (Hell Grün)
+BW_GlasBlocks.11.name=Farbiger Borosilicate Glass Block (Braun)
+BW_GlasBlocks.12.name=Thorium Yttrium Glass Block
+BW_GlasBlocks.2.name=Tungsten Verstärkter Borosilicate Glass Block
+BW_GlasBlocks.3.name=Chrome Verstärkter Borosilicate Glass Block
+BW_GlasBlocks.4.name=Iridium Verstärkter Borosilicate Glass Block
+BW_GlasBlocks.5.name=Osmium Verstärkter Borosilicate Glass Block
+BW_GlasBlocks.6.name=Farbiger Borosilicate Glass Block (Rot)
+BW_GlasBlocks.7.name=Farbiger Borosilicate Glass Block (Grün)
+BW_GlasBlocks.8.name=Farbiger Borosilicate Glass Block (Lila)
+BW_GlasBlocks.9.name=Farbiger Borosilicate Glass Block (Gelb)
+BW_ItemBlocks.0.name=Geätzte Lapis Zelle
+BW_ItemBlocks.1.name=Plattierte Lapis Zelle
+BW_Machinery_Casings.0.name=Nickel-Zinc Ferrite Block
+BW_Machinery_Casings.1.name=Transformer-Wicklungs Block
+GT_LESU_CASING.0.name=LESU Hülle
+filled.item.petriDish.name=Petri Schale mit einer Kultur
+item.Agarose.name=Agarose
+item.BW_CombinedRotor.name=Primitiver Multi-Material Rotor (nur Wind)
+item.BW_LeatherRotor.name=Primitiver Leder Rotor (nur Wind)
+item.BW_PaperRotor.name=Primitiver Papier Rotor (nur Wind)
+item.BW_SimpleWindMeter.name=Einfaches Wind Meter
+item.BW_WoolRotor.name=Primitiver Wolle Rotor (nur Wind)
+item.BWmotor.name=Einfache Wärmekraftmaschine
+item.BWrawtube.name=Verlängerte Glass Röhre
+item.BWstove.name=Einfacher Beheizter Ofen
+item.Cells.name=Bakterien Zellen
+item.DNASampleFlask.name=DNA-Proben Flasche
+item.DetergentPowder.name=Waschmittel
+item.GT_Rockcutter_Item_HV.name=Steinschneider HV
+item.GT_Rockcutter_Item_LV.name=Steinschneider LV
+item.GT_Rockcutter_Item_MV.name=Steinschneider MV
+item.GT_Teslastaff_Item.name=Teslastab
+item.IncubationModule.name=Incubations Modul
+item.PlasmaMembrane.name=Plasma Membran
+item.PlasmidCell.name=Plasmid-Proben Flasche
+item.completed_grindstone.name=Mahlstein
+item.grindstone_bottom.name=Unteres Teil des Mahlsteins
+item.grindstone_top.name=Oberes Teil des Mahlsteins
+item.petriDish.name=Sterilisierte Petri Schale
+item.rotors.combinedParts.name=Multi-Material umspannter Holzrahmen
+item.rotors.leatherParts.name=Leder umspannter Holzrahmen
+item.rotors.paperParts.name=Papier umspannter Holzrahmen
+item.rotors.woolParts.name=Wolle umspannter Holzrahmen
+itemGroup.BioTab=BartWorks BioEngineering
+itemGroup.GT2C=Gregtech 2 Compat
+itemGroup.bartworks=BartWorks Inter Temporal
+itemGroup.bartworksMetaMaterials=BartWorks' Meta Materials
+itemGroup.bw.MetaItems.0=BartWorks Circuit Overhaul Items
+labModule.item.ClonalCellularSynthesisModule.name=Zelluläres Clone Modul
+labModule.item.DNAExtractionModule.name=DNA Extractions Modul
+labModule.item.PCRThermoclyclingModule.name=PCR Thermozykler
+labModule.item.PlasmidSynthesisModule.name=Plasmid Synthese Modul
+labModule.item.TransformationModule.name=Transformations Modul
+moon.Ross128ba=Ross128ba
+
+# RecipeMap
+bw.recipe.biolab=Bio Labor
+bw.recipe.BacteriaVat=Bacterien Tank
+bw.fuels.acidgens=Säure Generator
+
+nei.biovat.0.name=Braucht Glass Tier: %s
+nei.biovat.1.name=Braucht genau Sievert: %s Sv
+nei.biovat.2.name=Braucht mindestens Sievert: %s Sv
+
+planet.Ross128b=Ross128b
+solarsystem.Ross128System=Ross128-System
+star.Ross128=Ross128
+tile.BWHeatedWaterPump.0.name=Einfache Stirling Wasser Pumpe
+tile.BWRotorBlock.0.name=Primitive Kinetische Achsen Box
+tile.acidgenerator.name=Säure Generator
+tile.biolab.name=Bio Labor
+tile.biovat.name=Bacterien Tank
+tile.bw.mbf.name=Mega Brennofen
+tile.bw.mvf.name=Mega Vacuum Gefrierer
+tile.bw.windmill.name=Windmühle
+tile.diode.name=Kabel Diode
+tile.energydistributor.name=Energie Distributor
+tile.manutrafo.name=Manualeller Trafo
+tile.radiohatch.name=Radio Hülle
+tooltip.LESU.0.name=Maximale Kapazität!
+tooltip.LESU.1.name=Mehrere Kontroller!
+tooltip.bw.0.name=Hinzugefügt von
+tooltip.bw.1.name=Hinzugefügt von bartimaeusnek durch
+tooltip.bw.empty.name=Leer
+tooltip.bw.kg.0.name=kg
+tooltip.bw.kg.1.name=kgs
+tooltip.bw.no.name=Nein
+tooltip.bw.tier.name=Tier:
+tooltip.bw.yes.name=Ja
+tooltip.cp.0.name=Ist ein Chip drinnen?
+tooltip.glas.0.name=Glass-Tier:
+tooltip.labmodule.0.name=A Module used to change the BioLab's working Mode
+tooltip.labparts.0.name=An empty Sterilized Petri Dish.
+tooltip.labparts.1.name=An empty DNA Flask.
+tooltip.labparts.2.name=An empty Plasmid Cell.
+tooltip.labparts.3.name=A special washing power for Bio Engineering.
+tooltip.labparts.4.name=A powder for the separation of DNA by electrophoresis.
+tooltip.labparts.5.name=A Petri Dish containing:
+tooltip.labparts.6.name=This is a weak culture, it can not be bred in the Bacterial Vat!
+tooltip.labparts.7.name=A DNA Flask containing:
+tooltip.labparts.8.name=A Plasmid Cell containing:
+tooltip.rotor.0.name=Durchmesser:
+tooltip.rotor.1.name=Haltbarkeit:
+tooltip.rotor.2.name=Effizienz:
+tooltip.teslastaff.0.name=Keine Garantie!
+tooltip.tile.acidgen.0.name=Ein Säure Generator
+tooltip.tile.acidgen.1.name=Creates Power from Chemical Energy Potentials.
+tooltip.tile.biolab.0.name=The BioLab, a Multi-Use Bioengineering Station
+tooltip.tile.diode.0.name=A Simple diode that will allow Energy Flow in only one direction.
+tooltip.tile.energydistributor.0.name=Splits Amperage into several Sides.
+tooltip.tile.lesu.0.name=Controller Block for the GT2-Styled L.E.S.U.;Size: ANY
+tooltip.tile.lesu.1.name=Storage per LESU Casing:
+tooltip.tile.lesu.2.name=Output EU: LESU Casings amount;Input EU: Next Voltage Tier to Output EU;Input/Output Amps can be configured via 4 Circuits in GUI;Output Side has a dot on it.
+tooltip.tile.lesu.3.name=Only one Controller allowed, no Wallsharing!
+tooltip.tile.manualtravo.0.name=Controller Block for the Manual Trafo;Operates in 4 different Modes:;Mode 1: Circuit 0 in controller: Direct-Upstep;Mode 2: Circuit 1 in controller: Direct-Downstep;Mode 3: Circuit 2 in controller: Tapped-Upstep;Mode 4: Circuit 3 in controller: Tapped-Downstep;For direct Modes: 3xHx3;Base Contains at least 1 Energy Hatch;1 Layer of Transformer-Winding Blocks for each Tier transformed;Middle of Transformer-Winding Blocks needs to be a Nickel-Zinc Ferrite Block;Top Contains at least 1 Dynamo Hatch;Maintenance Hatch can be placed anywhere;Tapped Mode is disabled at the Moment.
+tooltip.tile.mbf.0.name=Controller Block for the Mega Blast Furnace;Size(WxHxD): 15x20x15 (Hollow);Controller: 3nd Layer Middle Center;Inner 13x18x13 Heating Coils (Hollow);Outer 15x18x15 Borosilicate Glass;The glass limits the Energy Input tier;1+ Input Hatch/Bus (Any casing);1+ Output Bus (Any casing);1+ Energy Hatch (Any casing);1x Maintenance Hatch (Any casing);13x13 Muffler Hatches (Top middle);Heat Proof Machine Casings for the outer 15x15 (Layer 20);1+ Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing); Recovery scales with Muffler Hatch tier;Heat Proof Machine Casings for Base;Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively);Each 1800K over the min. Heat Capacity allows for one upgraded overclock;Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%;Causes maximum
+tooltip.tile.mbf.1.name=Pollution per second
+tooltip.tile.radhatch.0.name=Radioactive Item Chamber for Multiblocks
+tooltip.tile.radhatch.1.name=Use a screwdriver to set the containment level
+tooltip.tile.radhatch.2.name=Material:
+tooltip.tile.radhatch.3.name=Sievert:
+tooltip.tile.radhatch.4.name=Menge:
+tooltip.tile.radhatch.5.name=Time (in t/s/m/h) to decay (1kg):
+tooltip.tile.radhatch.6.name=t
+tooltip.tile.radhatch.7.name=s
+tooltip.tile.radhatch.8.name=m
+tooltip.tile.radhatch.9.name=h
+tooltip.tile.tiereddsc.0.name=Voltage:
+tooltip.tile.tiereddsc.1.name=Amperage IN:
+tooltip.tile.tiereddsc.2.name=Amperage OUT:
+tooltip.tile.tiereddsc.3.name=Kapazität:
+tooltip.tile.waterpump.0.name=Produziert
+tooltip.tile.waterpump.1.name=L/s Wasser wenn laufend.
+tooltip.tile.waterpump.2.name=Muss auf dem Boden stehen.
+tooltip.tile.windmill.0.name=A primitive Grinder powered by Kinetic energy.;Size(WxHxD): 7x12x7;Layer 1: 7x7 Bricks, corners are air, controller at front centered.;Layer 2-5: 5x5 Hardened Clay, corners are air, can contain one door,;hollow, Wall must contain at least one Dispenser;Layer 6: 5x5 Wood Planks. Corners are filled, hollow.;Layer 7: 7x7 Wood Planks. Corners are air, hollow.;Layer 8: 7x7 Wood Planks. Corners are air, hollow,;front centered must be a Primitive Kinetic Shaftbox;Layer 9: 7x7 Wood Planks. Corners are air, hollow.;Layer 10: 5x5 Wood Planks. Corners are filled, hollow.;Layer 11: 3x3 Wood Planks. Corners are filled, hollow.;Layer 12: 1x1 Wood Plank.;Needs a Wind Mill Rotor in the Shaftbox to operate;Input items in Controller;Output items will appear in the dispensers;It is faster in regions with more wind (like IC2 Windmills)
+tooltip.windmeter.0.name=Ein einfaches Windmeter, um einen Platz für die Windmühle zu finden.
+tooltip.windmeter.1.name=Benutzungen:
+tooltip.windmeter.2.name=nicht da zu sein.
+tooltip.windmeter.3.name=sehr niedrig zu sein.
+tooltip.windmeter.4.name=normal zu sein.
+tooltip.windmeter.5.name=eher stark zu sein.
+tooltip.windmeter.6.name=sehr stark zu sein.
+tooltip.windmeter.7.name=zu stark zu sein.
+tooltip.windmeter.8.name=Der Wind hier scheint
+
+item.BurnedOutBISOPelletBall.name=Ausgebranntes BISO Kügelchen Ball
+item.BurnedOutBISOPellet.name=Ausgebranntes BISO Kügelchen
+item.BurnedOutTRISOPelletBall.name=Ausgebranntes TRISO Kügelchen Ball
+item.BurnedOutTRISOPellet.name=Ausgebranntes TRISO Kügelchen
diff --git a/bartworks/src/main/resources/assets/bartworks/lang/en_US.lang b/bartworks/src/main/resources/assets/bartworks/lang/en_US.lang
new file mode 100644
index 0000000000..7ec5d318d0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/lang/en_US.lang
@@ -0,0 +1,202 @@
+itemGroup.GT2C=Gregtech 2 Compat
+item.GT_Rockcutter_Item_LV.name=Rockcutter LV
+item.GT_Rockcutter_Item_MV.name=Rockcutter MV
+item.GT_Rockcutter_Item_HV.name=Rockcutter HV
+item.GT_Teslastaff_Item.name=Teslastaff
+BW_ItemBlocks.0.name=Etched Lapis Cell
+BW_ItemBlocks.1.name=Plated Lapis Cell
+GT_LESU_CASING.0.name=LESU Casing
+
+GT5U.gui.text.no_imprint=Missing imprint
+GT5U.gui.text.not_enough_length=Multiblock Too Short
+GT5U.gui.text.wrong_sievert_exactly=§7Wrong sievert. Requires exactly: %s §7Sv
+GT5U.gui.text.wrong_sievert_min=§7Wrong sievert. Requires at least: %s §7Sv
+
+itemGroup.bartworks=BartWorks Inter Temporal
+BW_Machinery_Casings.0.name=Nickel-Zinc Ferrite Block
+BW_Machinery_Casings.1.name=Transformer-Winding Block
+item.BW_PaperRotor.name=Primitive Paper Rotor (Wind only)
+item.BW_LeatherRotor.name=Primitive Leather Rotor (Wind only)
+item.BW_WoolRotor.name=Primitive Wool Rotor (Wind only)
+item.BW_CombinedRotor.name=Combined Primitive Rotor (Wind only)
+tile.BWRotorBlock.0.name=Primitive Kinetic Shaftbox
+item.grindstone_top.name=Grindstone Top Piece
+item.grindstone_bottom.name=Grindstone Bottom Piece
+item.completed_grindstone.name=Grindstone
+item.rotors.leatherParts.name=Leather Covered Wood Frame
+item.rotors.woolParts.name=Wool Covered Wood Frame
+item.rotors.paperParts.name=Paper Covered Wood Frame
+item.rotors.combinedParts.name=Multiple Material Covered Wood Frame
+item.BW_SimpleWindMeter.name=Simple Wind Meter
+tile.BWHeatedWaterPump.0.name=Simple Stirling Water Pump
+item.BWrawtube.name=Elongated Glass Tube
+item.BWmotor.name=Simple Stirling Motor
+item.BWstove.name=Simple Heated Stove
+
+itemGroup.BioTab=BartWorks BioEngineering
+filled.item.petriDish.name=Petri Dish with a Culture
+item.petriDish.name=Sterilized Petri Dish
+item.DNASampleFlask.name=DNA Sample Flask
+item.PlasmidCell.name=Plasmid Sample Flask
+item.DetergentPowder.name=Detergent Powder
+item.Agarose.name=Agarose
+item.IncubationModule.name=Incubation Module
+item.Cells.name=Bacterial Cells
+item.PlasmaMembrane.name=Plasma Membrane
+labModule.item.DNAExtractionModule.name=DNA Extraction Module
+labModule.item.PCRThermoclyclingModule.name=PCR Thermocycle Module
+labModule.item.PlasmidSynthesisModule.name=Plasmid Synthesis Module
+labModule.item.TransformationModule.name=Transformation Module
+labModule.item.ClonalCellularSynthesisModule.name=Clonal Cellular Synthesis Module
+BW_GlasBlocks.0.name=Borosilicate Glass Block
+BW_GlasBlocks.1.name=Titanium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.2.name=Tungstensteel Reinforced Borosilicate Glass Block
+BW_GlasBlocks.3.name=Rhodium-Plated Palladium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.4.name=Iridium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.5.name=Osmium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.6.name=Colored Borosilicate Glass Block (Red)
+BW_GlasBlocks.7.name=Colored Borosilicate Glass Block (Green)
+BW_GlasBlocks.8.name=Colored Borosilicate Glass Block (Purple)
+BW_GlasBlocks.9.name=Colored Borosilicate Glass Block (Yellow)
+BW_GlasBlocks.10.name=Colored Borosilicate Glass Block (Light Green)
+BW_GlasBlocks.11.name=Colored Borosilicate Glass Block (Brown)
+BW_GlasBlocks.12.name=Thorium Yttrium Glass Block
+BW_GlasBlocks.13.name=Neutronium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.14.name=Cosmic Neutronium Reinforced Borosilicate Glass Block
+BW_GlasBlocks.15.name=Infinity Reinforced Borosilicate Glass Block
+BW_GlasBlocks2.0.name=Transcendentally Reinforced Borosilicate Glass Block
+
+tooltip.glas.0.name=Glass-Tier:
+tooltip.LESU.0.name=Maximum Capacity!
+tooltip.LESU.1.name=Multiple Controllers!
+
+tooltip.windmeter.0.name=A simple Windmeter to choose a place for the Windmill.
+tooltip.windmeter.1.name=Uses left:
+tooltip.windmeter.2.name=non existant
+tooltip.windmeter.3.name=pretty low
+tooltip.windmeter.4.name=common
+tooltip.windmeter.5.name=rather strong
+tooltip.windmeter.6.name=very strong
+tooltip.windmeter.7.name=too strong
+tooltip.windmeter.8.name=The wind here seems to be
+tooltip.rotor.0.name=Diameter:
+tooltip.rotor.1.name=Durability:
+tooltip.rotor.2.name=Efficiency:
+tooltip.rotor.3.name=Speed:
+tooltip.rotor.4.name=Output:
+tooltip.cp.0.name=Has Circuit inside?
+
+tooltip.bw.0.name=Added by
+tooltip.bw.1.name=Added by bartimaeusnek via
+tooltip.bw.yes.name=Yes
+tooltip.bw.no.name=No
+tooltip.bw.tier.name=Tier:
+tooltip.bw.kg.0.name=kg
+tooltip.bw.kg.1.name=kgs
+tooltip.bw.empty.name=Empty
+tooltip.bw.via.name=Added by %s§7 via §2BartWorks
+tooltip.bw.mb_via.name=%s§7 via §2BartWorks
+
+tooltip.teslastaff.0.name=No warranty!
+tooltip.labmodule.0.name=A Module used to change the BioLab's working Mode
+tooltip.labparts.0.name=An empty Sterilized Petri Dish.
+tooltip.labparts.1.name=An empty DNA Flask.
+tooltip.labparts.2.name=An empty Plasmid Cell.
+tooltip.labparts.3.name=A special washing powder for Bio Engineering.
+tooltip.labparts.4.name=A powder for the separation of DNA by electrophoresis.
+tooltip.labparts.5.name=A Petri Dish containing:
+tooltip.labparts.6.name=This is a weak culture, it can not be bred in the Bacterial Vat!
+tooltip.labparts.7.name=A DNA Flask containing:
+tooltip.labparts.8.name=A Plasmid Cell containing:
+
+tooltip.tile.waterpump.0.name=Produces
+tooltip.tile.waterpump.1.name=L/s Water when fueled. Causes %d Pollution per second.
+tooltip.tile.waterpump.2.name=Must be placed on the Ground.
+
+tooltip.tile.mbf.0.name=Controller Block for the Mega Blast Furnace;Size(WxHxD): 15x20x15 (Hollow);Controller: 3rd Layer Middle Center;Inner 13x18x13 Heating Coils (Hollow);Outer 15x18x15 Borosilicate Glass;The glass tier limits the Energy Input tier;1+ Input Hatch/Bus (Any casing);1+ Output Hatch/Bus (Any casing);1+ Energy Hatch (Any casing);1x Maintenance Hatch (Any casing);13x13 Muffler Hatches (Top middle);Heat Proof Machine Casings for the outer 15x15 (Layer 20);1+ Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing); Recovery scales with Muffler Hatch tier;Heat Proof Machine Casings for Base;Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively);Each 1800K over the min. Heat Capacity allows for one upgraded overclock;Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%;Causes maximum
+tooltip.tile.mbf.1.name=Pollution per second
+tooltip.tile.windmill.0.name=A primitive Grinder powered by Kinetic energy.;Size(WxHxD): 7x12x7;Layer 1: 7x7 Bricks, corners are air, controller at front centered.;Layer 2-5: 5x5 Hardened Clay, corners are air, can contain one door,;hollow, Wall must contain at least one Dispenser;Layer 6: 5x5 Wood Planks. Corners are filled, hollow.;Layer 7: 7x7 Wood Planks. Corners are air, hollow.;Layer 8: 7x7 Wood Planks. Corners are air, hollow,;front centered must be a Primitive Kinetic Shaftbox;Layer 9: 7x7 Wood Planks. Corners are air, hollow.;Layer 10: 5x5 Wood Planks. Corners are filled, hollow.;Layer 11: 3x3 Wood Planks. Corners are filled, hollow.;Layer 12: 1x1 Wood Plank.;Needs a Wind Mill Rotor in the Shaftbox to operate;Input items in Controller;Output items will appear in the dispensers;It is faster in regions with more wind (like IC2 Windmills)
+tooltip.tile.lesu.0.name=Controller Block for the GT2-Styled L.E.S.U.;Size: ANY
+tooltip.tile.lesu.1.name=Storage per LESU Casing:
+tooltip.tile.lesu.2.name=Output EU: LESU Casings amount;Input EU: Next Voltage Tier to Output EU;Input/Output Amps can be configured via 4 Circuits in GUI;Output Side has a dot on it.
+tooltip.tile.lesu.3.name=Only one Controller allowed, no Wallsharing!
+tooltip.tile.manualtravo.0.name=Controller Block for the Manual Trafo;Operates in 4 different Modes:;Mode 1: Circuit 0 in controller: Direct-Upstep;Mode 2: Circuit 1 in controller: Direct-Downstep;Mode 3: Circuit 2 in controller: Tapped-Upstep;Mode 4: Circuit 3 in controller: Tapped-Downstep;For direct Modes: 3xHx3;Base Contains at least 1 Energy Hatch;1 Layer of Transformer-Winding Blocks for each Tier transformed;Middle of Transformer-Winding Blocks needs to be a Nickel-Zinc Ferrite Block;Top Contains at least 1 Dynamo Hatch;Maintenance Hatch can be placed anywhere;Tapped Mode is disabled at the Moment.
+tooltip.tile.tiereddsc.0.name=Voltage:
+tooltip.tile.tiereddsc.1.name=Amperage IN:
+tooltip.tile.tiereddsc.2.name=Amperage OUT:
+tooltip.tile.tiereddsc.3.name=Capacity:
+tooltip.tile.diode.0.name=A Simple diode that will allow Energy Flow in only one direction.
+tooltip.tile.energydistributor.0.name=Splits Amperage into several Sides.
+tooltip.tile.biolab.0.name=The BioLab, a Multi-Use Bioengineering Station
+tooltip.tile.radhatch.0.name=Radioactive Item Chamber for Multiblocks
+tooltip.tile.radhatch.1.name=Use a screwdriver to set the containment level
+tooltip.tile.radhatch.2.name=Material:
+tooltip.tile.radhatch.3.name=Sievert:
+tooltip.tile.radhatch.4.name=Amount:
+tooltip.tile.radhatch.5.name=Time (in t/s/m/h) to decay (1kg):
+tooltip.tile.radhatch.6.name=t
+tooltip.tile.radhatch.7.name=s
+tooltip.tile.radhatch.8.name=m
+tooltip.tile.radhatch.9.name=h
+tooltip.tile.radhatch.10.name=Remaining: %s s / %s s
+tooltip.tile.acidgen.0.name=An Acid Generator
+tooltip.tile.acidgen.1.name=Creates Power from Chemical Energy Potentials.
+
+# RecipeMap
+bw.recipe.biolab=Bio Lab
+bw.recipe.BacteriaVat=Bacterial Vat
+bw.fuels.acidgens=Acid Generator
+bw.recipe.cal=Circuit Assembly Line
+bw.recipe.radhatch=Radio Hatch Material List
+gt.recipe.electricimplosioncompressor=Electric Implosion Compressor
+bw.recipe.htgr=High Temperature Gas-cooled Reactor
+
+nei.biovat.0.name=Needs Glass Tier: %s
+nei.biovat.1.name=Need exactly Sievert: %s Sv
+nei.biovat.2.name=Need minimum Sievert: %s Sv
+nei.biovat.input.tooltip=Consumed up to 1,001x amount, depending on output rate
+nei.biovat.output.tooltip=Outputs up to 1,001x amount, depending on the amount of fluid stored in the Output Hatch
+
+tile.diode.name=Cable Diode
+tile.energydistributor.name=Energy Distributor
+tile.acidgenerator.name=Acid Generator
+tile.bw.mbf.name=Mega Blast Furnace
+tile.bw.mvf.name=Mega Vacuum Freezer
+tile.biolab.name=Bio Lab
+tile.biovat.name=Bacterial Vat
+tile.radiohatch.name=Radio Hatch
+tile.bw.windmill.name=Windmill
+tile.manutrafo.name=Manual Trafo
+tile.BioFluidBlock.name=Bio Fluid Block
+
+item.TRISOPellet.name=TRISO pebble
+item.TRISOPelletBall.name=TRISO pebble ball
+item.BISOPelletBall.name=BISO pebble ball
+item.TRISOPelletCompound.name=TRISO pebble compound
+item.BISOPelletCompound.name=BISO pebble compound
+item.BurnedOutTRISOPelletBall.name=Burned Out TRISO pebble ball
+item.BurnedOutTRISOPellet.name=Burned Out TRISO pebble
+
+itemGroup.bartworksMetaMaterials=BartWorks' Meta Materials
+
+planet.Ross128b=Ross128b
+moon.Ross128ba=Ross128ba
+star.Ross128=Ross128
+solarsystem.Ross128System=Ross128-System
+
+itemGroup.bw.MetaItems.0=BartWorks Circuit Overhaul Items
+
+BW.infoData.BioVat.expectedProduction=Expected Production
+BW.infoData.BioVat.production=Production
+
+BW.NEI.display.radhatch.0=Sievert: %s Sv
+BW.NEI.display.radhatch.1=Mass: %s kg
+BW.NEI.display.radhatch.2=Time: %s s
+
+misc.BatchModeTextOn=Batch recipes
+misc.BatchModeTextOff=Don't batch recipes
+
+tooltip.cal.imprintedWith=Imprinted with:
+chat.cal.mode.0=Circuit Assembly Line Mode
+chat.cal.mode.1=Circuit Assembler Mode
+#Liquids
diff --git a/bartworks/src/main/resources/assets/bartworks/lang/fr_FR.lang b/bartworks/src/main/resources/assets/bartworks/lang/fr_FR.lang
new file mode 100644
index 0000000000..a9f4964759
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/lang/fr_FR.lang
@@ -0,0 +1,160 @@
+itemGroup.GT2C=Compatibilité Gregtech 2
+item.GT_Rockcutter_Item_LV.name=Coupeur de roche LV
+item.GT_Rockcutter_Item_MV.name=Coupeur de roche MV
+item.GT_Rockcutter_Item_HV.name=Coupeur de roche HV
+item.GT_Teslastaff_Item.name=Bâton Tesla
+BW_ItemBlocks.0.name=Cellule de Lapis Engravée
+BW_ItemBlocks.1.name=Cellule de Lapis Plaquée
+GT_LESU_CASING.0.name=Bloc carter du LESU
+
+itemGroup.bartworks=BartWorks inter-temporel
+BW_Machinery_Casings.0.name=Bloc de Ferrite en Nickel-Zinc
+BW_Machinery_Casings.1.name=Bloc de bobinage de Transformateur
+item.BW_PaperRotor.name=Rotor primitif en papier (Vent seulement)
+item.BW_LeatherRotor.name=Rotor primitif en cuir (Vent seulement)
+item.BW_WoolRotor.name=Rotor primitif en laine (Vent seulement)
+item.BW_CombinedRotor.name=Rotor primitif combiné (Vent seulement)
+tile.BWRotorBlock.0.name=Boîte d'arbre de transmission primitive
+item.grindstone_top.name=partie haute de Meule
+item.grindstone_bottom.name=partie basse de Meule
+item.completed_grindstone.name=Meule
+item.rotors.leatherParts.name=Charpente en bois recouverte de cuir
+item.rotors.woolParts.name=Charpente en bois recouverte de laine
+item.rotors.paperParts.name=Charpente en bois recouverte de papier
+item.rotors.combinedParts.name=Charpente en bois recouverte de plusieurs matériaux
+item.BW_SimpleWindMeter.name=Simple Anémomètre
+tile.BWHeatedWaterPump.0.name=Simple pompe à eau Stirling
+item.BWrawtube.name=Tube de Verre allongé
+item.BWmotor.name=Simple Moteur Stirling
+item.BWstove.name=Simple réchaud chauffé
+
+itemGroup.BioTab=Bio-ingéniérie BartWorks
+filled.item.petriDish.name=Boîte à Pétri avec culture
+item.petriDish.name=Boîte à Pétri stérilisée
+item.DNASampleFlask.name=Fiole d'échantillonnage ADN
+item.PlasmidCell.name=Fiole d'échantillonnage de Plasmide
+item.DetergentPowder.name=Poudre détergente
+item.Agarose.name=Agarose
+item.IncubationModule.name=Module d'incubation
+item.Cells.name=Cellules bactériennes
+item.PlasmaMembrane.name=Membrane Cellulaire
+labModule.item.DNAExtractionModule.name=Module d'extraction d'ADN
+labModule.item.PCRThermoclyclingModule.name=Module de thermocycle PCR
+labModule.item.PlasmidSynthesisModule.name=Module de synthèse pour Plasmides
+labModule.item.TransformationModule.name=Module de transformation
+labModule.item.ClonalCellularSynthesisModule.name=Module de synthèse cellulaire clonale
+BW_GlasBlocks.0.name=Bloc de Verre Borosilicate
+BW_GlasBlocks.1.name=Bloc de Verre Borosilicate renforcé en Nickel
+BW_GlasBlocks.2.name=Bloc de Verre Borosilicate renforcé en Tungsten
+BW_GlasBlocks.3.name=Bloc de Verre Borosilicate renforcé en Chrome
+BW_GlasBlocks.4.name=Bloc de Verre Borosilicate renforcé en Iridium
+BW_GlasBlocks.5.name=Bloc de Verre Borosilicate renforcé en Osmium
+BW_GlasBlocks.6.name=Bloc de Verre Borosilicate coloré (Rouge)
+BW_GlasBlocks.7.name=Bloc de Verre Borosilicate coloré (Vert)
+BW_GlasBlocks.8.name=Bloc de Verre Borosilicate coloré (Violet)
+BW_GlasBlocks.9.name=Bloc de Verre Borosilicate coloré (Jaune)
+BW_GlasBlocks.10.name=Bloc de Verre Borosilicate coloré (Vert Clair)
+BW_GlasBlocks.11.name=Bloc de Verre Borosilicate coloré (Marron)
+BW_GlasBlocks.12.name=Bloc de Verre Thorium Yttrium
+
+tooltip.glas.0.name=Tier de verre:
+tooltip.LESU.0.name=Capacité maximum!
+tooltip.LESU.1.name=Plusieurs contrôleurs!
+
+tooltip.windmeter.0.name=Un simple anémomètre pour choisir une place pour l'éolienne.
+tooltip.windmeter.1.name=Utilisations restantes:
+tooltip.windmeter.2.name=non existant
+tooltip.windmeter.3.name=plutôt léger
+tooltip.windmeter.4.name=commun
+tooltip.windmeter.5.name=plutôt fort
+tooltip.windmeter.6.name=très fort
+tooltip.windmeter.7.name=trop fort
+tooltip.windmeter.8.name=Le vent ici semble être
+tooltip.rotor.0.name=Diamètre:
+tooltip.rotor.1.name=Durabilité:
+tooltip.rotor.2.name=Efficacité
+tooltip.cp.0.name=Y-a-t-il un circuit dedans?
+
+tooltip.bw.0.name=Ajouté par
+tooltip.bw.1.name=Ajouté par bartimaeusnek via
+tooltip.bw.yes.name=Oui
+tooltip.bw.no.name=Non
+tooltip.bw.tier.name=Tier:
+tooltip.bw.kg.0.name=kg
+tooltip.bw.kg.1.name=kgs
+tooltip.bw.empty.name=Vide
+
+tooltip.teslastaff.0.name=Pas de garrantie!
+tooltip.labmodule.0.name=un module utilisé pour changer le mode de fonctionnement du BioLab
+tooltip.labparts.0.name=Une boîte de Pétrie vide stérélisée.
+tooltip.labparts.1.name=Une fiole d'ADN vide.
+tooltip.labparts.2.name=Une cellule de plasmide vide.
+tooltip.labparts.3.name=Un nettoyant spécial pour la Bio-ingéniérie.
+tooltip.labparts.4.name=Une poudre de séparation d'ADN par électrophorèse.
+tooltip.labparts.5.name=Une boîte de Pétri contenant:
+tooltip.labparts.6.name=Ceci est une culture faible, elle ne peut pas se reproduire dans la Bio Cuve!
+tooltip.labparts.7.name=Une fiole d'ADN contenant:
+tooltip.labparts.8.name=Une cellule de plasmide contenant:
+
+tooltip.tile.waterpump.0.name=Produit
+tooltip.tile.waterpump.1.name=L/s Water quand il est alimenté.
+tooltip.tile.waterpump.2.name=Doit être placé sur le sol.
+
+tooltip.tile.mbf.0.name=Bloc contrôleur pour le haut fourneau;Taille(LxHxP): 15x20x15 (creux);Contrôleur: 3ème couche centré au milieu;Intérieur 13x18x13 bobines de chauffage (creux);Extérieur 15x18x15 Verre Borosilicate;Le verre limite le tier d'énergie en entrée;1+ Trappe/Bus d'entrée (n'importe quel bloc carter);1+ bus de sortie(n'importe quel bloc carter);1+ trappe d'énergie (n'importe quel bloc carter);1x trappe de maintenance (n'importe quel bloc carter);Blocs carter de machine résistant à la chaleur pour l'extérieur 15x15 (couche 20);La récupération se câle sur le tier de la trappe d'échappement;Blocs carter de machine résistant à la chaleur pour la base;Chaque 900K supérieur à la température de base donne 5% de rapidité (multiplicativement);Chaque 1800k supérieur à la température de base donne un overclock gratuit;Chaque overclock reduit le temps de craft de 25% et augmente la consommation d'EU/t de 400%;Cause une pollution maximale.
+tooltip.tile.mbf.1.name=Pollution par seconde
+tooltip.tile.windmill.0.name=Un broyeur primitif fonctionnant a l'énergie cinétique.;Taille(LxHxP): 7x12x7;Couche 1: 7x7 Briques, les coins sont laissés vide,le contrôleur est centré devant.;(creux), les mur doivent contenir au moins un Dispenseur;Couche 7: 7x7 Planches de Bois. les coins sont laissés vide, (creux).;Couche 8: 7x7 Planches de Bois. les coins sont laissés vide, (creux),;le bloc centré devant doit être une Boîte d'arbre de transmission primitive.;Couche 9: 7x7 Planches de Bois. les coins sont laissés vide, (creux).;Couche 11: 3x3 Planches de Bois. les coins sont pleins, (creux).;A besoin d'un Rotor d'éolienne dans la Boîte d'arbre de transmission pour fonctionner.;Les objets d'entrée doivent aller dans le contrôleur.;Les objets de sortie apparaîtront dans les Dispenseurs.;C'est plus rapide dans les régions venteuses (comme les éoliennes IC2).
+tooltip.tile.lesu.0.name=Bloc contrôleur pour le GT2-Stylé L.E.S.U.;Taille: n'importe;
+tooltip.tile.lesu.1.name=Stockage par carter du LESU:
+tooltip.tile.lesu.2.name=EU de sortie: le nombre de blocs carter LESU;EU d'entrée: prochain Tier de voltage après les EU de sortie;l'ampérage d'entrée/sortie peut être configurée via 4 Circuits dans le GUI;La face de sortie à un point dessus.
+tooltip.tile.lesu.3.name=Seulement un seul contrôleur autorisé, pas de partage des murs!
+tooltip.tile.manualtravo.0.name=Bloc contrôleur pour le Transformateur Manuel;4 modes de fonctionnement;Fonctionne avec 2 modes en ce moment:;Mode 1: Circuit 0 dans le contrôleur: unique source et ascendant;Mode 2: Circuit 1 dans le contrôleur: unique source et descendant;Mode 3: Circuit 2 dans le contrôleur: plusieurs sources et ascendant;Mode 4: Circuit 3 dans le contrôleur: plusieurs sources et descendant;Pour les modes directs: 3xHx3;La base doit contenir au moins une trappe d'énergie;1 Couche de Blocs de bobinage de Transformateur pour chaque tier converti;Au milieu des Blocs de bobinage de Transformeur il doit y avoir un Bloc de Ferrite en Nickel-Zinc;Le haut doit contenir au moins une Trappe Dynamo;La trappe de maintenance peut être placée n'importe où;Les modes avec plusieurs sources sont désactivés pour le moment.
+tooltip.tile.tiereddsc.0.name=Voltage:
+tooltip.tile.tiereddsc.1.name=Ampérage d'entrée:
+tooltip.tile.tiereddsc.2.name=Ampérage de sortie:
+tooltip.tile.tiereddsc.3.name=Capacité:
+tooltip.tile.diode.0.name=Une simple diode qui autorise les flux d'énergie dans un seul sens.
+tooltip.tile.energydistributor.0.name=Répartit l'ampérage sur plusieur faces.
+tooltip.tile.biolab.0.name=Le BioLab, une station de bio-ingéniérie multifonction.
+tooltip.tile.radhatch.0.name=Radioactive Item Chamber for Multiblocks Chambre d'objets radiactifs pour multi-blocs
+tooltip.tile.radhatch.1.name=Utiliser un tournevis pour régler le niveau de confinement
+tooltip.tile.radhatch.2.name=Matériau:
+tooltip.tile.radhatch.3.name=Sievert:
+tooltip.tile.radhatch.4.name=Quantité:
+tooltip.tile.radhatch.5.name=Temps (en t/s/m/h) pour se désintégrer(1kg):
+tooltip.tile.radhatch.6.name=t
+tooltip.tile.radhatch.7.name=s
+tooltip.tile.radhatch.8.name=m
+tooltip.tile.radhatch.9.name=h
+tooltip.tile.acidgen.0.name=Un générateur à acide
+tooltip.tile.acidgen.1.name=Crée de l'énergie à partir de potentiels chimiques.
+
+# RecipeMap
+bw.recipe.biolab=Bio Lab
+bw.recipe.BacteriaVat=Bio Cuve
+bw.fuels.acidgens=Générateur à Acide
+
+nei.biovat.0.name=A besoin du tier de verre: %s
+nei.biovat.1.name=A besoin du montant exact Sievert: %s Sv
+nei.biovat.2.name=A besoin d'un minimum Sievert: %s Sv
+
+tile.diode.name=Diode câble
+tile.energydistributor.name=Distributeur d'énergie
+tile.acidgenerator.name=Générateur à Acide
+tile.bw.mbf.name=Méga Haut Fourneau
+tile.bw.mvf.name=Méga Refroidisseur A Vide
+tile.biolab.name=Bio Lab
+tile.biovat.name=Bio Cuve
+tile.radiohatch.name=Trappe Radioactive
+tile.bw.windmill.name=Eolienne
+tile.manutrafo.name=Transformateur Manuel
+
+
+itemGroup.bartworksMetaMaterials=Méta Matériaux De BartWorks
+
+
+planet.Ross128b=Ross128b
+moon.Ross128ba=Ross128ba
+star.Ross128=Ross128
+solarsystem.Ross128System=Système-Ross128
+
+itemGroup.bw.MetaItems.0=Objets du Remaniement des Circuits BartWorks
diff --git a/bartworks/src/main/resources/assets/bartworks/lang/zh_CN.lang b/bartworks/src/main/resources/assets/bartworks/lang/zh_CN.lang
new file mode 100644
index 0000000000..f3a9ca534d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/lang/zh_CN.lang
@@ -0,0 +1,163 @@
+itemGroup.GT2C=GergTech2兼容
+item.GT_Rockcutter_Item_LV.name=岩石切割者 LV
+item.GT_Rockcutter_Item_MV.name=岩石切割者 MV
+item.GT_Rockcutter_Item_HV.name=岩石切割者 HV
+item.GT_Teslastaff_Item.name=特斯拉权杖
+BW_ItemBlocks.0.name=蚀刻青金石元件
+BW_ItemBlocks.1.name=镀层青金石元件
+GT_LESU_CASING.0.name=LESU机械方块
+
+itemGroup.bartworks=BartWorks-跨时代
+BW_Machinery_Casings.0.name=镍锌铁氧体块
+BW_Machinery_Casings.1.name=变压器线圈块
+item.BW_PaperRotor.name=原始纸转子(风车专用)
+item.BW_LeatherRotor.name=原始皮革转子(风车专用)
+item.BW_WoolRotor.name=原始羊毛转子(风车专用)
+item.BW_CombinedRotor.name=原始复合转子(风车专用)
+tile.BWRotorBlock.0.name=原始动力轴箱
+item.grindstone_top.name=磨石顶部
+item.grindstone_bottom.name=磨石底部
+item.completed_grindstone.name=磨石
+item.rotors.leatherParts.name=皮革包层木框架
+item.rotors.woolParts.name=羊毛包层木框架
+item.rotors.paperParts.name=纸包层木框架
+item.rotors.combinedParts.name=复合材料包层木框架
+item.BW_SimpleWindMeter.name=简易风速计
+tile.BWHeatedWaterPump.0.name=简易斯特林水泵
+item.BWrawtube.name=加长玻璃管
+item.BWmotor.name=简易斯特林引擎
+item.BWstove.name=简易加热炉
+
+itemGroup.BioTab=BartWorks-生物工程
+filled.item.petriDish.name=培养皿
+item.petriDish.name=无菌培养皿
+item.DNASampleFlask.name=DNA样品烧瓶
+item.PlasmidCell.name=质粒样品烧瓶
+item.DetergentPowder.name=洗涤粉
+item.Agarose.name=琼脂糖
+item.IncubationModule.name=孵化模块
+item.Cells.name=细菌细胞
+item.PlasmaMembrane.name=质膜
+labModule.item.DNAExtractionModule.name=DNA提取模块
+labModule.item.PCRThermoclyclingModule.name=聚合酶链式反应模块
+labModule.item.PlasmidSynthesisModule.name=质粒合成模块
+labModule.item.TransformationModule.name=转化模块
+labModule.item.ClonalCellularSynthesisModule.name=克隆细胞合成模块
+BW_GlasBlocks.0.name=硼硅酸盐方块
+BW_GlasBlocks.1.name=镍强化硼硅酸盐方块
+BW_GlasBlocks.2.name=钨强化硼硅酸盐方块
+BW_GlasBlocks.3.name=铬强化硼硅酸盐方块
+BW_GlasBlocks.4.name=铱强化硼硅酸盐方块
+BW_GlasBlocks.5.name=锇强化硼硅酸盐方块
+BW_GlasBlocks.6.name=染色硼硅酸盐方块(红)
+BW_GlasBlocks.7.name=染色硼硅酸盐方块(绿)
+BW_GlasBlocks.8.name=染色硼硅酸盐方块(紫)
+BW_GlasBlocks.9.name=染色硼硅酸盐方块(黄)
+BW_GlasBlocks.10.name=染色硼硅酸盐方块(淡绿)
+BW_GlasBlocks.11.name=染色硼硅酸盐方块(棕)
+BW_GlasBlocks.12.name=钍钇玻璃块
+
+tooltip.glas.0.name=玻璃等级:
+tooltip.LESU.0.name=最大容量!
+tooltip.LESU.1.name=多个控制器!
+
+tooltip.windmeter.0.name=用于为风车选址的简易风速计.
+tooltip.windmeter.1.name=剩余使用次数:
+tooltip.windmeter.2.name=不存在的
+tooltip.windmeter.3.name=很低
+tooltip.windmeter.4.name=正常
+tooltip.windmeter.5.name=相当强
+tooltip.windmeter.6.name=很强
+tooltip.windmeter.7.name=太强了
+tooltip.windmeter.8.name=这里的风似乎...
+tooltip.rotor.0.name=直径:
+tooltip.rotor.1.name=耐久:
+tooltip.rotor.2.name=效率:
+tooltip.cp.0.name=内部是否有编程电路?
+
+tooltip.bw.0.name=Added by
+tooltip.bw.1.name=由bartimaeusnek添加
+tooltip.bw.yes.name=是
+tooltip.bw.no.name=否
+tooltip.bw.tier.name=等级:
+tooltip.bw.kg.0.name=kg
+tooltip.bw.kg.1.name=kgs
+tooltip.bw.empty.name=空
+
+tooltip.teslastaff.0.name=没有保修!
+tooltip.labmodule.0.name=用于更改生物实验室工作模式的模块
+tooltip.labparts.0.name=一个空的无菌培养皿
+tooltip.labparts.1.name=一个空的DNA烧瓶.
+tooltip.labparts.2.name=一个空的质粒单元.
+tooltip.labparts.3.name=生物工程专用洗涤粉
+tooltip.labparts.4.name=电泳分离DNA的粉末.
+tooltip.labparts.5.name=培养皿内含有:
+tooltip.labparts.6.name=这是一种很弱的培养菌,不能在细菌培养皿中繁殖!
+tooltip.labparts.7.name=一个DNA烧瓶,内含:
+tooltip.labparts.8.name=一个质粒单元,内含:
+
+tooltip.tile.waterpump.0.name=在有燃料时,产出
+tooltip.tile.waterpump.1.name=L/s水.
+tooltip.tile.waterpump.2.name=必须放在地上.
+
+tooltip.tile.mbf.0.name=巨型工业高炉的控制器方块;大小(宽x高x长):15x20x15(中空);控制器方块在第三层正面中央;内层13x18x13加热线圈(中空);外层15x18x15硼硅酸盐玻璃方块;玻璃等级限制了能源仓等级;1+输入仓/总线(任意机械方块);1+输出总线(任意机械方块);1+能源仓(任意机械方块);1x维护仓(任意机械方块)(注:所有底层仓室必须置于边缘);13x1x13消声仓(顶层中央);外部15x15的防热机械方块(第20层);1+输出仓以回收CO2/CO/SO2(可选,任意顶层机械方块);回收比例取决于消声仓等级;底层为隔热机械方块;自物品配方的最小炉温起,每高出900K会减少5%的能耗,使用乘法叠加;自物品配方的最小所需炉温起,每高出1800K将允许一次无损的超频;无损超频将减少加工时间至25%并提升功率至400%;每秒造成最大
+tooltip.tile.mbf.1.name=污染每秒
+tooltip.tile.windmill.0.name=由动能驱动的原始磨床;大小(宽x高x长):7x12x7;第1层:7x7砖块,角落空置,控制器方块在正面中央;第2-5层:5x5硬化粘土,角落空置,可包含一扇门,;中空,墙必须至少包含一个发射器;第6层:5x5木板.角落填充,中空.;第7层:7x7木板.角落空置,中空.;第8层:7x7木板.角落空置,中空,;正面中央必须是原始动力轴箱;第9层:7x7木板.角落空置,中空.;第10层:5x5木板.角落填充,中空.;第11层:3x3木板.角落填充,中空.;第12层:1x1木板;需要在轴箱中放入风车转子才可运行;在控制器中输入物品;输出物品将出现在发射器中;在风大的地区运行较快(像IC2风机一样)
+tooltip.tile.lesu.0.name=用于GT2风格的L.E.S.U.的控制器方块;尺寸:任意
+tooltip.tile.lesu.1.name=每个LESU机械方块存储:
+tooltip.tile.lesu.2.name=输出EU:LESU机械方块数量; 输入EU:输出EU的下一电压等级;输入/输出安培可通过GUI中的4个编程电路进行调整;输出端只有一个点.
+tooltip.tile.lesu.3.name=只允许一个控制器,不允许墙壁共享!
+tooltip.tile.manualtravo.0.name=手动变压器的控制器方块;可在4种不同的模式下运行:;模式1:控制器内放入编程电路0:直接升压;模式2:控制器内放入编程电路1:直接降压;模式3:控制器内放入编程电路2:Tapped升压;模式4:控制器内放入编程电路3:Tapped降压;直接模式(长x高x宽):3xHx3;底层至少包含一个能源仓;每1级变压器需要一层变压器线圈方块;变压器线圈方块中心需为镍锌铁氧体块;顶部至少包含一个动力仓;维护仓可置于任意位置;Tapped模式暂不可用.(Tapped模式为在变压时获得多个电压)(译注)
+tooltip.tile.tiereddsc.0.name=电压:
+tooltip.tile.tiereddsc.1.name=输入安培:
+tooltip.tile.tiereddsc.2.name=输出安培:
+tooltip.tile.tiereddsc.3.name=容量:
+tooltip.tile.diode.0.name=一个简单的二极管,只允许能量流向一个方向.
+tooltip.tile.energydistributor.0.name=将电流分至多个面.
+tooltip.tile.biolab.0.name=生物实验室,一个多用途的生物工程站
+tooltip.tile.radhatch.0.name=多方块机器的放射性物品输入仓
+tooltip.tile.radhatch.1.name=使用螺丝刀设置抑制等级
+tooltip.tile.radhatch.2.name=材料:
+tooltip.tile.radhatch.3.name=希沃特(Sv):
+tooltip.tile.radhatch.4.name=数量:
+tooltip.tile.radhatch.5.name=衰变单位质量(1kg)所需时间(t/s/m/h):
+tooltip.tile.radhatch.6.name=t
+tooltip.tile.radhatch.7.name=s
+tooltip.tile.radhatch.8.name=m
+tooltip.tile.radhatch.9.name=h
+tooltip.tile.acidgen.0.name=酸性发电机
+tooltip.tile.acidgen.1.name=用化学势能产生电力.
+
+# RecipeMap
+bw.recipe.biolab=生物实验室
+bw.recipe.BacteriaVat=生物培养缸
+bw.fuels.acidgens=酸性发电机
+
+nei.biovat.0.name=需要玻璃等级: %s
+nei.biovat.1.name=精确剂量 Sievert: %s Sv
+nei.biovat.2.name=最小剂量 Sievert: %s Sv
+
+tile.diode.name=线缆二极管
+tile.energydistributor.name=能量分配器
+tile.acidgenerator.name=酸性发电机
+tile.bw.mbf.name=巨型工业高炉
+tile.bw.mvf.name=巨型真空冷冻机
+tile.biolab.name=生物实验室
+tile.biovat.name=生物培养缸
+tile.radiohatch.name=放射仓
+tile.bw.windmill.name=风车
+tile.manutrafo.name=手动变压器
+
+itemGroup.bartworksMetaMaterials=BartWorks-meta材料
+
+
+planet.Ross128b=罗斯128b
+moon.Ross128ba=罗斯128ba
+star.Ross128=罗斯128
+solarsystem.Ross128System=罗斯128星系
+
+itemGroup.bw.MetaItems.0=BartWorks电路更新物品
+
+BW.infoData.BioVat.expectedProduction=预期产量
+BW.infoData.BioVat.production=产量
+#This zh_CN.lang is translated by huajijam for bartworks (19/7/19)
diff --git a/bartworks/src/main/resources/assets/bartworks/sounds.json b/bartworks/src/main/resources/assets/bartworks/sounds.json
new file mode 100644
index 0000000000..0c1dea7fcc
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/sounds.json
@@ -0,0 +1,11 @@
+{
+ "hatch.RadOn": {
+ "category": "block",
+ "sounds": [
+ {
+ "name": "radhatch",
+ "stream": false
+ }
+ ]
+ }
+}
diff --git a/bartworks/src/main/resources/assets/bartworks/sounds/radhatch.ogg b/bartworks/src/main/resources/assets/bartworks/sounds/radhatch.ogg
new file mode 100644
index 0000000000..754711c999
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/sounds/radhatch.ogg
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/GUIPrimitiveKUBox.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/GUIPrimitiveKUBox.png
new file mode 100644
index 0000000000..aef2e1687b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/GUIPrimitiveKUBox.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/brown.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/brown.png
new file mode 100644
index 0000000000..2db03dff22
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/brown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png
new file mode 100644
index 0000000000..c14cfb78ae
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/assembler_mode.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/assembler_mode.png
new file mode 100644
index 0000000000..a8d30a022e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/assembler_mode.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/line_mode.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/line_mode.png
new file mode 100644
index 0000000000..d7132dcfba
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_button/line_mode.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png
new file mode 100644
index 0000000000..4244b6256b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png
new file mode 100644
index 0000000000..d051681c1e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png
new file mode 100644
index 0000000000..fb7483a9a7
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png
new file mode 100644
index 0000000000..5dc78c8271
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png
new file mode 100644
index 0000000000..ca3b11d69d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png
new file mode 100644
index 0000000000..34b2b59e0e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png
new file mode 100644
index 0000000000..de259fc32a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png
new file mode 100644
index 0000000000..8b6425b8cf
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png
new file mode 100644
index 0000000000..c2f1271f62
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png
new file mode 100644
index 0000000000..e5cf55abd4
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png
new file mode 100644
index 0000000000..eb908f863a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png
new file mode 100644
index 0000000000..fc6478c29f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png
new file mode 100644
index 0000000000..4a54ac5781
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png
new file mode 100644
index 0000000000..f9e55beeb9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png
new file mode 100644
index 0000000000..3840d7fd45
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png
new file mode 100644
index 0000000000..0dfe303cf0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png
new file mode 100644
index 0000000000..7a324ebf38
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png
new file mode 100644
index 0000000000..b302f4e89e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png
new file mode 100644
index 0000000000..4d8405e02c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png
new file mode 100644
index 0000000000..73893b9036
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png
new file mode 100644
index 0000000000..d5c9ae0825
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png
new file mode 100644
index 0000000000..5b3c3edec0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/BWRotorBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BWRotorBlock.png
new file mode 100644
index 0000000000..fc0872b45f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BWRotorBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..0e27ddbb62
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlockRandlos.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlockRandlos.png
new file mode 100644
index 0000000000..f711908135
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/BoronSilicateGlassBlockRandlos.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock1.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock1.png
new file mode 100644
index 0000000000..92ce6cb9a2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock1.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock2.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock2.png
new file mode 100644
index 0000000000..0cc6e08ae3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock2.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock3.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock3.png
new file mode 100644
index 0000000000..f230acbe3f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock3.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock4.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock4.png
new file mode 100644
index 0000000000..2febb0540d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock4.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock5.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock5.png
new file mode 100644
index 0000000000..89e0b0d84e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock5.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock6.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock6.png
new file mode 100644
index 0000000000..54c29e5ae9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ColoredBoronSilicateGlassBlock6.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/CosmicNeutroniumReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/CosmicNeutroniumReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..2f58642a18
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/CosmicNeutroniumReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png
new file mode 100644
index 0000000000..8922a3d4e2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/GrindstoneL.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/GrindstoneL.png
new file mode 100644
index 0000000000..6e2e7dfe4e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/GrindstoneL.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/InfinityReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/InfinityReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..4710c28436
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/InfinityReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/IridiumReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/IridiumReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..9a87942ef9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/IridiumReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png
new file mode 100644
index 0000000000..0fd516231e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png
new file mode 100644
index 0000000000..acdb3b4e6a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png
new file mode 100644
index 0000000000..1feeb1fd92
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png
new file mode 100644
index 0000000000..c6de6719e9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png
new file mode 100644
index 0000000000..f41b59f820
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/LuVTierMaterialReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LuVTierMaterialReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..213f8feafd
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/LuVTierMaterialReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/NeutroniumReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/NeutroniumReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..c75fafb933
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/NeutroniumReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/NickelFerriteBlocks.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/NickelFerriteBlocks.png
new file mode 100644
index 0000000000..f5976c093b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/NickelFerriteBlocks.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/OsmiumReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/OsmiumReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..e5be40d5ff
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/OsmiumReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png
new file mode 100644
index 0000000000..336a7a5b4e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/ThoriumYttriumGlass.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ThoriumYttriumGlass.png
new file mode 100644
index 0000000000..5d97902f87
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/ThoriumYttriumGlass.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/TitaniumReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TitaniumReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..9908141e11
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TitaniumReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/TranscendentallyReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TranscendentallyReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..220e85e57c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TranscendentallyReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png
new file mode 100644
index 0000000000..79801b0471
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/TungstenSteelReinforcedBoronSilicateGlassBlock.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TungstenSteelReinforcedBoronSilicateGlassBlock.png
new file mode 100644
index 0000000000..07618e28aa
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/TungstenSteelReinforcedBoronSilicateGlassBlock.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_0.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_0.png
new file mode 100644
index 0000000000..f66994bcd2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_0.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_1.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_1.png
new file mode 100644
index 0000000000..1249814be6
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_1.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_10.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_10.png
new file mode 100644
index 0000000000..0bb400b3dc
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_10.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_11.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_11.png
new file mode 100644
index 0000000000..e40c597ceb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_11.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_12.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_12.png
new file mode 100644
index 0000000000..2ddabd3331
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_12.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_13.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_13.png
new file mode 100644
index 0000000000..617758a4b6
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_13.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_14.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_14.png
new file mode 100644
index 0000000000..a8ab0806e2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_14.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_15.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_15.png
new file mode 100644
index 0000000000..d3f697ab1f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_15.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_2.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_2.png
new file mode 100644
index 0000000000..543b011c03
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_2.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_3.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_3.png
new file mode 100644
index 0000000000..d69e640fb3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_3.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_4.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_4.png
new file mode 100644
index 0000000000..48509772ce
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_4.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_5.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_5.png
new file mode 100644
index 0000000000..93dc271b8e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_5.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_6.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_6.png
new file mode 100644
index 0000000000..da2f1deb4a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_6.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_7.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_7.png
new file mode 100644
index 0000000000..4a7a5b4a3f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_7.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_8.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_8.png
new file mode 100644
index 0000000000..fdf64c2958
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_8.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_9.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_9.png
new file mode 100644
index 0000000000..d4110a3b06
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlock/BoronSilicateGlassBlock_9.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_0.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_0.png
new file mode 100644
index 0000000000..5622806282
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_0.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_1.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_1.png
new file mode 100644
index 0000000000..c0b5b0da4d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_1.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_10.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_10.png
new file mode 100644
index 0000000000..3c8b4c66d7
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_10.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_11.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_11.png
new file mode 100644
index 0000000000..036adac6f3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_11.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_12.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_12.png
new file mode 100644
index 0000000000..ea67c34b23
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_12.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_13.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_13.png
new file mode 100644
index 0000000000..1727d6228a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_13.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_14.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_14.png
new file mode 100644
index 0000000000..8795c1dacc
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_14.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_15.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_15.png
new file mode 100644
index 0000000000..f711908135
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_15.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_2.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_2.png
new file mode 100644
index 0000000000..c69982d8e7
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_2.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_3.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_3.png
new file mode 100644
index 0000000000..18eadf45ed
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_3.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_4.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_4.png
new file mode 100644
index 0000000000..269de3edb1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_4.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_5.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_5.png
new file mode 100644
index 0000000000..198701e1bb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_5.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_6.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_6.png
new file mode 100644
index 0000000000..9f050cc629
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_6.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_7.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_7.png
new file mode 100644
index 0000000000..4969508f31
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_7.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_8.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_8.png
new file mode 100644
index 0000000000..c73f1f5320
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_8.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_9.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_9.png
new file mode 100644
index 0000000000..f9a450ae2d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/connectedTex/BoronSilicateGlassBlockRandlos/BoronSilicateGlassBlockRandlos_9.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpDown.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpDown.png
new file mode 100644
index 0000000000..91bcf79e1f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpDown.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpSide.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpSide.png
new file mode 100644
index 0000000000..4b8c71a8ae
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpSide.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpTop.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpTop.png
new file mode 100644
index 0000000000..91bcf79e1f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/heatedWaterPumpTop.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/blocks/windmill_top.png b/bartworks/src/main/resources/assets/bartworks/textures/blocks/windmill_top.png
new file mode 100644
index 0000000000..8f49c6b2f3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/blocks/windmill_top.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/Agarose.png b/bartworks/src/main/resources/assets/bartworks/textures/items/Agarose.png
new file mode 100644
index 0000000000..fe6add0bb0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/Agarose.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletBall.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletBall.png
new file mode 100644
index 0000000000..ea113e3f22
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletBall.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletCompound.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletCompound.png
new file mode 100644
index 0000000000..029d895f31
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BISOPelletCompound.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png
new file mode 100644
index 0000000000..6b7f9a54d8
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BWmotor.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BWmotor.png
new file mode 100644
index 0000000000..c701227af2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BWmotor.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BWrawtube.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BWrawtube.png
new file mode 100644
index 0000000000..ab3dd4a2bd
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BWrawtube.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPellet.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPellet.png
new file mode 100644
index 0000000000..73abda00dd
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPellet.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPelletBall.png b/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPelletBall.png
new file mode 100644
index 0000000000..eb5e37eaa1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/BurnedOutTRISOPelletBall.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/CircuitProgrammer.png b/bartworks/src/main/resources/assets/bartworks/textures/items/CircuitProgrammer.png
new file mode 100644
index 0000000000..5021c2834e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/CircuitProgrammer.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/ClonalCellularSynthesisModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/ClonalCellularSynthesisModule.png
new file mode 100644
index 0000000000..a420873554
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/ClonalCellularSynthesisModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/DNAExtractionModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/DNAExtractionModule.png
new file mode 100644
index 0000000000..99dc1c9b95
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/DNAExtractionModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/DNASampleFlask.png b/bartworks/src/main/resources/assets/bartworks/textures/items/DNASampleFlask.png
new file mode 100644
index 0000000000..7c10790535
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/DNASampleFlask.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/DetergentPowder.png b/bartworks/src/main/resources/assets/bartworks/textures/items/DetergentPowder.png
new file mode 100644
index 0000000000..92fe5e9d81
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/DetergentPowder.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/GT2Coin.png b/bartworks/src/main/resources/assets/bartworks/textures/items/GT2Coin.png
new file mode 100644
index 0000000000..c590469aed
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/GT2Coin.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png b/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png
new file mode 100644
index 0000000000..b04bb30f5c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png b/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png
new file mode 100644
index 0000000000..fd8185056b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png
new file mode 100644
index 0000000000..18ab91de32
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundPlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png
new file mode 100644
index 0000000000..26f20f97f1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png
new file mode 100644
index 0000000000..53c59ec79c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBISOPebbleCompoundUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png
new file mode 100644
index 0000000000..714b4806dd
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallPlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png
new file mode 100644
index 0000000000..2be7586764
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png
new file mode 100644
index 0000000000..6f95ff5256
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOBallUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png
new file mode 100644
index 0000000000..e29d9dc953
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebblePlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png
new file mode 100644
index 0000000000..1e0c684eb1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png
new file mode 100644
index 0000000000..1cbc98794d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRBurnedOutTRISOPebbleUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png
new file mode 100644
index 0000000000..7858c997d4
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixturePlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png
new file mode 100644
index 0000000000..19b94a07cb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png
new file mode 100644
index 0000000000..324df7101b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRHTGRFuelMixtureUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png
new file mode 100644
index 0000000000..28432d2d9b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallPlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png
new file mode 100644
index 0000000000..ada36141c6
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png
new file mode 100644
index 0000000000..7054c76741
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOBallUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png
new file mode 100644
index 0000000000..b3b36e3bdc
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundPlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png
new file mode 100644
index 0000000000..ab142635c9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png
new file mode 100644
index 0000000000..e7ac40c10f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleCompoundUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png
new file mode 100644
index 0000000000..ea22c17f5c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebblePlutonium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png
new file mode 100644
index 0000000000..b2c8003b5c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleThorium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png
new file mode 100644
index 0000000000..0d026c2492
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/HTGRTRISOPebbleUranium.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/IncubationModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/IncubationModule.png
new file mode 100644
index 0000000000..e0ea17749d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/IncubationModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/PCRThermoclyclingModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/PCRThermoclyclingModule.png
new file mode 100644
index 0000000000..c0e5b9a822
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/PCRThermoclyclingModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmaMembrane.png b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmaMembrane.png
new file mode 100644
index 0000000000..f51730a7af
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmaMembrane.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidCell.png b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidCell.png
new file mode 100644
index 0000000000..0e62fa2621
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidCell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidSynthesisModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidSynthesisModule.png
new file mode 100644
index 0000000000..9c20f554e7
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/PlasmidSynthesisModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPellet.png b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPellet.png
new file mode 100644
index 0000000000..26109fc979
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPellet.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletBall.png b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletBall.png
new file mode 100644
index 0000000000..0aea0500cf
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletBall.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletCompound.png b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletCompound.png
new file mode 100644
index 0000000000..6b2835d100
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/TRISOPelletCompound.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/TransformationModule.png b/bartworks/src/main/resources/assets/bartworks/textures/items/TransformationModule.png
new file mode 100644
index 0000000000..36b8a44f4d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/TransformationModule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/WrapOverlay.png b/bartworks/src/main/resources/assets/bartworks/textures/items/WrapOverlay.png
new file mode 100644
index 0000000000..f6d80e292e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/WrapOverlay.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/completed_grindstone.png b/bartworks/src/main/resources/assets/bartworks/textures/items/completed_grindstone.png
new file mode 100644
index 0000000000..a02ee7ad6a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/completed_grindstone.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_bottom.png b/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_bottom.png
new file mode 100644
index 0000000000..33b1e96bda
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_bottom.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_top.png b/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_top.png
new file mode 100644
index 0000000000..0be37504b5
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/grindstone_top.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png b/bartworks/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png
new file mode 100644
index 0000000000..6de5748e32
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/petriDish.png b/bartworks/src/main/resources/assets/bartworks/textures/items/petriDish.png
new file mode 100644
index 0000000000..467a79f19c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/petriDish.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/combinedParts.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/combinedParts.png
new file mode 100644
index 0000000000..bdb4aafc04
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/combinedParts.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorCombined.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorCombined.png
new file mode 100644
index 0000000000..13ae5461e8
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorCombined.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorLeather.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorLeather.png
new file mode 100644
index 0000000000..a11f72b76d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorLeather.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorPaper.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorPaper.png
new file mode 100644
index 0000000000..56863186ac
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorPaper.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorWool.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorWool.png
new file mode 100644
index 0000000000..a5bb68bb43
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/itemRotorWool.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/leatherParts.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/leatherParts.png
new file mode 100644
index 0000000000..824697ab3d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/leatherParts.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/paperParts.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/paperParts.png
new file mode 100644
index 0000000000..c00616ed74
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/paperParts.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorCombined.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorCombined.png
new file mode 100644
index 0000000000..3171928a82
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorCombined.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorLeather.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorLeather.png
new file mode 100644
index 0000000000..4d0b74c047
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorLeather.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorPaper.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorPaper.png
new file mode 100644
index 0000000000..e60e68040f
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorPaper.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorWool.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorWool.png
new file mode 100644
index 0000000000..5cea540797
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/rotorWool.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/woolParts.png b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/woolParts.png
new file mode 100644
index 0000000000..24c6cb0573
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworks/textures/items/rotors/woolParts.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128.png b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128.png
new file mode 100644
index 0000000000..18e7cd3b3c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128b.png b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128b.png
new file mode 100644
index 0000000000..85b66ad2a5
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128b.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128ba.png b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128ba.png
new file mode 100644
index 0000000000..745d1131c3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/MapObjs/Ross128ba.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/World/SunRoss128.png b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/World/SunRoss128.png
new file mode 100644
index 0000000000..d966674e54
--- /dev/null
+++ b/bartworks/src/main/resources/assets/bartworkscrossmod/galacticraft/Ross128b/World/SunRoss128.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DIAMOND/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/DULL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/EMERALD/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FIERY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FINE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLINT/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/FLUID/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/GLASS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LAPIS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LEAF/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/LIGNITE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/MAGNETIC/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/METALLIC/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NETHERSTAR/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/NONE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/OPAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/PAPER/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/POWDER/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/QUARTZ/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/ROUGH/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/RUBY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SAND/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHARDS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/SHINY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/WOOD/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasing.png
new file mode 100644
index 0000000000..47a39e7526
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/copy.bat b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/copy.bat
new file mode 100644
index 0000000000..9713953aac
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/blocks/materialicons/copy.bat
@@ -0,0 +1 @@
+for /r /d %%I in (*) do xcopy %1 "%%~fsI" /H /K /Y \ No newline at end of file
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_Cell.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_Cell.png
new file mode 100644
index 0000000000..e372f01092
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_Cell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_CellDep.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_CellDep.png
new file mode 100644
index 0000000000..b0836b8d41
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Core_Reactor_CellDep.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png
new file mode 100644
index 0000000000..bfe6e2288b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png
new file mode 100644
index 0000000000..a7d2c341a2
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png
new file mode 100644
index 0000000000..85aa8c19a1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png
new file mode 100644
index 0000000000..0a71854e05
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png
new file mode 100644
index 0000000000..4071c6062d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png
new file mode 100644
index 0000000000..bafc8a4c8c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/0.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/0.png
new file mode 100644
index 0000000000..e16102588a
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/0.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/1.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/1.png
new file mode 100644
index 0000000000..491164695b
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/1.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/10.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/10.png
new file mode 100644
index 0000000000..38429ed78d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/10.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/11.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/11.png
new file mode 100644
index 0000000000..3901815927
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/11.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/12.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/12.png
new file mode 100644
index 0000000000..c97ec3384c
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/12.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/13.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/13.png
new file mode 100644
index 0000000000..40e5c92817
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/13.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/14.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/14.png
new file mode 100644
index 0000000000..10c6f20de0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/14.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/2.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/2.png
new file mode 100644
index 0000000000..968e0745c9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/2.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/3.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/3.png
new file mode 100644
index 0000000000..9e22dd6726
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/3.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/4.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/4.png
new file mode 100644
index 0000000000..86411e18bd
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/4.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/5.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/5.png
new file mode 100644
index 0000000000..57a7c7a932
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/5.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/6.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/6.png
new file mode 100644
index 0000000000..9f68371247
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/6.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/7.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/7.png
new file mode 100644
index 0000000000..7a322b76c0
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/7.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/8.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/8.png
new file mode 100644
index 0000000000..9fe039db81
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/8.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/9.png b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/9.png
new file mode 100644
index 0000000000..457a51b7a1
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/gt.bwMetaGeneratedItem0/9.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DIAMOND/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/DULL/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/EMERALD/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FIERY/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FINE/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLINT/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/FLUID/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_HORIZONTAL/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_VERTICAL/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/GLASS/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LAPIS/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LEAF/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/LIGNITE/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/MAGNETIC/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/METALLIC/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NETHERSTAR/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/NONE/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/OPAL/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/PAPER/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/POWDER/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/QUARTZ/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/ROUGH/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/RUBY/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SAND/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHARDS/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/SHINY/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing.png
new file mode 100644
index 0000000000..cd6a50eca3
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced.png
new file mode 100644
index 0000000000..5fea5be598
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasingAdvanced_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing_OVERLAY.png
new file mode 100644
index 0000000000..2b0422489e
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/blockCasing_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule.png
new file mode 100644
index 0000000000..9e388650d9
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten.png
new file mode 100644
index 0000000000..3e9106f277
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten_OVERLAY.png
new file mode 100644
index 0000000000..b2bd85bf44
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsuleMolten_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule_OVERLAY.png
new file mode 100644
index 0000000000..7c6797718d
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/WOOD/capsule_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle.png
new file mode 100644
index 0000000000..dbf735f4fb
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle_OVERLAY.png b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle_OVERLAY.png
new file mode 100644
index 0000000000..66bd26dc46
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/bottle_OVERLAY.png
Binary files differ
diff --git a/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/copy.bat b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/copy.bat
new file mode 100644
index 0000000000..9713953aac
--- /dev/null
+++ b/bartworks/src/main/resources/assets/gregtech/textures/items/materialicons/copy.bat
@@ -0,0 +1 @@
+for /r /d %%I in (*) do xcopy %1 "%%~fsI" /H /K /Y \ No newline at end of file
diff --git a/bartworks/src/main/resources/mcmod.info b/bartworks/src/main/resources/mcmod.info
new file mode 100644
index 0000000000..a7205e0523
--- /dev/null
+++ b/bartworks/src/main/resources/mcmod.info
@@ -0,0 +1,55 @@
+{
+ "modListVersion": 2,
+ "modList": [{
+ "modid": "${modId}",
+ "name": "${modName}",
+ "description": "A Gregtech Addon.",
+ "version": "${modVersion}",
+ "mcversion": "${minecraftVersion}",
+ "url": "https://github.com/bartimaeusnek/bartworks",
+ "updateUrl": "",
+ "authorList": ["bartimaeusnek"],
+ "credits": "Gregorius Techneticies for making gregtech and allowing me to port his old stuff.\n Austin Appleby and Yonik Seeley for creating and putting the MurmurHash3 into the public domain.\n Spluff and EmeraldsEmerald for the Awesome Textures aswell.",
+ "logoFile": "",
+ "screenshots": [],
+ "parent": "",
+ "requiredMods": [],
+ "dependencies": [],
+ "dependants": [],
+ "useDependencyInformation": false
+ },{
+ "modid": "bartworkscrossmod",
+ "name": "BartWorks Mod Additions",
+ "description": "",
+ "version": "${modVersion}",
+ "mcversion": "${minecraftVersion}",
+ "url": "https://github.com/bartimaeusnek/bartworks",
+ "updateUrl": "",
+ "authorList": ["bartimaeusnek"],
+ "credits": "",
+ "logoFile": "",
+ "screenshots": [],
+ "parent": "bartworks",
+ "requiredMods": [],
+ "dependencies": [],
+ "dependants": [],
+ "useDependencyInformation": false
+ },{
+ "modid": "bartworkscrossmodtgregworkscontainer",
+ "name": "BartWorks Mod Additions - TGregworks Container",
+ "description": "",
+ "version": "${modVersion}",
+ "mcversion": "${minecraftVersion}",
+ "url": "https://github.com/bartimaeusnek/bartworks",
+ "updateUrl": "",
+ "authorList": ["bartimaeusnek"],
+ "credits": "",
+ "logoFile": "",
+ "screenshots": [],
+ "parent": "bartworks",
+ "requiredMods": [],
+ "dependencies": [],
+ "dependants": [],
+ "useDependencyInformation": false
+ }]
+}