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
    • Constructor Detail

      • 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 Detail

      • isSpawner

        public boolean isSpawner()