Stop container items from affecting EmcValue assignment
This commit is contained in:
parent
cc74d32ffb
commit
a545d4519e
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue