Search in sources :

Example 1 with AllowDespawn

use of net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn in project MinecraftForge by MinecraftForge.

the class ForgeEventFactory method canEntityDespawn.

public static Result canEntityDespawn(EntityLiving entity) {
    AllowDespawn event = new AllowDespawn(entity);
    MinecraftForge.EVENT_BUS.post(event);
    return event.getResult();
}
Also used : AllowDespawn(net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn)

Example 2 with AllowDespawn

use of net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn in project MinecraftForge by MinecraftForge.

the class ForgeEventFactory method canEntityDespawn.

public static Result canEntityDespawn(Mob entity) {
    AllowDespawn event = new AllowDespawn(entity);
    MinecraftForge.EVENT_BUS.post(event);
    return event.getResult();
}
Also used : AllowDespawn(net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn)

Aggregations

AllowDespawn (net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn)2