Add a null check in dropItems()
This commit is contained in:
parent
35611e0bf7
commit
2936d76b95
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue