Enum Class MobSpawnEvent.PositionCheck.Result

java.lang.Object
java.lang.Enum<MobSpawnEvent.PositionCheck.Result>
net.neoforged.neoforge.event.entity.living.MobSpawnEvent.PositionCheck.Result
All Implemented Interfaces:
Serializable, Comparable<MobSpawnEvent.PositionCheck.Result>, Constable
Enclosing class:
MobSpawnEvent.PositionCheck

public static enum MobSpawnEvent.PositionCheck.Result extends Enum<MobSpawnEvent.PositionCheck.Result>
  • Enum Constant Details

    • SUCCEED

      public static final MobSpawnEvent.PositionCheck.Result SUCCEED
      Forces the event to cause the position check to succeed.
    • DEFAULT

      public static final MobSpawnEvent.PositionCheck.Result DEFAULT
      The results of Mob.checkSpawnRules(LevelAccessor, EntitySpawnReason) and Mob.checkSpawnObstruction(LevelReader) will be used to determine if the check will succeed.

      If this is being called from a spawner, the Mob.checkSpawnRules(LevelAccessor, EntitySpawnReason) call will be skipped if any SpawnData.CustomSpawnRules are present.

    • FAIL

      public static final MobSpawnEvent.PositionCheck.Result FAIL
      Forces the event to cause the position check to fail.
  • Constructor Details

    • Result

      private Result()
  • Method Details

    • values

      public static MobSpawnEvent.PositionCheck.Result[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MobSpawnEvent.PositionCheck.Result valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null