Class LivingSpawnEvent.CheckSpawn

Enclosing class:
LivingSpawnEvent

public static class LivingSpawnEvent.CheckSpawn extends LivingSpawnEvent
Fires before mob spawn events. Result is significant: DEFAULT: use vanilla spawn rules ALLOW: allow the spawn DENY: deny the spawn
  • Field Details

  • 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 entity
      world - the world to spawn in
      x - x coordinate
      y - y coordinate
      z - z coordinate
      spawner - position of the MobSpawner null if it this spawn is coming from a WorldSpawner
  • Method Details

    • isSpawner

      public boolean isSpawner()
    • getSpawner

      @Nullable public AbstractSpawner getSpawner()
    • getSpawnReason

      public SpawnReason getSpawnReason()