diff options
author | chochem <40274384+chochem@users.noreply.github.com> | 2023-04-08 12:52:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-08 13:52:57 +0200 |
commit | 38d4792fdd4163a18c4d0ba5a208e9a00710fc91 (patch) | |
tree | 630625b2e60445f190b365a3900222ea9bdd07d3 /src/main/java/gregtech/loaders | |
parent | 3570785d5b3121971a02efa6361eb858e74c5f3c (diff) | |
download | GT5-Unofficial-38d4792fdd4163a18c4d0ba5a208e9a00710fc91.tar.gz GT5-Unofficial-38d4792fdd4163a18c4d0ba5a208e9a00710fc91.tar.bz2 GT5-Unofficial-38d4792fdd4163a18c4d0ba5a208e9a00710fc91.zip |
null checks for ingots (#1852)
Diffstat (limited to 'src/main/java/gregtech/loaders')
-rw-r--r-- | src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java index ebe68fe1c6..5310e87eb7 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AlloySmelterRecipes.java @@ -74,32 +74,37 @@ public class AlloySmelterRecipes implements Runnable { materials[2].mMaterial, materials[2].mAmount); if (outputIngot != GT_Values.NI) { - GT_Values.RA.stdBuilder() - .itemInputs(ingot1, dust2) - .itemOutputs(outputIngot) - .noFluidInputs() - .noFluidOutputs() - .duration((int) materials[2].mAmount * 50) - .eut(16) - .addTo(sAlloySmelterRecipes); - - GT_Values.RA.stdBuilder() - .itemInputs(ingot1, ingot2) - .itemOutputs(outputIngot) - .noFluidInputs() - .noFluidOutputs() - .duration((int) materials[2].mAmount * 50) - .eut(16) - .addTo(sAlloySmelterRecipes); + if (ingot1 != null) { + GT_Values.RA.stdBuilder() + .itemInputs(ingot1, dust2) + .itemOutputs(outputIngot) + .noFluidInputs() + .noFluidOutputs() + .duration((int) materials[2].mAmount * 50) + .eut(16) + .addTo(sAlloySmelterRecipes); + if (ingot2 != null) { + GT_Values.RA.stdBuilder() + .itemInputs(ingot1, ingot2) + .itemOutputs(outputIngot) + .noFluidInputs() + .noFluidOutputs() + .duration((int) materials[2].mAmount * 50) + .eut(16) + .addTo(sAlloySmelterRecipes); + } + } - GT_Values.RA.stdBuilder() - .itemInputs(dust1, ingot2) - .itemOutputs(outputIngot) - .noFluidInputs() - .noFluidOutputs() - .duration((int) materials[2].mAmount * 50) - .eut(16) - .addTo(sAlloySmelterRecipes); + if (ingot2 != null) { + GT_Values.RA.stdBuilder() + .itemInputs(dust1, ingot2) + .itemOutputs(outputIngot) + .noFluidInputs() + .noFluidOutputs() + .duration((int) materials[2].mAmount * 50) + .eut(16) + .addTo(sAlloySmelterRecipes); + } GT_Values.RA.stdBuilder() .itemInputs(dust1, dust2) |