public class LivingSpawnEvent extends LivingEvent
Event
as its parameter, the method will
receive every child event of this class.world
contains the world in which this living Entity is being spawned.x
contains the x-coordinate this entity is being spawned at.y
contains the y-coordinate this entity is being spawned at.z
contains the z-coordinate this entity is being spawned at.MinecraftForge.EVENT_BUS
.Modifier and Type | Class and Description |
---|---|
static class |
LivingSpawnEvent.AllowDespawn
Fired each tick for despawnable mobs to allow control over despawning.
|
static class |
LivingSpawnEvent.CheckSpawn
Fires before mob spawn events.
|
static class |
LivingSpawnEvent.SpecialSpawn
SpecialSpawn is fired when an Entity is to be spawned.
This allows you to do special inializers in the new entity. This event is fired via the ForgeEventFactory.doSpecialSpawn(EntityLiving, World, float, float, float) .This event is Cancelable .If this event is canceled, the Entity is not spawned. This event does not have a result. |
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private World |
world |
private float |
x |
private float |
y |
private float |
z |
Constructor and Description |
---|
LivingSpawnEvent(EntityLiving entity,
World world,
float x,
float y,
float z) |
Modifier and Type | Method and Description |
---|---|
World |
getWorld() |
float |
getX() |
float |
getY() |
float |
getZ() |
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final World world
private final float x
private final float y
private final float z
public LivingSpawnEvent(EntityLiving entity, World world, float x, float y, float z)
public World getWorld()
public float getX()
public float getY()
public float getZ()