Enum Class Nature

java.lang.Object
java.lang.Enum<Nature>
com.pixelmonmod.pixelmon.api.pokemon.Nature
All Implemented Interfaces:
ITranslatable, Serializable, Comparable<Nature>, Constable, net.minecraft.util.StringRepresentable

public enum Nature extends Enum<Nature> implements ITranslatable, net.minecraft.util.StringRepresentable
Pokémon Natures that affect certain stats.
  • Enum Constant Details

    • HARDY

      public static final Nature HARDY
    • SERIOUS

      public static final Nature SERIOUS
    • DOCILE

      public static final Nature DOCILE
    • BASHFUL

      public static final Nature BASHFUL
    • QUIRKY

      public static final Nature QUIRKY
    • LONELY

      public static final Nature LONELY
    • BRAVE

      public static final Nature BRAVE
    • ADAMANT

      public static final Nature ADAMANT
    • NAUGHTY

      public static final Nature NAUGHTY
    • BOLD

      public static final Nature BOLD
    • RELAXED

      public static final Nature RELAXED
    • IMPISH

      public static final Nature IMPISH
    • LAX

      public static final Nature LAX
    • TIMID

      public static final Nature TIMID
    • HASTY

      public static final Nature HASTY
    • JOLLY

      public static final Nature JOLLY
    • NAIVE

      public static final Nature NAIVE
    • MODEST

      public static final Nature MODEST
    • MILD

      public static final Nature MILD
    • QUIET

      public static final Nature QUIET
    • RASH

      public static final Nature RASH
    • CALM

      public static final Nature CALM
    • GENTLE

      public static final Nature GENTLE
    • SASSY

      public static final Nature SASSY
    • CAREFUL

      public static final Nature CAREFUL
  • Method Details

    • values

      public static Nature[] 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 Nature 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
    • getIncreasedStat

      public BattleStatsType getIncreasedStat()
      Gets the BattleStatsType increased by this nature
      Returns:
      The increased stats type
    • getDecreasedStat

      public BattleStatsType getDecreasedStat()
    • getNatureFromIndex

      public static Nature getNatureFromIndex(int index)
      Gets a Nature from its index. Will return null if the index is out of bounds
      Parameters:
      index - The index of the Nature.
      Returns:
      The Nature corresponding to the index, or null if the index is out of bounds.
    • getRandomNature

      public static Nature getRandomNature()
      Randomly chooses a Nature.
      Returns:
      A random Nature.
    • getRandomIncreasedNature

      public static Nature getRandomIncreasedNature(BattleStatsType increasedBy)
      Randomly chooses a nature based on it's boosted stat
      Parameters:
      increasedBy - The boosted stat
      Returns:
      A random nature with the specified boost.
    • getRandomDecreasedNature

      public static Nature getRandomDecreasedNature(BattleStatsType decreasedBy)
      Randomly chooses a nature based on it's decreased stat
      Parameters:
      decreasedBy - The decreased stat
      Returns:
      A random nature with the specified decrease.
    • hasNature

      public static boolean hasNature(String name)
      Checks if a Nature with a certain name exists.
      Parameters:
      name - The name of the Nature.
      Returns:
      Whether a Nature with the specified name exists.
    • natureFromString

      public static Nature natureFromString(String name)
      Gets a Nature from its name.
      Parameters:
      name - The name of the Nature.
      Returns:
      The Nature corresponding to the name, or null if there isn't one.
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface ITranslatable
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable