From 874dfdc3097010b3aaa09266e45ba61fecbbb868 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sun, 3 Jan 2016 16:49:00 +0100 Subject: Fix forestry worktable crash --- src/main/java/gregtech/api/util/GT_Shaped_Recipe.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java b/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java index fe78d6a854..e51c490519 100644 --- a/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java @@ -73,8 +73,9 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec ItemStack tStack = aGrid.getStackInSlot(i); if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { tStack = GT_Utility.copyAmount(1, tStack); + if(GT_Utility.isStackValid(tStack)){ GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); - tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound())); + tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound()));} } } rNBT.setTag("GT.CraftingComponents", tNBT); -- cgit