diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-09-17 17:44:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 15:44:12 +0000 |
commit | c7e451f83e3ae5ebadc5d223eb1180bf4b218e7f (patch) | |
tree | faa9c21dc39151dbd3d2e306f34178e94c8c827d /src/main/java/gtPlusPlus/core | |
parent | 0d27316cbbfb7ddaac334b93273833d94ad26a67 (diff) | |
download | GT5-Unofficial-c7e451f83e3ae5ebadc5d223eb1180bf4b218e7f.tar.gz GT5-Unofficial-c7e451f83e3ae5ebadc5d223eb1180bf4b218e7f.tar.bz2 GT5-Unofficial-c7e451f83e3ae5ebadc5d223eb1180bf4b218e7f.zip |
Add more is mod loaded checks to avoid crash during recipe registration (#3211)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
-rw-r--r-- | src/main/java/gtPlusPlus/core/item/ModItems.java | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index 12e127c3b7..bdf93c22be 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -649,27 +649,25 @@ public final class ModItems { dustFertUN32 = ItemUtils .generateSpecialUseDusts("UN32Fertiliser", "UN-32 Fertiliser", Utils.rgbtoHexValue(55, 190, 55))[0]; - ItemStack temp1 = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); - ItemStack temp2 = null; - if (Forestry.isModLoaded()) { - temp2 = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); - } - if (temp1 != null) { - fluidFertBasic = FluidUtils.generateFluidNonMolten( - "Fertiliser", - "Fertiliser", - 32, - new short[] { 45, 170, 45, 100 }, - temp1, - null, - true); - GTValues.RA.stdBuilder() - .itemInputs(temp2) - .fluidOutputs(new FluidStack(fluidFertBasic, 36)) - .duration(5 * TICKS) - .eut(16) - .addTo(fluidExtractionRecipes); + ItemStack temp1 = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); + ItemStack temp2 = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); + if (temp1 != null && temp2 != null) { + fluidFertBasic = FluidUtils.generateFluidNonMolten( + "Fertiliser", + "Fertiliser", + 32, + new short[] { 45, 170, 45, 100 }, + temp1, + null, + true); + GTValues.RA.stdBuilder() + .itemInputs(temp2) + .fluidOutputs(new FluidStack(fluidFertBasic, 36)) + .duration(5 * TICKS) + .eut(16) + .addTo(fluidExtractionRecipes); + } } fluidFertUN32 = FluidUtils.generateFluidNonMolten( "UN32Fertiliser", |