1
0
forked from xjboss/KCauldronX

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 + @Override
+ public boolean entityAllowedToSpawn() { + public boolean entityAllowedToSpawn() {
+ ItemStack stack = getDataWatcher().getWatchableObjectItemStack(10); + ItemStack stack = getDataWatcher().getWatchableObjectItemStack(10);
+ return stack != null && stack.stackSize > 0; + return stack != null && stack.getItem() != null && stack.stackSize > 0;
+ } + }
} }