commit
f11b700704
1 changed files with 20 additions and 6 deletions
|
@ -105,13 +105,20 @@ public class WrappedStack implements Comparable<WrappedStack>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object instanceof ItemStack)
|
if (object instanceof ItemStack)
|
||||||
|
{
|
||||||
|
if (((ItemStack) object).getItem() != null)
|
||||||
{
|
{
|
||||||
ItemStack itemStack = ((ItemStack) object).copy();
|
ItemStack itemStack = ((ItemStack) object).copy();
|
||||||
|
|
||||||
stackSize = itemStack.stackSize;
|
stackSize = itemStack.stackSize;
|
||||||
itemStack.stackSize = 1;
|
itemStack.stackSize = 1;
|
||||||
wrappedStack = itemStack;
|
wrappedStack = itemStack;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stackSize = -1;
|
||||||
|
wrappedStack = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (object instanceof OreStack)
|
else if (object instanceof OreStack)
|
||||||
{
|
{
|
||||||
OreStack oreStack = (OreStack) object;
|
OreStack oreStack = (OreStack) object;
|
||||||
|
@ -259,10 +266,17 @@ public class WrappedStack implements Comparable<WrappedStack>
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (object instanceof Item || object instanceof Block || object instanceof ItemStack)
|
else if (object instanceof Item || object instanceof Block)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (object instanceof ItemStack)
|
||||||
|
{
|
||||||
|
if (((ItemStack)object).getItem() != null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (object instanceof OreStack)
|
else if (object instanceof OreStack)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue