Enum Class BattleAIMode

java.lang.Object
java.lang.Enum<BattleAIMode>
com.pixelmonmod.pixelmon.api.battles.BattleAIMode
All Implemented Interfaces:
Serializable, Comparable<BattleAIMode>, Constable

public enum BattleAIMode extends Enum<BattleAIMode>
Modes for AI in battle.
  • Enum Constant Details

  • Method Details

    • values

      public static BattleAIMode[] 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 BattleAIMode 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
    • getFromIndex

      public static BattleAIMode getFromIndex(int index)
      Gets an AI mode from its enum index.
      Parameters:
      index - The index of the AI mode to get.
      Returns:
      The AI mode with the specified index, or random mode if the index is out of bounds.
    • getNextMode

      public BattleAIMode getNextMode()
      Gets the next AI mode in order.
      Returns:
      The next AI mode in order.
    • createAI

      public BattleAIBase createAI(BattleParticipant participant)
      Creates a new AI corresponding to the mode.
      Parameters:
      participant - The participant to initialize an AI for.
      Returns:
      A new AI corresponding to the mode.
    • getLocalizedName

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