Class LivingSpawnEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingSpawnEvent
- Direct Known Subclasses:
LivingSpawnEvent.AllowDespawn
,LivingSpawnEvent.CheckSpawn
,LivingSpawnEvent.SpecialSpawn
LivingSpawnEvent is fired for any events associated with Living Entities spawn status.
If a method utilizes this event as its parameter, the method will receive every child event of this class.
All children of this event are fired on the
If a method utilizes this 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.All children of this event are fired on the
MinecraftForge.EVENT_BUS
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired each tick for despawnable mobs to allow control over despawning.static class
Fires before mob spawn events.static class
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 theForgeEventFactory.doSpecialSpawn(Mob, LevelAccessor, float, float, float, BaseSpawner, MobSpawnType)
.
This event isCancelable
.
If this event is canceled, the Entity is not spawned.
This event does not have a result.Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final LevelAccessor
private final double
private final double
private final double
-
Constructor Summary
ConstructorDescriptionLivingSpawnEvent
(Mob entity, LevelAccessor world, double x, double y, double z) -
Method Summary
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
world
-
x
private final double x -
y
private final double y -
z
private final double z
-
-
Constructor Details
-
LivingSpawnEvent
-
-
Method Details
-
getWorld
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ()
-