Merge pull request #605 from Dynious/OreRecipeFix

Fixed OreStack EMC values not being looked up properly
This commit is contained in:
pahimar 2014-01-24 07:18:50 -08:00
commit ccd5ebaefd
2 changed files with 23 additions and 1 deletions

View file

@ -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));
}
}
}
}
}

View file

@ -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)