Enum Class EnumTrainerAI

java.lang.Object
java.lang.Enum<EnumTrainerAI>
com.pixelmonmod.pixelmon.enums.EnumTrainerAI
All Implemented Interfaces:
Serializable, Comparable<EnumTrainerAI>, Constable

public enum EnumTrainerAI extends Enum<EnumTrainerAI>
AI modes for Trainer movement and engaging in battle.
  • Enum Constant Details

  • Method Details

    • values

      public static EnumTrainerAI[] 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 EnumTrainerAI 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
    • getFromOrdinal

      public static EnumTrainerAI getFromOrdinal(int ordinal)
      Gets a movement AI mode from its index.
      Parameters:
      ordinal - The index of the movement AI mode.
      Returns:
      The movement AI mode corresponding to the specified index, or null if the index is out of bounds.
    • getNextMode

      public static EnumTrainerAI getNextMode(EnumTrainerAI mode)
      Gets the next movement AI mode in order from a current one.
      Parameters:
      mode - The current movement AI mode.
      Returns:
      The next movement AI mode in order from the current one.
    • hasTrainerAI

      public static boolean hasTrainerAI(String name)
      Checks if there is a movement AI mode with a certain name.
      Parameters:
      name - The name of the movement AI mode.
      Returns:
      Whether there is a movement AI mode with the specified name.
    • doesEngage

      public boolean doesEngage()
      Checks if the movement AI mode causes the Trainer to engage players in battle on sight.
      Returns:
      Whether the movement AI mode causes the Trainer to engage players in battle on sight.
    • getLocalizedName

      public String getLocalizedName()
      Gets the localized name of the AI mode.
      Returns:
      The localized name of the AI mode.