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

public enum Gender extends Enum<Gender> implements ITranslatable
Represents all supported Gender types
  • Enum Constant Details

    • MALE

      public static final Gender MALE
    • FEMALE

      public static final Gender FEMALE
    • NONE

      public static final Gender NONE
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<Gender> CODEC
  • Method Details

    • values

      public static Gender[] 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 Gender 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
    • hasPalette

      public boolean hasPalette(Stats stats, String palette)
      Checks if the gender of a given form has the palette
      Parameters:
      stats - The form
      palette - The palette
      Returns:
      True if found
    • getTranslationKey

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

      public boolean isCompatible(Gender otherGender)
      Checks if the gender is compatible with another gender for relationship purposes.
      Parameters:
      otherGender - The gender to check against this gender.
      Returns:
      Whether the gender is compatible with another gender for relationship purposes.
    • getGender

      public static Gender getGender(short ord)
      Gets a gender from its enum ordinal.
      Parameters:
      ord - The ordinal of the enum.
      Returns:
      The gender corresponding to the ordinal, or male if the ordinal is out of bounds.
    • getGender

      public static Gender getGender(String name)
      Gets the gender associated with the given name, case insensitively, if it exists
      Parameters:
      name - - The case insensitive name of the gender
      Returns:
      - The associated Gender if one exists
    • getRandomGender

      public static Gender getRandomGender(Stats baseStats)
      Gets a random gender for a Pokémon.
      Parameters:
      baseStats - The base stats to get the gender ratio from.
      Returns:
      A random gender for a Pokémon.
    • getTranslatedName

      public net.minecraft.network.chat.MutableComponent getTranslatedName()
      Description copied from interface: ITranslatable
      Returns the translation component of the objects name.
      Specified by:
      getTranslatedName in interface ITranslatable
      Returns:
      The translation component.
    • getTranslatedNameCapitalized

      public net.minecraft.network.chat.MutableComponent getTranslatedNameCapitalized()