Enum Class RelaxedConstraint

java.lang.Object
java.lang.Enum<RelaxedConstraint>
com.hypixel.hytale.server.npc.movement.constraints.RelaxedConstraint
All Implemented Interfaces:
Serializable, Comparable<RelaxedConstraint>, Constable, Supplier<String>

public enum RelaxedConstraint extends Enum<RelaxedConstraint> implements Supplier<String>
Defines which movement constraints are relaxed when relaxation is enabled. Each value independently relaxes a specific constraint.
  • Enum Constant Details

    • WADE

      public static final RelaxedConstraint WADE
      Allows NPCs to move into liquid (water).
    • DAMAGE

      public static final RelaxedConstraint DAMAGE
      Allows NPCs to move into or touch blocks which cause damage (e.g. lava).
    • DROP

      public static final RelaxedConstraint DROP
      Allows NPCs to drop from higher than maxDropHeight even if it would cause damage.
    • BREATHE

      public static final RelaxedConstraint BREATHE
      Allows NPCs to move into blocks which would cause suffocation.
    • FENCE

      public static final RelaxedConstraint FENCE
      Allows NPCs to climb over fence blocks.
  • Field Details

    • DEFAULT_WHEN_RELAXED

      @Nonnull public static final Set<RelaxedConstraint> DEFAULT_WHEN_RELAXED
      Matches legacy "RelaxedMoveConstraints: true" behavior (movement constraints relaxed, but damage and breathing avoidance kept). Used only in the legacy boolean mode when RelaxedConstraints is not present.
  • Method Details

    • values

      public static RelaxedConstraint[] 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 RelaxedConstraint 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
    • get

      public String get()
      Specified by:
      get in interface Supplier<String>