Package com.pixelmonmod.pixelmon.enums
Enum Class EnumTrainerAI
- All Implemented Interfaces:
Serializable
,Comparable<EnumTrainerAI>
,Constable
AI modes for Trainer movement and engaging in battle.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the movement AI mode causes the Trainer to engage players in battle on sight.static EnumTrainerAI
getFromOrdinal
(int ordinal) Gets a movement AI mode from its index.Gets the localized name of the AI mode.static EnumTrainerAI
getNextMode
(EnumTrainerAI mode) Gets the next movement AI mode in order from a current one.static boolean
hasTrainerAI
(String name) Checks if there is a movement AI mode with a certain name.static EnumTrainerAI
Returns the enum constant of this class with the specified name.static EnumTrainerAI[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
StandStill
-
StillAndEngage
-
StillMoveAndEngage
-
Wander
-
WanderAndEngage
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getFromOrdinal
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
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
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
Gets the localized name of the AI mode.- Returns:
- The localized name of the AI mode.
-