Fix crash with EntityLivingEvent (for some reason)

This commit is contained in:
Ellpeck 2015-10-05 00:17:45 +02:00
parent 76d00af8a3
commit 1590026ed3

View file

@ -28,7 +28,7 @@ public class EntityLivingEvent{
@SubscribeEvent
public void livingUpdateEvent(LivingUpdateEvent event){
//Ocelots dropping Hair Balls
if(!event.entityLiving.worldObj.isRemote){
if(event.entityLiving != null && event.entityLiving.worldObj != null && !event.entityLiving.worldObj.isRemote){
if(event.entityLiving instanceof EntityOcelot){
EntityOcelot theOcelot = (EntityOcelot)event.entityLiving;
if(ConfigBoolValues.DO_CAT_DROPS.isEnabled() && theOcelot.isTamed()){