From 8955b06a81e9ad65e74ca60dab11fc14a0d2f39c Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Tue, 22 May 2018 18:56:59 +1000 Subject: + Added MV/HV Dehydrators. + Added recipes for new Dehydrators. $ More recipe smoothing. --- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/recipes') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index eed1e4a4ad..f15eb5cf3a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -1,5 +1,7 @@ package gtPlusPlus.xmod.gregtech.recipes; +import static gtPlusPlus.core.lib.CORE.GTNH; + import net.minecraft.item.ItemStack; import gregtech.api.GregTech_API; @@ -9,6 +11,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.Recipe_GT; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; @@ -479,6 +482,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) { return false; } + if (GTNH) { + return false; + } Recipe_GT.Gregtech_Recipe_Map.sComponentAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[] { aOutput1 }, null, new FluidStack[] { aFluidInput }, null, aDuration, aEUt, 0); return true; @@ -489,6 +495,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } + + if (!ItemUtils.checkForInvalidItems(aInputs) || !ItemUtils.checkForInvalidItems(aOutputs)) { + return false; + } Recipe_GT.Gregtech_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); return true; } @@ -497,6 +507,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } + if (!ItemUtils.checkForInvalidItems(aInputs) || !ItemUtils.checkForInvalidItems(aOutputs)) { + return false; + } Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); return true; } @@ -506,6 +519,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } + + if (!ItemUtils.checkForInvalidItems(aInputs) || !ItemUtils.checkForInvalidItems(aOutputs)) { + return false; + } if (Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) { return true; } -- cgit