Add a null check in dropItems()

This commit is contained in:
CovertJaguar 2013-12-13 15:27:10 -08:00
parent 35611e0bf7
commit 2936d76b95

View file

@ -86,10 +86,9 @@ public class InvUtils {
}
/* STACK DROPS */
public static void dropItems(World world, ItemStack stack, int i, int j, int k) {
if (stack.stackSize <= 0) {
return;
}
public static void dropItems(World world, ItemStack stack, int i, int j, int k) {
if (stack == null || stack.stackSize <= 0)
return;
float f1 = 0.7F;
double d = (world.rand.nextFloat() * f1) + (1.0F - f1) * 0.5D;