3
0

Add some checks to entityitem :)

This commit is contained in:
Prototik 2015-05-27 18:44:16 +07:00
parent d24b372625
commit bdbb1413cb

View File

@ -307,6 +307,6 @@
+ @Override
+ public boolean entityAllowedToSpawn() {
+ ItemStack stack = getDataWatcher().getWatchableObjectItemStack(10);
+ return stack != null && stack.stackSize > 0;
+ return stack != null && stack.getItem() != null && stack.stackSize > 0;
+ }
}