From 3c9a1f5c0748bd4cb66a28320c7880416a9da1e9 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 31 Jul 2016 02:48:04 +1000 Subject: % Tweaks to recipe handling for null cases which weren't actually null. + Re-enabled the Industrial Centrifuge by default. --- .../miscutil/core/item/base/dusts/BaseItemDust.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/Java/miscutil/core/item') diff --git a/src/Java/miscutil/core/item/base/dusts/BaseItemDust.java b/src/Java/miscutil/core/item/base/dusts/BaseItemDust.java index de84c739bb..0435bd4f10 100644 --- a/src/Java/miscutil/core/item/base/dusts/BaseItemDust.java +++ b/src/Java/miscutil/core/item/base/dusts/BaseItemDust.java @@ -217,8 +217,16 @@ public class BaseItemDust extends Item{ if (tempIngot != null && tempIngot != "" && outputStacks[1] != null){ tempInputStack = UtilsItems.getItemStackOfAmountFromOreDict(tempIngot, 1); tempOutputStack = UtilsItems.getItemStackOfAmountFromOreDict(tempDust, 1); + ItemStack tempStackOutput2; + int chance = mTier*10/Utils.randInt(10, 20); + if (outputStacks[1] != null && !outputStacks[1].getUnlocalizedName().toLowerCase().contains("aaa_broken")){ + tempStackOutput2 = outputStacks[1]; + } + else { + tempStackOutput2 = null; + } if (null != tempOutputStack && null != tempInputStack){ - GT_ModHandler.addPulverisationRecipe(tempInputStack, outputStacks[0], outputStacks[1], mTier*10/Utils.randInt(10, 20)); + GT_ModHandler.addPulverisationRecipe(tempInputStack, outputStacks[0], tempStackOutput2, chance); } } if (tempIngot != null && tempIngot != ""){ @@ -283,7 +291,14 @@ public class BaseItemDust extends Item{ private void addBlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int tempRequired){ //Special Cases if (input1.getUnlocalizedName().toLowerCase().contains("tantalloy61")){ + Utils.LOG_INFO("Adding Special handler for Staballoy-61 in the Blast Furnace"); input2 = UtilsItems.getItemStackOfAmountFromOreDict("dustTantalloy60", 2); + if (input2 == null){ + Utils.LOG_INFO("invalid itemstack."); + } + else { + Utils.LOG_INFO("Found "+input2.getDisplayName()); + } } GT_Values.RA.addBlastRecipe( input1, -- cgit