Enum Class Gender
- All Implemented Interfaces:
ITranslatable
,Serializable
,Comparable<Gender>
,Constable
Represents all supported Gender types
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Gender
getGender
(short ord) Gets a gender from its enum ordinal.static Gender
Gets the gender associated with the given name, case insensitively, if it existsstatic Gender
getRandomGender
(Stats baseStats) Gets a random gender for a Pokémon.net.minecraft.network.chat.MutableComponent
Returns the translation component of the objects name.net.minecraft.network.chat.MutableComponent
boolean
hasPalette
(Stats stats, String palette) Checks if the gender of a given form has the paletteboolean
isCompatible
(Gender otherGender) Checks if the gender is compatible with another gender for relationship purposes.static Gender
Returns the enum constant of this class with the specified name.static Gender[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName
-
Enum Constant Details
-
MALE
-
FEMALE
-
NONE
-
-
Field Details
-
CODEC
-
-
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
-
hasPalette
Checks if the gender of a given form has the palette- Parameters:
stats
- The formpalette
- The palette- Returns:
- True if found
-
getTranslationKey
- Specified by:
getTranslationKey
in interfaceITranslatable
-
isCompatible
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
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
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
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 interfaceITranslatable
- Returns:
- The translation component.
-
getTranslatedNameCapitalized
public net.minecraft.network.chat.MutableComponent getTranslatedNameCapitalized()
-