Enum Class ExperienceGroup

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

public enum ExperienceGroup extends Enum<ExperienceGroup>
Represents the different types of requirements for how much EXP it takes a pokemon to go up one pokemonLevel
  • Enum Constant Details

  • Method Details

    • values

      public static ExperienceGroup[] 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 ExperienceGroup 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
    • getExpForLevel

      public int getExpForLevel(int level)
      Calculates the experience required from a pokemonLevel to the next.
      Parameters:
      level - The pokemonLevel to calculate experience for.
      Returns:
      The amount of experience required to pokemonLevel up from the specified pokemonLevel, or -1 if the pokemonLevel is out of bounds.
    • getExpToLevel

      public int getExpToLevel(int level)
      Gets EXP required to go from 0 ->
      Parameters:
      level - The pokemonLevel going to
      Returns:
      The required EXP
    • hasExperienceGroup

      public static boolean hasExperienceGroup(String group)
      Checks if the experience group with the given name exists
      Parameters:
      group - The name of the group
      Returns:
      True if it exists
    • getExperienceGroupFromString

      public static ExperienceGroup getExperienceGroupFromString(String group)
      Gets the experience group with the given name (case insensitively) Will return null if none match the name
      Parameters:
      group - The name of the group
      Returns:
      The found group