Fix potential NPE in Custom item entity span code caused by item id misconfigurations.
This commit is contained in:
parent
61c21218e2
commit
de24eea885
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ public class ForgeInternalHandler
|
|||
if (entity instanceof EntityItem)
|
||||
{
|
||||
ItemStack item = ((EntityItem)entity).item;
|
||||
if (item.getItem().hasCustomEntity(item))
|
||||
if (item != null && item.getItem().hasCustomEntity(item))
|
||||
{
|
||||
Entity newEntity = item.getItem().createEntity(event.world, entity, item);
|
||||
if (newEntity != null)
|
||||
|
|
Loading…
Reference in a new issue