This commit is contained in:
way2muchnoise
2016-10-29 20:38:05 +02:00
parent 3362e24a3c
commit 5a1dc1dbc4

View File

@@ -22,6 +22,11 @@ public class ItemStackList implements IItemStackList {
@Override @Override
public void add(ItemStack stack) { public void add(ItemStack stack) {
if (stack == null) {
// What you doing adding nulls?
return;
}
for (ItemStack otherStack : stacks.get(stack.getItem())) { for (ItemStack otherStack : stacks.get(stack.getItem())) {
if (API.instance().getComparer().isEqualNoQuantity(otherStack, stack)) { if (API.instance().getComparer().isEqualNoQuantity(otherStack, stack)) {
if ((long) otherStack.stackSize + (long) stack.stackSize > Integer.MAX_VALUE) { if ((long) otherStack.stackSize + (long) stack.stackSize > Integer.MAX_VALUE) {