diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-09-14 20:11:05 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2020-09-14 20:11:05 +0200 |
commit | 28747be843b6dff2e48c51fc0faaecc12d6f59f4 (patch) | |
tree | 7858517e09c13c07bdd3f9e0295b839300ed4493 /src | |
parent | 18e2960ea363a8b947e93fc3eb54fe6eb6a1d731 (diff) | |
download | GT5-Unofficial-28747be843b6dff2e48c51fc0faaecc12d6f59f4.tar.gz GT5-Unofficial-28747be843b6dff2e48c51fc0faaecc12d6f59f4.tar.bz2 GT5-Unofficial-28747be843b6dff2e48c51fc0faaecc12d6f59f4.zip |
Refactor
+ Updated Copyright
+ Split WerkstoffLoader into seperate Files
+ Fixed overclock underflow
+ Fixed TT debug code
+ Fixed autogenerated Casings
Former-commit-id: 368bc456441b7560127b712cad2304cbf8628670
Diffstat (limited to 'src')
133 files changed, 1829 insertions, 1072 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java index bdfdb29ca8..4d9fe89836 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java index 99a748fbd7..775c3fc9b1 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java index 30d387399c..7fb06e019e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java index 8d5c0d23ae..96a075d9c7 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java index b4fe0923bc..19f422265b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java index fe92654fd0..d7de7ee822 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java index 5e8663f907..c10f7ffb39 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java index 9ae176d26f..369a403dc1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java index deec80e80f..1318cb919f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java index 59e9ee2782..efa6f601ef 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java index 1f28933622..d5875e4609 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java index 628b4acb96..0360502170 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java index 03ecf155e3..a300c63802 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java index 41ce06cc81..68c82fc7cc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java index 610aeb14f7..16cafa256d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java index 5ede1e09f0..7a9603ee61 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java index 94731e1833..90923deee4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java index ba0bc69c3b..80970c254c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java index 2f45e3c7c9..aa13bb4ee1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java index ae1187c3d0..c0d2ed88c6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java index 4de38a0e55..f11167a6bc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java index 4dd9bc3860..bad6170263 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java index 5418587508..795acbec17 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java index 74bc3e2712..a054273f6b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java index cb0f78ffa5..612bd33b98 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java index 41525ef6d7..6a8c62bb83 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java index 61c93217d9..a135e7e315 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java index b7d6e7f82d..9b85abbedb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -44,6 +44,7 @@ public class PrintRecipeListToFile extends CommandBase { } @Override + @SuppressWarnings("unchecked") public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) { File file = new File(p_71515_2_[0]); try { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java index 3e410ff2d3..aedddf54f8 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java index 46706f6f08..a3a9fc26e0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java index e6c0a5ad90..c5a6efd711 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java index fdb263a9f0..efe7f5c6ca 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java index a39d75dd97..29c14101a6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java index 1376a00bd8..c6a6782e34 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java index 700b8974c3..3c132cef88 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java index 458a80e673..ba46ded1b2 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java index a588921145..8d0dfcbb60 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java index b879c94958..c98bdf232a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java index d8070f4e90..2b9cb9a994 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java index 8287c44778..34bf243c1b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java index b22bd115fd..ca291e64bc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java index be1fb4dea5..3b4571a4ca 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java index 7d083bdaec..4fa7ab4327 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java index 9a4ce6cf38..2831ee4ebe 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java index 4a1367d1dc..4f3eaf160e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java index e382a138ec..816f43c20b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java index 78df5d33f8..f655541555 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java index 0497a1b5b6..2cae9449df 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java index f47be6d45e..9efc0c4cfb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java index ac7c929cba..f252afa132 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java index fe20f66d50..45bcd28218 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -379,6 +379,7 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl } @Override + @SuppressWarnings("deprecation") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { return aSide == aFacing ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)} : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java index daadf33416..35e9667204 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java index 0502a4a82e..bd45fe554a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java index 1c39d5e07c..5f6dde9c7f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java index 8c258a96e6..06c8324457 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -396,6 +396,7 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_MultiBlockBase } @Override + @SuppressWarnings("deprecation") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { return aSide == aFacing ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[this.texid], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)} : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[this.texid]}; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java index 89c68563de..cd630ef2c3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java index cc82311a70..9d17accb06 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java index be916e52ff..4105c99c3c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java index fc7a1e6a05..3d82290fac 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java index f454af02d5..eb19af2040 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java index 4f2bebb0d6..1aa313c19b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java index 94b1aedd7e..d5afddb264 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java index dec4e11c5e..0e17f16506 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java index 531c54cfd1..7b554447a2 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java index 48c1b6e6ed..c0f6ba3340 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java index 4bc7bf3802..ee959d878a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java index 8d2d9b0b51..918713a50a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java index 385897db6a..95ac8a9a09 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java index 2fd79898d8..7f82680495 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java index 7621a17f0a..5541256158 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java index 512325688c..e576296d7b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java index 84f054b4bb..3ce3219bde 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java index 6e2eafdf13..0cc1cf956b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java index 0e2121a0ae..18748c8e5c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index c1fa1fbc85..adeeea4928 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -1,3 +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.system.material; import com.github.technus.tectech.mechanics.structure.ICustomBlockSetting; @@ -85,14 +107,25 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple @SuppressWarnings("unchecked") public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { Werkstoff.werkstoffHashSet.stream() - .filter(pMaterial -> (pMaterial.hasItemType(WerkstoffLoader.blockCasing))) + .filter(pMaterial -> + pMaterial.hasItemType(OrePrefixes.plate) + && pMaterial.hasItemType(OrePrefixes.screw) + && pMaterial.hasItemType(OrePrefixes.plateDouble) + ) .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); } + /** + * DEBUG Method for TT-Blueprints! + */ @cpw.mods.fml.common.Optional.Method(modid = "tectech") 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_MetaGeneratedBlocks_Casing_TE) .map(te -> (BW_MetaGeneratedBlocks_Casing_TE) te) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java index 4234355124..6dd15c8b5a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java @@ -1,3 +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.system.material; import com.github.bartimaeusnek.bartworks.API.SideReference; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java index b14f30f120..58863aff02 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java @@ -1,3 +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.system.material; import com.github.bartimaeusnek.bartworks.API.SideReference; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java index 37c14a6bd0..5fe7a3c4f5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java index 5a5539b3f4..e43ee12471 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java index 80126f39f4..3aa323277f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java index 7213816976..9ad31b32cd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java index 1dbe218c09..87eaf7038d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java index 10e33f28cc..ab84e7fd0b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java @@ -89,7 +89,6 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa } } - public boolean onEntityItemUpdate(EntityItem aItemEntity) { if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure || this.orePrefixes == OrePrefixes.crushed) { int aDamage = aItemEntity.getEntityItem().getItemDamage(); @@ -223,7 +222,7 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa @Override public int getRadiationLevel(ItemStack aStack) { Werkstoff w = werkstoffHashMap.get((short)aStack.getItemDamage()); - return w.getStats().isRadioactive() ? (int) w.getStats().protons : 0; + return w.getStats().isRadioactive() ? (int) w.getStats().getProtons() : 0; } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java index 1cb7d6ea64..fd3a74b470 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java index 22a1caaaf1..33658ef8e9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java index 56e3ad035c..bad997cb1e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -60,7 +60,7 @@ public class CircuitImprintLoader { private static final HashSet<GT_Recipe> ORIGINAL_CAL_RECIPES = new HashSet<>(); private static final HashSet<GT_Recipe> MODIFIED_CAL_RECIPES = new HashSet<>(); - @SuppressWarnings("unused") + @SuppressWarnings({"unused","RedundantSuppression"}) public static void run() { HashSet<GT_Recipe> toRem = new HashSet<>(); HashSet<GT_Recipe> toAdd = new HashSet<>(); @@ -69,7 +69,7 @@ public class CircuitImprintLoader { rebuildCircuitAssemblerMap(toRem,toAdd); exchangeRecipesInList(toRem,toAdd); makeCircuitImprintRecipes(); - + toRem = null; toAdd = null; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java index 79ee9d697a..a82dfb452d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java index 5c5698afdc..0713ddf102 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java @@ -801,16 +801,14 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { return this; } - byte qualityOverride; - int durOverride; - float speedOverride; - - int meltingPoint; - - long protons; - long neutrons; - long electrons; - long mass; + private byte qualityOverride; + private int durOverride; + private float speedOverride; + private int meltingPoint; + private long protons; + private long neutrons; + private long electrons; + private long mass; float durMod = 1f; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 07bef2bcf1..5e12e2e7a9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -27,47 +27,38 @@ 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.client.textures.PrefixTextureLinker; -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.*; +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.BWRecipes; 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.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; import com.google.common.collect.HashBiMap; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enchants.Enchantment_Radioactivity; import gregtech.api.enums.*; import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.GT_Fluid; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.*; -import gregtech.common.GT_Proxy; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.behaviors.Behaviour_DataOrb; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.RecipeOutput; import ic2.api.recipe.Recipes; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.Level; @@ -199,9 +190,10 @@ public class WerkstoffLoader { } //TODO: - //FREE ID RANGE: 95-30000 - //bartimaeusnek reserved 0-10000 - //Tec & basdxz reserved range 30000-32767 + //FREE ID RANGE: 95-29_999 + //bartimaeusnek reserved 0-10_000 + //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", @@ -1432,7 +1424,7 @@ public class WerkstoffLoader { return WerkstoffLoader.getCorrespondingItemStack(orePrefixes, werkstoff, 1); } - private static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) { + public static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) { if (!werkstoff.getGenerationFeatures().enforceUnification) { ItemStack ret = OreDictHandler.getItemStack(werkstoff.getVarName(), orePrefixes, amount); if (ret != null) @@ -1480,13 +1472,31 @@ public class WerkstoffLoader { 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 = new Integer[0]; int size = 0; if (LoaderReference.betterloadingscreen) clsArr = CLSCompat.initCls(); + + IWerkstoffRunnable[] werkstoffRunnables = new IWerkstoffRunnable[]{ + new ToolLoader(), + new DustLoader(), + new GemLoader(), + new SimpleMetalLoader(), + new CasingLoader(), + new AspectLoader(), + new OreLoader(), + new CrushedLoader(), + new CraftingMaterialLoader(), + new CellLoader(), + new MoltenCellLoader(), + new MultipleMetalLoader(), + new MetalLoader(), + new BlockLoader() + }; + + long timepreone = 0; for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { - long timepreone = System.nanoTime(); + 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(""); @@ -1495,41 +1505,17 @@ public class WerkstoffLoader { if (LoaderReference.betterloadingscreen) size = CLSCompat.invokeStepSize(werkstoff, clsArr, size); DebugLog.log("Werkstoff: " + werkstoff.getDefaultName() + " " + (System.nanoTime() - timepreone)); - DebugLog.log("Loading Dusts Recipes" + " " + (System.nanoTime() - timepreone)); - addDustRecipes(werkstoff); - DebugLog.log("Loading Gem Recipes" + " " + (System.nanoTime() - timepreone)); - addGemRecipes(werkstoff); - DebugLog.log("Loading Ore Recipes" + " " + (System.nanoTime() - timepreone)); - addOreRecipes(werkstoff); - DebugLog.log("Loading Crushed Recipes" + " " + (System.nanoTime() - timepreone)); - addCrushedRecipes(werkstoff); - DebugLog.log("Loading Cell Recipes" + " " + (System.nanoTime() - timepreone)); - addCellRecipes(werkstoff); - DebugLog.log("Loading Meltdown Recipes" + " " + (System.nanoTime() - timepreone)); - addMoltenRecipes(werkstoff); - DebugLog.log("Loading Simple MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addSimpleMetalRecipes(werkstoff); - DebugLog.log("Loading Crafting MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addCraftingMetalRecipes(werkstoff); - DebugLog.log("Loading MultipleIngots MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addMultipleMetalRecipes(werkstoff); - DebugLog.log("Loading Metal Recipes" + " " + (System.nanoTime() - timepreone)); - addMetalRecipes(werkstoff); - DebugLog.log("Loading Block Recipes" + " " + (System.nanoTime() - timepreone)); - addBlockRecipes(werkstoff); - DebugLog.log("Loading Tool Recipes" + " " + (System.nanoTime() - timepreone)); - addTools(werkstoff); - DebugLog.log("Loading Casing Recipes" + " " + (System.nanoTime() - timepreone)); - addCasingRecipes(werkstoff); - if (LoaderReference.Thaumcraft) { - DebugLog.log("Loading Aspects" + " " + (System.nanoTime() - timepreone)); - addAspectToAll(werkstoff); + 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("Loading New Circuits" + " " + (System.nanoTime() - timepreone)); - BW_CircuitsLoader.initNewCircuits(); DebugLog.log("Done" + " " + (System.nanoTime() - timepreone)); progressBar.step(werkstoff.getDefaultName()); } + DebugLog.log("Loading New Circuits" + " " + (System.nanoTime() - timepreone)); + BW_CircuitsLoader.initNewCircuits(); if (LoaderReference.betterloadingscreen) CLSCompat.disableCls(); @@ -1544,7 +1530,6 @@ public class WerkstoffLoader { } private static void addSubTags() { - WerkstoffLoader.CubicZirconia.getStats().setDurOverride(Materials.Diamond.mDurability); WerkstoffLoader.HDCS.getStats().setSpeedOverride(Materials.HSSS.mToolSpeed); WerkstoffLoader.HDCS.getStats().setDurMod(10f); @@ -1556,7 +1541,6 @@ public class WerkstoffLoader { 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); @@ -1624,8 +1608,8 @@ public class WerkstoffLoader { if (!FluidRegistry.isFluidRegistered("molten." + werkstoff.getDefaultName())) { DebugLog.log("Adding new Molten: " + werkstoff.getDefaultName()); Fluid fluid = new GT_Fluid("molten." + werkstoff.getDefaultName(), "molten.autogenerated", werkstoff.getRGBA()); - if (werkstoff.getStats().meltingPoint > 0) - fluid = fluid.setTemperature(werkstoff.getStats().meltingPoint); + if (werkstoff.getStats().getMeltingPoint() > 0) + fluid = fluid.setTemperature(werkstoff.getStats().getMeltingPoint()); FluidRegistry.registerFluid(fluid); //GT_LanguageManager.addStringLocalization("Molten." + werkstoff.getDefaultName(), "Molten "+ werkstoff.getDefaultName()); GT_LanguageManager.addStringLocalization(fluid.getUnlocalizedName(), "Molten " + werkstoff.getDefaultName()); @@ -1745,102 +1729,21 @@ public class WerkstoffLoader { } private static void runGTItemDataRegistrator() { + IWerkstoffRunnable[] registrations = new IWerkstoffRunnable[] { + new BridgeMaterialsLoader(), + new AssociationLoader(), + new CasingRegistrator() + }; for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { - //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().meltingPoint, werkstoff.getStats().meltingPoint, werkstoff.getStats().isBlastFurnace(), false, 0, 1, 1, null); - for (OrePrefixes prefixes : values()) { - if (!(prefixes == cell && werkstoff.getType().equals(Werkstoff.Types.ELEMENT))) { - if (prefixes == dust && werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - boolean ElementSet = false; - for (Element e : Element.values()) { - if (e.toString().equals(werkstoff.getToolTip())) { - if (e.mLinkedMaterials.size() > 0) - 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().meltingPoint, werkstoff.getStats().meltingPoint, 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; -// try { -// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); -// f.setAccessible(true); -// Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); -// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); -// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { -// e.printStackTrace(); -// } - if (werkstoff.hasItemType(dust)) { - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); - //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); - } - } - } - - 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(WerkstoffLoader.cellMolten)) { - werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1).getFluid(); - } - werkstoffBridgeMaterial.mName = werkstoff.getVarName(); - werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName(); - try { - Field f = Materials.class.getField("mLocalizedName"); - f.set(werkstoffBridgeMaterial, werkstoff.getDefaultName()); - } catch (NoSuchFieldException | IllegalAccessException ignored) { - } - werkstoffBridgeMaterial.mChemicalFormula = werkstoff.getToolTip(); - if (LoaderReference.Thaumcraft) - werkstoffBridgeMaterial.mAspects = werkstoff.getGTWrappedTCAspects(); - werkstoffBridgeMaterial.mMaterialInto = werkstoffBridgeMaterial; - werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING) ? Materials.Blaze : werkstoff.contains(SubTag.MAGICAL) ? Materials.Thaumium : werkstoffBridgeMaterial.mDurability > 5120 ? Materials.TungstenSteel : werkstoffBridgeMaterial.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); - //if (WerkstoffLoader.items.get(prefixes) != null) - } + for (IWerkstoffRunnable registration : registrations) { + registration.run(werkstoff); } } - addAssociationToItems(); addFakeItemDataToInWorldBlocksAndCleanUpFakeData(); - addCasingsToGTOreDictUnificator(); + addVanillaCasingsToGTOreDictUnificator(); } - public static void addCasingsToGTOreDictUnificator(){ - Werkstoff.werkstoffHashSet.forEach(werkstoff -> { - GT_OreDictUnificator.addAssociation( - blockCasing, werkstoff.getBridgeMaterial(), - new ItemStack(WerkstoffLoader.BWBlockCasings, 1, werkstoff.getmID()), - false - ); - GT_OreDictUnificator.addAssociation( - blockCasingAdvanced, werkstoff.getBridgeMaterial(), - new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, 1, werkstoff.getmID()), - false - ); - } - ); + public static void addVanillaCasingsToGTOreDictUnificator(){ GT_OreDictUnificator.addAssociation( blockCasing, Materials.Aluminium, ItemList.Casing_FrostProof.get(1L), @@ -1873,21 +1776,6 @@ public class WerkstoffLoader { ); } - public static void addAssociationToItems() { - Arrays.stream(values()).forEach(prefixes -> - Werkstoff.werkstoffHashSet.stream() - .filter(werkstoff -> werkstoff.hasItemType(prefixes)) - .forEach(werkstoff -> { - 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); - } - })); - } - /** * 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 @@ -1923,80 +1811,6 @@ public class WerkstoffLoader { MATERIALS_MAP.remove("bwblocks"); } - private static void addTools(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)}); - - if (gtnhGT) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(162, 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(164, 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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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(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())}); - } - - if (gtnhGT) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - } - - // GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(16,1, werkstoff.getBridgeMaterial(),werkstoff.getBridgeMaterial(),null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', werkstoff.get(ingot)}); - } - public static void removeIC2Recipes() { try { Set<Map.Entry<IRecipeInput, RecipeOutput>> remset = new HashSet<>(); @@ -2018,7 +1832,6 @@ public class WerkstoffLoader { } private static void runAdditionalOreDict() { - for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { if (werkstoff.hasItemType(ore)) { GT_OreDictUnificator.registerOre(ore + werkstoff.getVarName(), werkstoff.get(ore)); @@ -2044,666 +1857,4 @@ public class WerkstoffLoader { GT_OreDictUnificator.registerOre("craftingIndustrialDiamond", WerkstoffLoader.CubicZirconia.get(gemExquisite)); } - - private static void addCasingRecipes(Werkstoff werkstoff) { - if (!(werkstoff.hasItemType(blockCasing) && werkstoff.hasItemType(plate) && werkstoff.hasItemType(screw) && werkstoff.hasItemType(gearGt) )) - return; - - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing),new Object[]{ - "PSP", - "PGP", - "PSP", - 'P', werkstoff.get(plate), - 'S', werkstoff.get(screw), - 'G', werkstoff.get(gearGtSmall) - }); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plate,6), - werkstoff.get(screw,2), - werkstoff.get(gearGtSmall) - }, GT_Values.NF,werkstoff.get(blockCasing), 200, 30); - - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced),new Object[]{ - "PSP", - "PGP", - "PSP", - 'P', werkstoff.get(plateDouble), - 'S', werkstoff.get(screw), - 'G', werkstoff.get(gearGt) - }); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plateDouble,6), - werkstoff.get(screw,2), - werkstoff.get(gearGt) - }, GT_Values.NF,werkstoff.get(blockCasingAdvanced), 200, 30); - } - - private static void addGemRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(gem)) { - if (werkstoff.getGenerationFeatures().hasSifterRecipes() || (werkstoff.hasItemType(ore) && werkstoff.hasItemType(dust))) { - - GT_ModHandler.addCompressionRecipe(werkstoff.get(gem, 9), werkstoff.get(block)); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(block), werkstoff.get(gem, 9), 100, 24); - GT_Values.RA.addSifterRecipe( - werkstoff.get(crushedPurified), - new ItemStack[]{ - werkstoff.get(gemExquisite), - werkstoff.get(gemFlawless), - werkstoff.get(gem), - werkstoff.get(gemFlawed), - werkstoff.get(gemChipped), - werkstoff.get(dust) - }, - new int[]{ - 200, 1000, 2500, 2000, 4000, 5000 - }, - 800, - 16 - ); - } - - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemExquisite), werkstoff.get(dust, 4)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawless), werkstoff.get(dust, 2)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gem), werkstoff.get(dust)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawed), werkstoff.get(dustSmall, 2)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemChipped), werkstoff.get(dustSmall)); - - GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawless, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemExquisite)}); - 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.addForgeHammerRecipe(werkstoff.get(gemExquisite), werkstoff.get(gemFlawless, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawless), werkstoff.get(gem, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gem), werkstoff.get(gemFlawed, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawed), werkstoff.get(gemChipped, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemChipped), werkstoff.get(dustTiny), 64, 16); - - if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - - GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); - } - - if (werkstoff.hasItemType(plate)) { - GT_Values.RA.addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120); - } - - GT_Values.RA.addLatheRecipe(werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30); - GregTech_API.registerCover(werkstoff.get(lens), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, werkstoff.getRGBA(), false)), new gregtech.common.covers.GT_Cover_Lens(BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(lens), werkstoff.get(dustSmall, 3)); - - for (ItemStack is : OreDictionary.getOres("craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) { - is.stackSize = 0; - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawed, 3), is, werkstoff.get(gem, 1), 600, 120); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawless, 3), is, werkstoff.get(gemExquisite, 1), 2400, 2000); - } - } - } - - private static void addSimpleMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(plate)) { - if (werkstoff.hasItemType(gem)) { - GT_Values.RA.addLatheRecipe(werkstoff.get(gem), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(gem)}); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - - TextureSet texSet = werkstoff.getTexSet(); - GT_RenderedTexture texture = SideReference.Side.Client ? - new GT_RenderedTexture(texSet.mTextures[PrefixTextureLinker.blockTexMap.getOrDefault(texSet, block.mTextureIndex)], werkstoff.getRGBA(), false) : - new GT_RenderedTexture(texSet.mTextures[block.mTextureIndex], werkstoff.getRGBA(), false); - GregTech_API.registerCover(werkstoff.get(plate),texture,null); - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - 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_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1)}, new ItemStack[]{werkstoff.get(plate)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass(), 1L), 24, 0)); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ingot, 3), werkstoff.get(plate, 2), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - GregTech_API.registerCover(werkstoff.get(plate), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[71], werkstoff.getRGBA(), false), null); - - GT_Values.RA.addLatheRecipe(werkstoff.get(ingot), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Plate.get(0), werkstoff.get(plate), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Rod.get(0), werkstoff.get(stick, 2), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(stickLong), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(stick), new ItemStack[]{werkstoff.get(dustSmall, 2)}, null, 2, 8); - } - } - - private static void addCraftingMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(screw)) { - int tVoltageMultiplier = werkstoff.getStats().meltingPoint >= 2800 ? 60 : 15; - - //bolt - GT_Values.RA.addExtruderRecipe(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt, 8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); - GT_Values.RA.addCutterRecipe(werkstoff.get(stick), werkstoff.get(bolt, 4), null, (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 4); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); - - //screw - GT_Values.RA.addLatheRecipe(werkstoff.get(bolt), werkstoff.get(screw), null, (int) Math.max(werkstoff.getStats().getMass() / 8L, 1L), 4); - GT_ModHandler.addCraftingRecipe(werkstoff.get(screw), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', werkstoff.get(bolt)}); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); - - if (werkstoff.hasItemType(gem)) - return; - - //ring - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L), werkstoff.get(ring, 4), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 6 * tVoltageMultiplier); - GT_ModHandler.addCraftingRecipe(werkstoff.get(ring), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', werkstoff.get(stick)}); - - //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.addExtruderRecipe(werkstoff.get(ingot, 4), ItemList.Shape_Extruder_Gear.get(0L), werkstoff.get(gearGt), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1), 8 * tVoltageMultiplier); - - //wireFine - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Wire.get(0L), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass() * 1.5F, 1F), 8 * tVoltageMultiplier); - GT_Values.RA.addWiremillRecipe(werkstoff.get(ingot), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass(), 1), 8 * tVoltageMultiplier); - GT_Values.RA.addWiremillRecipe(werkstoff.get(stick), werkstoff.get(wireFine, 4), (int) Math.max(werkstoff.getStats().getMass() * 0.5F, 1F), 8 * tVoltageMultiplier); - - //smallGear - if (WerkstoffLoader.smallGearShape != null) - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), WerkstoffLoader.smallGearShape.get(0L), werkstoff.get(gearGtSmall), (int) werkstoff.getStats().mass, 8 * tVoltageMultiplier); - if (ConfigHandler.hardmode) - GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{" S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate)}); - else - GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{"P ", " h ", 'P', werkstoff.get(plate)}); - - //Rotor - GT_ModHandler.addCraftingRecipe(werkstoff.get(rotor), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", 'P', werkstoff.get(plate), 'R', werkstoff.get(ring), 'S', werkstoff.get(screw)}); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Tin.getMolten(32), werkstoff.get(rotor), 240, 24); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Lead.getMolten(48), werkstoff.get(rotor), 240, 24); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.SolderingAlloy.getMolten(16), werkstoff.get(rotor), 240, 24); - - if (WerkstoffLoader.rotorShape != null) - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L), werkstoff.get(rotor), 200, 60); - - //molten -> metal - if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576), werkstoff.get(gearGt), 128, 8); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), werkstoff.getMolten(144), werkstoff.get(gearGtSmall), 16, 8); - if (WerkstoffLoader.ringMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.ringMold.get(0L), werkstoff.getMolten(36), werkstoff.get(ring), 100, 4 * tVoltageMultiplier); - if (WerkstoffLoader.boltMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.boltMold.get(0L), werkstoff.getMolten(18), werkstoff.get(bolt), 50, 2 * tVoltageMultiplier); - - if (WerkstoffLoader.rotorMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60); - } - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGt), new ItemStack[]{werkstoff.get(dust, 4)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGtSmall), new ItemStack[]{werkstoff.get(dust, 1)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(rotor), new ItemStack[]{werkstoff.get(dust, 4), werkstoff.get(dustSmall)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(ring), new ItemStack[]{werkstoff.get(dustSmall, 1)}, null, 2, 8); - } - } - - private static void addBlockRecipes(Werkstoff werkstoff) { - if (!werkstoff.hasItemType(block)) - return; - if (werkstoff.hasItemType(ingot)) { - GT_Values.RA.addArcFurnaceRecipe(werkstoff.get(block), new ItemStack[]{werkstoff.get(ingot, 9)}, null, 16, 90, false); - } - if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(block), null, werkstoff.getMolten(1296), 0, 288, 8); - } - if (werkstoff.hasItemType(plate)) { - GT_Values.RA.addCutterRecipe(werkstoff.get(block), werkstoff.get(plate, 9), null, (int) Math.max(werkstoff.getStats().getMass() * 10L, 1L), 30); - } - } - - private static void addMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(ingot)) { - GT_ModHandler.addCompressionRecipe(werkstoff.get(ingot, 9), werkstoff.get(block)); - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Extruder_Block.get(0), werkstoff.get(block), (int) werkstoff.getStats().mass, 8 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); - GT_Values.RA.addAlloySmelterRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Mold_Block.get(0L), werkstoff.get(block), (int) (werkstoff.getStats().mass / 2), 4 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); - } - } - - private static void addMultipleMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(plateDense)) { - GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2)}, new ItemStack[]{werkstoff.get(plateDouble)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60, 0)); - GregTech_API.registerCover(werkstoff.get(plateDouble), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false), null); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plateDouble), new ItemStack[]{werkstoff.get(dust, 2)}, null, 2, 8); - } - } - - private static void addDustRecipes(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])) { - if (container.getKey() instanceof Materials) { - if (((Materials) container.getKey()).getGas(0) != null || ((Materials) container.getKey()).getFluid(0) != null || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { - FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); - if (tmpFl == null || tmpFl.getFluid() == null) { - tmpFl = ((Materials) container.getKey()).getFluid(1000 * 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) { - if (((Materials) container.getKey()).getCells(container.getValue()) != null && (((Materials) container.getKey()).getMolten(0) != null || ((Materials) container.getKey()).getSolid(0) != null)) { - FluidStack tmpFl = ((Materials) container.getKey()).getMolten(1000 * container.getValue()); - if (tmpFl == null || tmpFl.getFluid() == null) { - tmpFl = ((Materials) container.getKey()).getSolid(1000 * 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 - 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(dust); - input.stackSize = werkstoff.getContents().getKey(); - if (werkstoff.getStats().isElektrolysis()) - GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); - if (werkstoff.getStats().isCentrifuge()) - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, 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().mass / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); - if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { - if (cells > 0) - stOutputs.add(Materials.Empty.getCells(cells)); - GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); - GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0); - } - if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { - if (cells > 0) - stOutputs.add(Materials.Empty.getCells(cells)); - GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().mass / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); - } - } - - 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.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L), werkstoff.get(dust), 100, 4); - - 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().meltingPoint != 0) { - if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(1000), null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Argon.getGas(1000), null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - } else { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(1), null, null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - if (werkstoff.getStats().meltingPoint <= 1000) { - GT_Values.RA.addPrimitiveBlastRecipe(werkstoff.get(dust), null, 9, werkstoff.get(ingot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint); - GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust), werkstoff.getStats().meltingPoint); - } - } - } - - if (werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().meltingPoint > 1750) { - GT_Values.RA.addVacuumFreezerRecipe(werkstoff.get(ingotHot), werkstoff.get(ingot), (int) Math.max(werkstoff.getStats().mass * 3L, 1L)); - } - - if (werkstoff.hasItemType(ingot)) { - GT_ModHandler.addPulverisationRecipe(werkstoff.get(ingot), werkstoff.get(dust)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(nugget), werkstoff.get(dustTiny)); - } - if (werkstoff.hasItemType(ingot) || werkstoff.hasItemType(gem)) { - GT_ModHandler.addPulverisationRecipe(werkstoff.get(block), werkstoff.get(dust, 9)); - } - } - } - - private static void addOreRecipes(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.addForgeHammerRecipe(werkstoff.get(ore), werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed), 16, 10); - 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); - } - } - - private static void addCrushedRecipes(Werkstoff werkstoff) { - if ((werkstoff.getGenerationFeatures().toGenerate & 0b1000) == 0 || (werkstoff.getGenerationFeatures().toGenerate & 0b1) == 0) - return; - - if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) { - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - 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.addForgeHammerRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), werkstoff.getOreByProduct(0, dust), 10, false); - GT_ModHandler.addOreWasherRecipe(werkstoff.get(crushed), 1000, werkstoff.get(crushedPurified), werkstoff.getOreByProduct(0, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); - GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushed), (int) Math.min(5000L, Math.abs(werkstoff.getStats().protons * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), werkstoff.getOreByProduct(1, dust), 10, false); - GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushedPurified), (int) Math.min(5000L, Math.abs(werkstoff.getStats().protons * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny)); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), werkstoff.getOreByProduct(2, dust), 10, false); - - GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustImpure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(0, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().mass * 8L)); - GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustPure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(1, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().mass * 8L)); - - if (werkstoff.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); - } - if (werkstoff.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.Mercury.getFluid(1000L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); - else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); - else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); - } - - private static void addCellRecipes(Werkstoff werkstoff) { - if ((werkstoff.getGenerationFeatures().toGenerate & 0b10000) == 0) - return; - -// if (werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { -// 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) { -// FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); -// if (tmpFl == null || tmpFl.getFluid() == null) { -// tmpFl = ((Materials) container.getKey()).getFluid(1000 * 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 = werkstoff.getContents().getKey(); -// cells += werkstoff.getContents().getKey(); -// stOutputs.add(Materials.Empty.getCells(cells)); -// if (werkstoff.getStats().isElektrolysis()) -// GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); -// if (werkstoff.getStats().isCentrifuge()) -// GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, 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().mass * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); -// if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { -// if (cells > 0) -// stOutputs.add(Materials.Empty.getCells(cells)); -// GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().protons * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30,0)); -// } -// if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { -// if (cells > 0) -// stOutputs.add(Materials.Empty.getCells(cells)); -// GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().mass * 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.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(cell), new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(cell), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000)); - - if (LoaderReference.Forestry) { - FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(capsule), GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), true); - GT_Utility.addFluidContainerData(emptyData); - FluidContainerRegistry.registerFluidContainer(emptyData); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsule), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000)); - } - - if (werkstoff.hasItemType(dust)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getFluidOrGas(1000), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(GT_Utility.getIntegratedCircuit(1), werkstoff.getFluidOrGas(1000), werkstoff.get(dust), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - Materials werkstoffBridgeMaterial = null; - boolean ElementSet = false; - for (Element e : Element.values()) { - if (e.toString().equals(werkstoff.getToolTip())) { - werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName(), werkstoff.getDefaultName()); - werkstoffBridgeMaterial.mElement = e; - e.mLinkedMaterials.add(werkstoffBridgeMaterial); - ElementSet = true; - break; - } - } - if (!ElementSet) - return; - - GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false); -// try { -// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); -// f.setAccessible(true); -// Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); -// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); -// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { -// e.printStackTrace(); -// } - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); - //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{Materials.Empty.getCells(1)}, new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); - } - } - - private static void addMoltenRecipes(Werkstoff werkstoff) { - if (!werkstoff.hasItemType(WerkstoffLoader.cellMolten)) - return; - - //Tank "Recipe" - final FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1)); - FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(cell), Materials.Empty.getCells(1)); - GT_Utility.addFluidContainerData(data); - GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(WerkstoffLoader.cellMolten), new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144)); - - if (LoaderReference.Forestry) { - final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); - FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); - GT_Utility.addFluidContainerData(emptyData); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsuleMolten), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144)); - } - - if (werkstoff.hasItemType(ingot)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(ingot), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - if ((werkstoff.getGenerationFeatures().toGenerate & 0b10000000) != 0) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stickLong), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(plate), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stick), null, werkstoff.getMolten(72), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(nugget), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), werkstoff.getMolten(144), werkstoff.get(ingot), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - //GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(144), werkstoff.get(block), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), werkstoff.getMolten(16), werkstoff.get(nugget), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(1296), werkstoff.get(block), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } else if (werkstoff.hasItemType(dust) && (werkstoff.getGenerationFeatures().toGenerate & 0b10) == 0) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustSmall), null, werkstoff.getMolten(36), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustTiny), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - } - - public static void addAspectToAll(Werkstoff werkstoff){ - 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) { - if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) - ThaumcraftHandler.AspectAdder.addAspectViaBW(werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1)); - } - } - } - } }
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java index 2df54251eb..a162f4ed45 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -34,7 +34,7 @@ import static gregtech.api.enums.OrePrefixes.dustSmall; public class AfterLuVTierEnhacement { - private AfterLuVTierEnhacement(){}; + private AfterLuVTierEnhacement(){} public static void run() { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java new file mode 100644 index 0000000000..ae7f85ed68 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.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.system.material.werkstoff_loaders; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; + +public interface IWerkstoffRunnable { + void run(Werkstoff werkstoff); +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java new file mode 100644 index 0000000000..822706fb77 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.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.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.Pair; +import com.github.bartimaeusnek.bartworks.util.log.DebugLog; +import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TC_Aspects; + +import java.util.Objects; + +public class AspectLoader implements IWerkstoffRunnable { + + @Override + public void run(Werkstoff werkstoff) { + if (!LoaderReference.Thaumcraft) + 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) { + if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) + //noinspection unchecked + ThaumcraftHandler.AspectAdder.addAspectViaBW(werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1)); + } + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java new file mode 100644 index 0000000000..369423817f --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.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.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class BlockLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(block)) + return; + if (werkstoff.hasItemType(ingot)) { + GT_Values.RA.addArcFurnaceRecipe(werkstoff.get(block), new ItemStack[]{werkstoff.get(ingot, 9)}, null, 16, 90, false); + } + if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(block), null, werkstoff.getMolten(1296), 0, 288, 8); + } + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addCutterRecipe(werkstoff.get(block), werkstoff.get(plate, 9), null, (int) Math.max(werkstoff.getStats().getMass() * 10L, 1L), 30); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java new file mode 100644 index 0000000000..cc1f7650a3 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.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 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.util.GT_ModHandler; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasing; +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced; +import static gregtech.api.enums.OrePrefixes.*; + +public class CasingLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!(werkstoff.hasItemType(blockCasing) || werkstoff.hasItemType(plate) || werkstoff.hasItemType(screw) || werkstoff.hasItemType(gearGt) )) + return; + + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing),new Object[]{ + "PSP", + "PGP", + "PSP", + 'P', werkstoff.get(plate), + 'S', werkstoff.get(screw), + 'G', werkstoff.get(gearGtSmall) + }); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + werkstoff.get(plate,6), + werkstoff.get(screw,2), + werkstoff.get(gearGtSmall) + }, GT_Values.NF,werkstoff.get(blockCasing), 200, 30); + + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced),new Object[]{ + "PSP", + "PGP", + "PSP", + 'P', werkstoff.get(plateDouble), + 'S', werkstoff.get(screw), + 'G', werkstoff.get(gearGt) + }); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + werkstoff.get(plateDouble,6), + werkstoff.get(screw,2), + werkstoff.get(gearGt) + }, GT_Values.NF,werkstoff.get(blockCasingAdvanced), 200, 30); + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java new file mode 100644 index 0000000000..ab589c3bec --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 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 com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.enums.Element; +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_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.Objects; + +import static gregtech.api.enums.OrePrefixes.*; +import static gregtech.api.enums.OrePrefixes.cell; + +public class CellLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(cell)) + return; + +// if (werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { +// 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) { +// FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); +// if (tmpFl == null || tmpFl.getFluid() == null) { +// tmpFl = ((Materials) container.getKey()).getFluid(1000 * 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 = werkstoff.getContents().getKey(); +// cells += werkstoff.getContents().getKey(); +// stOutputs.add(Materials.Empty.getCells(cells)); +// if (werkstoff.getStats().isElektrolysis()) +// GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); +// if (werkstoff.getStats().isCentrifuge()) +// GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, 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)); +// if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { +// if (cells > 0) +// stOutputs.add(Materials.Empty.getCells(cells)); +// GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30,0)); +// } +// if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { +// if (cells > 0) +// stOutputs.add(Materials.Empty.getCells(cells)); +// GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5,0)); +// } +// } + + //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.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(cell), new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(cell), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000)); + + if (LoaderReference.Forestry) { + FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(capsule), GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), true); + GT_Utility.addFluidContainerData(emptyData); + FluidContainerRegistry.registerFluidContainer(emptyData); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsule), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000)); + } + + if (werkstoff.hasItemType(dust)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getFluidOrGas(1000), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(GT_Utility.getIntegratedCircuit(1), werkstoff.getFluidOrGas(1000), werkstoff.get(dust), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + + if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + Materials werkstoffBridgeMaterial = null; + boolean ElementSet = false; + for (Element e : Element.values()) { + if (e.toString().equals(werkstoff.getToolTip())) { + werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName(), werkstoff.getDefaultName()); + werkstoffBridgeMaterial.mElement = e; + e.mLinkedMaterials.add(werkstoffBridgeMaterial); + ElementSet = true; + break; + } + } + if (!ElementSet) + return; + + GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false); +// try { +// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); +// f.setAccessible(true); +// Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); +// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); +// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { +// e.printStackTrace(); +// } + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{Materials.Empty.getCells(1)}, new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java new file mode 100644 index 0000000000..0302f12a59 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 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 com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.common.GT_Proxy; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +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.addExtruderRecipe(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt, 8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); + GT_Values.RA.addCutterRecipe(werkstoff.get(stick), werkstoff.get(bolt, 4), null, (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 4); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); + + //screw + GT_Values.RA.addLatheRecipe(werkstoff.get(bolt), werkstoff.get(screw), null, (int) Math.max(werkstoff.getStats().getMass() / 8L, 1L), 4); + GT_ModHandler.addCraftingRecipe(werkstoff.get(screw), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', werkstoff.get(bolt)}); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); + + if (werkstoff.hasItemType(gem)) + return; + + //ring + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L), werkstoff.get(ring, 4), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 6 * tVoltageMultiplier); + GT_ModHandler.addCraftingRecipe(werkstoff.get(ring), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', werkstoff.get(stick)}); + + //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.addExtruderRecipe(werkstoff.get(ingot, 4), ItemList.Shape_Extruder_Gear.get(0L), werkstoff.get(gearGt), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1), 8 * tVoltageMultiplier); + + //wireFine + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Wire.get(0L), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass() * 1.5F, 1F), 8 * tVoltageMultiplier); + GT_Values.RA.addWiremillRecipe(werkstoff.get(ingot), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass(), 1), 8 * tVoltageMultiplier); + GT_Values.RA.addWiremillRecipe(werkstoff.get(stick), werkstoff.get(wireFine, 4), (int) Math.max(werkstoff.getStats().getMass() * 0.5F, 1F), 8 * tVoltageMultiplier); + + //smallGear + if (WerkstoffLoader.smallGearShape != null) + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), WerkstoffLoader.smallGearShape.get(0L), werkstoff.get(gearGtSmall), (int) werkstoff.getStats().getMass(), 8 * tVoltageMultiplier); + if (ConfigHandler.hardmode) + GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{" S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate)}); + else + GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{"P ", " h ", 'P', werkstoff.get(plate)}); + + //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.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Tin.getMolten(32), werkstoff.get(rotor), 240, 24); + GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Lead.getMolten(48), werkstoff.get(rotor), 240, 24); + GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.SolderingAlloy.getMolten(16), werkstoff.get(rotor), 240, 24); + + if (WerkstoffLoader.rotorShape != null) + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L), werkstoff.get(rotor), 200, 60); + + //molten -> metal + if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576), werkstoff.get(gearGt), 128, 8); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), werkstoff.getMolten(144), werkstoff.get(gearGtSmall), 16, 8); + if (WerkstoffLoader.ringMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.ringMold.get(0L), werkstoff.getMolten(36), werkstoff.get(ring), 100, 4 * tVoltageMultiplier); + if (WerkstoffLoader.boltMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.boltMold.get(0L), werkstoff.getMolten(18), werkstoff.get(bolt), 50, 2 * tVoltageMultiplier); + + if (WerkstoffLoader.rotorMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60); + } + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGt), new ItemStack[]{werkstoff.get(dust, 4)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGtSmall), new ItemStack[]{werkstoff.get(dust, 1)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(rotor), new ItemStack[]{werkstoff.get(dust, 4), werkstoff.get(dustSmall)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(ring), new ItemStack[]{werkstoff.get(dustSmall, 1)}, null, 2, 8); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java new file mode 100644 index 0000000000..e0c44aed4d --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.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.system.material.werkstoff_loaders.recipe; + +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; + +import static gregtech.api.enums.OrePrefixes.*; + +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.getType().equals(Werkstoff.Types.ELEMENT)) { + 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.addForgeHammerRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), werkstoff.getOreByProduct(0, dust), 10, false); + GT_ModHandler.addOreWasherRecipe(werkstoff.get(crushed), 1000, werkstoff.get(crushedPurified), werkstoff.getOreByProduct(0, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); + GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushed), (int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), werkstoff.getOreByProduct(1, dust), 10, false); + GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushedPurified), (int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny)); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), werkstoff.getOreByProduct(2, dust), 10, false); + + GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustImpure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(0, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().getMass() * 8L)); + GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustPure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(1, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().getMass() * 8L)); + + if (werkstoff.contains(SubTag.CRYSTALLISABLE)) { + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); + } + if (werkstoff.contains(SubTag.WASHING_MERCURY)) + GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.Mercury.getFluid(1000L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) + GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); + else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); + else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java new file mode 100644 index 0000000000..8f79fc85bc --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 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 com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import com.github.bartimaeusnek.bartworks.util.Pair; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; +import gregtech.api.interfaces.ISubTagContainer; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import static gregtech.api.enums.OrePrefixes.*; + +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])) { + if (container.getKey() instanceof Materials) { + if (((Materials) container.getKey()).getGas(0) != null || ((Materials) container.getKey()).getFluid(0) != null || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { + FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); + if (tmpFl == null || tmpFl.getFluid() == null) { + tmpFl = ((Materials) container.getKey()).getFluid(1000 * 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) { + if (((Materials) container.getKey()).getCells(container.getValue()) != null && (((Materials) container.getKey()).getMolten(0) != null || ((Materials) container.getKey()).getSolid(0) != null)) { + FluidStack tmpFl = ((Materials) container.getKey()).getMolten(1000 * container.getValue()); + if (tmpFl == null || tmpFl.getFluid() == null) { + tmpFl = ((Materials) container.getKey()).getSolid(1000 * 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 + 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(dust); + input.stackSize = werkstoff.getContents().getKey(); + if (werkstoff.getStats().isElektrolysis()) + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); + if (werkstoff.getStats().isCentrifuge()) + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, 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)); + if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { + if (cells > 0) + stOutputs.add(Materials.Empty.getCells(cells)); + GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); + GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0); + } + if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { + if (cells > 0) + stOutputs.add(Materials.Empty.getCells(cells)); + GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); + } + } + + GT_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.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L), werkstoff.get(dust), 100, 4); + + 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.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(1000), null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) { + GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Argon.getGas(1000), null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + } else { + GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(1), null, null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + if (werkstoff.getStats().getMeltingPoint() <= 1000) { + GT_Values.RA.addPrimitiveBlastRecipe(werkstoff.get(dust), null, 9, werkstoff.get(ingot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint()); + GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust), werkstoff.getStats().getMeltingPoint()); + } + } + } + + if (werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().getMeltingPoint() > 1750) { + GT_Values.RA.addVacuumFreezerRecipe(werkstoff.get(ingotHot), werkstoff.get(ingot), (int) Math.max(werkstoff.getStats().getMass() * 3L, 1L)); + } + + if (werkstoff.hasItemType(ingot)) { + GT_ModHandler.addPulverisationRecipe(werkstoff.get(ingot), werkstoff.get(dust)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(nugget), werkstoff.get(dustTiny)); + } + if (werkstoff.hasItemType(ingot) || werkstoff.hasItemType(gem)) { + GT_ModHandler.addPulverisationRecipe(werkstoff.get(block), werkstoff.get(dust, 9)); + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java new file mode 100644 index 0000000000..c020c3394d --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.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.system.material.werkstoff_loaders.recipe; + +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.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import static gregtech.api.enums.OrePrefixes.*; + +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_ModHandler.addCompressionRecipe(werkstoff.get(gem, 9), werkstoff.get(block)); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(block), werkstoff.get(gem, 9), 100, 24); + GT_Values.RA.addSifterRecipe( + werkstoff.get(crushedPurified), + new ItemStack[]{ + werkstoff.get(gemExquisite), + werkstoff.get(gemFlawless), + werkstoff.get(gem), + werkstoff.get(gemFlawed), + werkstoff.get(gemChipped), + werkstoff.get(dust) + }, + new int[]{ + 200, 1000, 2500, 2000, 4000, 5000 + }, + 800, + 16 + ); + } + + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemExquisite), werkstoff.get(dust, 4)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawless), werkstoff.get(dust, 2)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gem), werkstoff.get(dust)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawed), werkstoff.get(dustSmall, 2)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemChipped), werkstoff.get(dustSmall)); + + GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawless, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemExquisite)}); + 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.addForgeHammerRecipe(werkstoff.get(gemExquisite), werkstoff.get(gemFlawless, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawless), werkstoff.get(gem, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gem), werkstoff.get(gemFlawed, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawed), werkstoff.get(gemChipped, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemChipped), werkstoff.get(dustTiny), 64, 16); + + if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + + GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); + } + + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120); + } + + GT_Values.RA.addLatheRecipe(werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30); + GregTech_API.registerCover(werkstoff.get(lens), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, werkstoff.getRGBA(), false)), new gregtech.common.covers.GT_Cover_Lens(BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(lens), werkstoff.get(dustSmall, 3)); + + for (ItemStack is : OreDictionary.getOres("craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) { + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawed, 3), is, werkstoff.get(gem, 1), 600, 120); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawless, 3), is, werkstoff.get(gemExquisite, 1), 2400, 2000); + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java new file mode 100644 index 0000000000..9db7e8f26a --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.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.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; + +import static gregtech.api.enums.OrePrefixes.block; +import static gregtech.api.enums.OrePrefixes.ingot; + +public class MetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(ingot)) { + GT_ModHandler.addCompressionRecipe(werkstoff.get(ingot, 9), werkstoff.get(block)); + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Extruder_Block.get(0), werkstoff.get(block), (int) werkstoff.getStats().getMass(), 8 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); + GT_Values.RA.addAlloySmelterRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Mold_Block.get(0L), werkstoff.get(block), (int) (werkstoff.getStats().getMass() / 2), 4 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java new file mode 100644 index 0000000000..68cca299c2 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.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.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.Objects; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.capsuleMolten; +import static gregtech.api.enums.OrePrefixes.*; +import static gregtech.api.enums.OrePrefixes.dustTiny; + +public class MoltenCellLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(WerkstoffLoader.cellMolten)) + return; + + //Tank "Recipe" + final FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1)); + FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(cell), Materials.Empty.getCells(1)); + GT_Utility.addFluidContainerData(data); + GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(WerkstoffLoader.cellMolten), new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144)); + + if (LoaderReference.Forestry) { + final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); + FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); + GT_Utility.addFluidContainerData(emptyData); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsuleMolten), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144)); + } + + if (werkstoff.hasItemType(ingot)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(ingot), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stickLong), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(plate), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stick), null, werkstoff.getMolten(72), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(nugget), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), werkstoff.getMolten(144), werkstoff.get(ingot), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + //GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(144), werkstoff.get(block), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), werkstoff.getMolten(16), werkstoff.get(nugget), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(1296), werkstoff.get(block), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } else { + if (werkstoff.hasItemType(dust)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustSmall), null, werkstoff.getMolten(36), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustTiny), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java new file mode 100644 index 0000000000..67e82dab29 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.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.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class MultipleMetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(plateDense)) { + GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2)}, new ItemStack[]{werkstoff.get(plateDouble)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60, 0)); + GregTech_API.registerCover(werkstoff.get(plateDouble), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false), null); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plateDouble), new ItemStack[]{werkstoff.get(dust, 2)}, null, 2, 8); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java new file mode 100644 index 0000000000..7700ff74c6 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.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.system.material.werkstoff_loaders.recipe; + +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; + +import static gregtech.api.enums.OrePrefixes.*; + +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.addForgeHammerRecipe(werkstoff.get(ore), werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed), 16, 10); + 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); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java new file mode 100644 index 0000000000..e4360f66ef --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.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.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.SideReference; +import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.TextureSet; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Proxy; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class SimpleMetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(plate)) { + if (werkstoff.hasItemType(gem)) { + GT_Values.RA.addLatheRecipe(werkstoff.get(gem), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(gem)}); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + + TextureSet texSet = werkstoff.getTexSet(); + GT_RenderedTexture texture = SideReference.Side.Client ? + new GT_RenderedTexture(texSet.mTextures[PrefixTextureLinker.blockTexMap.getOrDefault(texSet, block.mTextureIndex)], werkstoff.getRGBA(), false) : + new GT_RenderedTexture(texSet.mTextures[block.mTextureIndex], werkstoff.getRGBA(), false); + GregTech_API.registerCover(werkstoff.get(plate),texture,null); + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + 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_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1)}, new ItemStack[]{werkstoff.get(plate)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass(), 1L), 24, 0)); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ingot, 3), werkstoff.get(plate, 2), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + GregTech_API.registerCover(werkstoff.get(plate), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[71], werkstoff.getRGBA(), false), null); + + GT_Values.RA.addLatheRecipe(werkstoff.get(ingot), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Plate.get(0), werkstoff.get(plate), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Rod.get(0), werkstoff.get(stick, 2), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(stickLong), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(stick), new ItemStack[]{werkstoff.get(dustSmall, 2)}, null, 2, 8); + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java new file mode 100644 index 0000000000..9b14e0f334 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.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.werkstoff_loaders.recipe; + +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.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.GT_Proxy; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.gtnhGT; +import static gregtech.api.enums.OrePrefixes.*; + +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)}); + + if (gtnhGT) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SOLDERING_IRON_MV, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), 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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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.StainlessSteel, 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.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), '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(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())}); + } + + if (gtnhGT) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), '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.Titanium, 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.Titanium), 'P', plate.get(Materials.Titanium), '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.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, 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.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); + } + + // GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(16,1, werkstoff.getBridgeMaterial(),werkstoff.getBridgeMaterial(),null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', werkstoff.get(ingot)}); + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java new file mode 100644 index 0000000000..44c35c8543 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.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.material.werkstoff_loaders.registration; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; + +public class AssociationLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + for (OrePrefixes prefixes : OrePrefixes.values()) { + 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); + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java new file mode 100644 index 0000000000..f61ce70c81 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 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 com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import net.minecraft.item.ItemStack; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +import static gregtech.api.enums.OrePrefixes.*; + +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.getType().equals(Werkstoff.Types.ELEMENT))) { + if (prefixes == dust && werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + boolean ElementSet = false; + for (Element e : Element.values()) { + if (e.toString().equals(werkstoff.getToolTip())) { + if (e.mLinkedMaterials.size() > 0) + 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; +// try { +// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); +// f.setAccessible(true); +// Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); +// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); +// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { +// e.printStackTrace(); +// } + if (werkstoff.hasItemType(dust)) { + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } + } + } + + 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(WerkstoffLoader.cellMolten)) { + werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1).getFluid(); + } + werkstoffBridgeMaterial.mName = werkstoff.getVarName(); + werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName(); + try { + Field f = Materials.class.getField("mLocalizedName"); + f.set(werkstoffBridgeMaterial, werkstoff.getDefaultName()); + } catch (NoSuchFieldException | IllegalAccessException ignored) { + } + werkstoffBridgeMaterial.mChemicalFormula = werkstoff.getToolTip(); + if (LoaderReference.Thaumcraft) + werkstoffBridgeMaterial.mAspects = werkstoff.getGTWrappedTCAspects(); + werkstoffBridgeMaterial.mMaterialInto = werkstoffBridgeMaterial; + werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING) ? Materials.Blaze : werkstoff.contains(SubTag.MAGICAL) ? Materials.Thaumium : werkstoffBridgeMaterial.mDurability > 5120 ? Materials.TungstenSteel : werkstoffBridgeMaterial.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); + //if (WerkstoffLoader.items.get(prefixes) != null) + } + } + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java new file mode 100644 index 0000000000..8ffd3ea552 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.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.werkstoff_loaders.registration; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasing; +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced; + +public class CasingRegistrator implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + GT_OreDictUnificator.addAssociation( + blockCasing, werkstoff.getBridgeMaterial(), + new ItemStack(WerkstoffLoader.BWBlockCasings, 1, werkstoff.getmID()), + false + ); + GT_OreDictUnificator.addAssociation( + blockCasingAdvanced, werkstoff.getBridgeMaterial(), + new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, 1, werkstoff.getmID()), + false + ); + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java index 2aeb8cef35..8d4fe889cb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java index 9269762a22..afa6aaa98a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java index 9aa46ae3b2..bf077f47e1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java index 3def3800d5..6677e6ab79 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java index b8fda6a8dc..87b1abdd4e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java index 6f32b0007b..f0682e53b4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java index 6429cece69..f8b0aac053 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java @@ -58,7 +58,7 @@ import java.util.stream.Collectors; import static gregtech.api.enums.GT_Values.*; -@SuppressWarnings("unused") +@SuppressWarnings({"unused","RedundantSuppression"}) public class BW_Util { public static final int STANDART = 0; @@ -357,7 +357,11 @@ public class BW_Util { * @param aDuration - recipe Duration * @param mAmperage - should be 1 ? */ - public static void calculateOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, GT_MetaTileEntity_MultiBlockBase base) { + public static void calculateOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base) { + calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, 2); + } + + private static void calculateOverclockednessMultiInternal(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base, @Nonnegative int modifier){ byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); if (mTier == 0) { //Long time calculation @@ -367,7 +371,7 @@ public class BW_Util { base.mEUt = Integer.MAX_VALUE - 1; base.mMaxProgresstime = Integer.MAX_VALUE - 1; } else { - base.mEUt = aEUt >> 2; + base.mEUt = aEUt >> modifier; base.mMaxProgresstime = (int) xMaxProgresstime; } } else { @@ -379,62 +383,23 @@ public class BW_Util { base.mMaxProgresstime = aDuration; while (tempEUt <= V[mTier - 1] * mAmperage) { - tempEUt <<= 2;//this actually controls overclocking + tempEUt <<= modifier;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking base.mMaxProgresstime >>= 1;//this is effect of overclocking xEUt = base.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power } - while (xEUt > maxInputVoltage){ + while (xEUt > maxInputVoltage && xEUt >= aEUt){ //downclock one notch until we are good again, we have overshot. - xEUt >>=2; + xEUt >>= modifier; base.mMaxProgresstime <<= 1; } - if (xEUt > Integer.MAX_VALUE - 1) { - base.mEUt = Integer.MAX_VALUE - 1; - base.mMaxProgresstime = Integer.MAX_VALUE - 1; - } else { - base.mEUt = (int) xEUt; - if (base.mEUt == 0) - base.mEUt = 1; - if (base.mMaxProgresstime <= 0) - base.mMaxProgresstime = 1;//set time to 1 tick - } - } - } - - public static void calculateOverclockedNessMultiPefectOC(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, GT_MetaTileEntity_MultiBlockBase base){ - byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); - if (mTier == 0) { - //Long time calculation - long xMaxProgresstime = ((long) aDuration) << 1; - if (xMaxProgresstime > Integer.MAX_VALUE - 1) { - //make impossible if too long - base.mEUt = Integer.MAX_VALUE - 1; - base.mMaxProgresstime = Integer.MAX_VALUE - 1; - } else { - base.mEUt = aEUt >> 2; - base.mMaxProgresstime = (int) xMaxProgresstime; - } - } else { - long xEUt = aEUt; - //Isnt too low EUt check? - long tempEUt = Math.max(xEUt, V[1]); - - base.mMaxProgresstime = aDuration; - - while (tempEUt <= V[mTier - 1] * mAmperage) { - tempEUt <<= 1;//this actually controls overclocking - base.mMaxProgresstime >>= 1;//this is effect of overclocking - xEUt = base.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 1;//U know, if the time is less than 1 tick make the machine use less power + if (xEUt < aEUt){ + xEUt <<= modifier; + base.mMaxProgresstime >>= 1; } - while (xEUt > maxInputVoltage) { - //downclock one notch until we are good again, we have overshot. - xEUt >>= 1; - base.mMaxProgresstime <<= 1; - } if (xEUt > Integer.MAX_VALUE - 1) { base.mEUt = Integer.MAX_VALUE - 1; base.mMaxProgresstime = Integer.MAX_VALUE - 1; @@ -448,6 +413,10 @@ public class BW_Util { } } + public static void calculateOverclockedNessMultiPefectOC(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base){ + calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, 1); + } + public static long getnominalVoltage(GT_MetaTileEntity_MultiBlockBase base) { long rVoltage = 0L; long rAmperage = 0L; diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java index 5e1bb3e792..7045e27bd1 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java index db9b77ec91..dd0dc8f325 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java index b6cc37b451..b75a9fcd1a 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java index fb0451d381..8f6f1f9164 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java index c881e09317..5faa82b6e6 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +36,7 @@ import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas; import java.util.*; -@SuppressWarnings("unused") +@SuppressWarnings({"unused", "RedundantSuppression"}) public final class BWAtmosphereManager { private static final Map<Integer,Integer[]> COEFFICIENT_MAP = new HashMap<>(); @@ -90,7 +90,7 @@ public final class BWAtmosphereManager { return true; } String name = gas.toString(); - name = name.substring(0,1)+name.substring(1).toLowerCase(Locale.US); + name = name.charAt(0)+name.substring(1).toLowerCase(Locale.US); ISubTagContainer mat = Materials.get(name); if (mat == Materials._NULL){ mat = WerkstoffLoader.getWerkstoff(name); diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java index 3a7e92f186..04d4e41cb8 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java index 7e082ba695..b44120bf34 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java index 47be16ce21..ecc243a3d0 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java index d096ba4962..ddb37b9941 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java index f6a5cfc3f3..2c8eac2cd9 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java index cf4c13f326..78cbd986ac 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java index cce24d22db..a2f3f78861 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java index 609a718be2..1fbddb01b1 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java index 954364034a..7a01028a61 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java index 8bfa8024d5..ffac1554d4 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -33,7 +33,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import java.util.ArrayList; import java.util.Iterator; -@SuppressWarnings({"unused"}) +@SuppressWarnings({"unused","RedundantSuppression"}) public class TT_TileEntity_ManualTrafo extends GT_TileEntity_ManualTrafo { ArrayList<GT_MetaTileEntity_Hatch_EnergyMulti> mTTEnergyHatches = new ArrayList<>(); diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java index c6f9003d9d..bacd18c894 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java index 67c0dfb15d..ee22ca8ab2 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java index 991b7ad1b5..08fc1d0e5c 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal |