From 333ad6a09ee47205d82bab74b8372424c53e6c76 Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Mon, 6 Mar 2017 16:09:11 -0800 Subject: [PATCH] Fix null stacks in Utils class --- src/main/java/WayofTime/bloodmagic/util/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/WayofTime/bloodmagic/util/Utils.java b/src/main/java/WayofTime/bloodmagic/util/Utils.java index 43f44f77..91f1833f 100644 --- a/src/main/java/WayofTime/bloodmagic/util/Utils.java +++ b/src/main/java/WayofTime/bloodmagic/util/Utils.java @@ -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(); }