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
This event is fired whenever a
Mob
is set to be spawned, to allow for mod-specific initializers.
This event is cancellable and does not have a result. If the event is canceled, the mob will not spawn.
This event is fired on the main Forge event bus, only on the logical server.
-
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.LivingTickEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
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, LevelAccessor level, double x, double y, double z, @Nullable BaseSpawner spawner, MobSpawnType spawnReason) -
Method Summary
Methods inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent
getEntity, getLevel, getX, getY, getZ
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
spawner
-
spawnReason
-
-
Constructor Details
-
SpecialSpawn
public SpecialSpawn(Mob entity, LevelAccessor level, double x, double y, double z, @Nullable @Nullable BaseSpawner spawner, MobSpawnType spawnReason)
-
-
Method Details
-
getSpawner
-
getSpawnReason
-