From d3e6332d489ad4ef61d4d5896fdf05ba927a50bd Mon Sep 17 00:00:00 2001 From: RedmenNL Date: Fri, 24 Jan 2014 11:39:11 +0100 Subject: [PATCH] Fixed OreStack EMC values not being looked up properly --- .../java/com/pahimar/ee3/emc/EmcRegistry.java | 22 +++++++++++++++++++ .../com/pahimar/ee3/helper/RecipeHelper.java | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/pahimar/ee3/emc/EmcRegistry.java b/src/main/java/com/pahimar/ee3/emc/EmcRegistry.java index 95f1ef59..9fd9f8c2 100644 --- a/src/main/java/com/pahimar/ee3/emc/EmcRegistry.java +++ b/src/main/java/com/pahimar/ee3/emc/EmcRegistry.java @@ -314,6 +314,17 @@ public class EmcRegistry } } } + else if (stack.getWrappedStack() instanceof OreStack) + { + OreStack oreStack = (OreStack)stack.getWrappedStack(); + for (ItemStack oreItemStack : OreDictionary.getOres(oreStack.oreName)) + { + if (emcRegistry.stackMappings.containsKey(new WrappedStack(oreItemStack))) + { + return true; + } + } + } } } } @@ -399,6 +410,17 @@ public class EmcRegistry return lowestValue; } } + else if (stack.getWrappedStack() instanceof OreStack) + { + OreStack oreStack = (OreStack)stack.getWrappedStack(); + for (ItemStack oreItemStack : OreDictionary.getOres(oreStack.oreName)) + { + if (emcRegistry.stackMappings.containsKey(new WrappedStack(oreItemStack))) + { + return emcRegistry.stackMappings.get(new WrappedStack(oreItemStack)); + } + } + } } } diff --git a/src/main/java/com/pahimar/ee3/helper/RecipeHelper.java b/src/main/java/com/pahimar/ee3/helper/RecipeHelper.java index 78fa73b1..0fda0ca1 100644 --- a/src/main/java/com/pahimar/ee3/helper/RecipeHelper.java +++ b/src/main/java/com/pahimar/ee3/helper/RecipeHelper.java @@ -98,7 +98,7 @@ public class RecipeHelper if (oreStack.getWrappedStack() instanceof OreStack) { - recipeInputs.add(new WrappedStack(shapedOreRecipe.getInput()[i])); + recipeInputs.add(oreStack); } } else if (shapedOreRecipe.getInput()[i] instanceof ItemStack)