Class LivingSpawnEvent.CheckSpawn
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.CheckSpawn
- Enclosing class:
- LivingSpawnEvent
This event is fired before a
Mob
spawns.
This event is not cancellable, but does have a result. DEFAULT indicates that default spawn rules should be used. ALLOW indicates that the mob should spawn regardless of default spawn rules. DENY indicates that the mob should 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
ConstructorDescriptionCheckSpawn
(Mob mob, 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
-
CheckSpawn
public CheckSpawn(Mob mob, LevelAccessor level, double x, double y, double z, @Nullable @Nullable BaseSpawner spawner, MobSpawnType spawnReason)
-
-
Method Details
-
isSpawner
public boolean isSpawner() -
getSpawner
-
getSpawnReason
-