This commit is contained in:
Dynious 2014-07-21 15:59:40 +02:00
parent 46e6fa9b8b
commit ef46fda725

View file

@ -106,11 +106,18 @@ public class WrappedStack implements Comparable<WrappedStack>
if (object instanceof ItemStack)
{
ItemStack itemStack = ((ItemStack) object).copy();
stackSize = itemStack.stackSize;
itemStack.stackSize = 1;
wrappedStack = itemStack;
if (((ItemStack) object).getItem() != null)
{
ItemStack itemStack = ((ItemStack) object).copy();
stackSize = itemStack.stackSize;
itemStack.stackSize = 1;
wrappedStack = itemStack;
}
else
{
stackSize = -1;
wrappedStack = null;
}
}
else if (object instanceof OreStack)
{
@ -259,10 +266,17 @@ public class WrappedStack implements Comparable<WrappedStack>
{
return true;
}
else if (object instanceof Item || object instanceof Block || object instanceof ItemStack)
else if (object instanceof Item || object instanceof Block)
{
return true;
}
else if (object instanceof ItemStack)
{
if (((ItemStack)object).getItem() != null)
{
return true;
}
}
else if (object instanceof OreStack)
{
return true;