Stop container items from affecting EmcValue assignment

This commit is contained in:
pahimar 2013-12-19 17:59:31 -05:00
parent cc74d32ffb
commit a545d4519e

View file

@ -62,6 +62,7 @@ public class EmcHelper
{
ItemStack itemStack = (ItemStack) wrappedStack.getWrappedStack();
// Check if we are dealing with a potential fluid
if (FluidContainerRegistry.getFluidForFilledItem(itemStack) != null)
{
if (itemStack.getItem().getContainerItemStack(itemStack) != null)
@ -74,6 +75,11 @@ public class EmcHelper
wrappedStackValue = EmcRegistry.getEmcValue(wrappedStack);
}
}
// If we are dealing with a "tool" (container item), assume it's value is 0 (since it won't be used up in the recipe)
else if (itemStack.getItem().getContainerItemStack(itemStack) != null)
{
wrappedStackValue = new EmcValue(0);
}
else
{
wrappedStackValue = EmcRegistry.getEmcValue(wrappedStack);