Class LivingSpawnEvent.SpecialSpawn
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
net.minecraftforge.event.entity.living.LivingSpawnEvent.SpecialSpawn
- Enclosing class:
- LivingSpawnEvent
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
This event is
If this event is canceled, the Entity is not spawned.
This event does not have a result.
This event is fired on the
This allows you to do special inializers in the new entity.
This event is fired via the
ForgeEventFactory.doSpecialSpawn(Mob, Level, float, float, float, BaseSpawner, MobSpawnType)
.This event is
Cancelable
.If this event is canceled, the Entity is not spawned.
This event does not have a result.
Event.HasResult
This event is fired on the
MinecraftForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn
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
-
Constructor Summary
ConstructorDescriptionSpecialSpawn(Mob entity, Level world, double x, double y, double z, BaseSpawner spawner, MobSpawnType spawnReason)
-
Method Summary
Methods inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent
getWorld, getX, getY, getZ
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
-
spawner
-
spawnReason
-
-
Constructor Details
-
SpecialSpawn
public SpecialSpawn(Mob entity, Level world, double x, double y, double z, @Nullable BaseSpawner spawner, MobSpawnType spawnReason)- Parameters:
spawner
- the position of a tileentity or approximate position of an entity that initiated the spawn if any
-
-
Method Details
-
getSpawner
-
getSpawnReason
-