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
Fires before mob spawn events.
Result is significant:
DEFAULT: use vanilla spawn rules
ALLOW: allow the spawn
DENY: deny the spawn
-
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.EnteringChunk, 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
(MobEntity entity, IWorld world, double x, double y, double z, AbstractSpawner spawner, SpawnReason spawnReason) CheckSpawn is fired when an Entity is about to be spawned. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
-
CheckSpawn
public CheckSpawn(MobEntity entity, IWorld world, double x, double y, double z, @Nullable AbstractSpawner spawner, SpawnReason spawnReason) CheckSpawn is fired when an Entity is about to be spawned.- Parameters:
entity
- the spawning entityworld
- the world to spawn inx
- x coordinatey
- y coordinatez
- z coordinatespawner
- position of the MobSpawner null if it this spawn is coming from a WorldSpawner
-
-
Method Details
-
isSpawner
public boolean isSpawner() -
getSpawner
-
getSpawnReason
-