Fix null stacks in Utils class

This commit is contained in:
Nicholas Ignoffo 2017-03-06 16:09:11 -08:00
parent fceb50bd00
commit 333ad6a09e

View file

@ -447,7 +447,7 @@ public class Utils
for (int x = 0; x < inventory.length; x++)
{
ItemStack stack = inventory[x];
if (stack == null)
if (stack.isEmpty())
{
continue;
}
@ -918,7 +918,7 @@ public class Utils
ItemStack invStack = inventory.getStackInSlot(i);
if (invStack != null && canCombine(stack, invStack))
if (!invStack.isEmpty() && canCombine(stack, invStack))
{
numberMatching += invStack.getCount();
}