From 0aaf57c200d3bd31320752b7db59bbbefd935e5d Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Sun, 13 Apr 2014 14:21:14 +0800 Subject: [PATCH] #591 Work around to avoid unreproducible crash. --- .../enderio/machine/recipe/OreDictionaryRecipeInput.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/crazypants/enderio/machine/recipe/OreDictionaryRecipeInput.java b/common/crazypants/enderio/machine/recipe/OreDictionaryRecipeInput.java index 97d8a404..006afb10 100644 --- a/common/crazypants/enderio/machine/recipe/OreDictionaryRecipeInput.java +++ b/common/crazypants/enderio/machine/recipe/OreDictionaryRecipeInput.java @@ -16,10 +16,14 @@ public class OreDictionaryRecipeInput extends RecipeInput { @Override public boolean isInput(ItemStack test) { - if(test == null) { + if(test == null || oreId < 0) { + return false; + } + try { //work around for issue #591 + return OreDictionary.getOreID(test) == oreId; + } catch (Exception e) { return false; } - return OreDictionary.getOreID(test) == oreId; } @Override