Enum Class Panda.Gene
- All Implemented Interfaces:
Serializable, Comparable<Panda.Gene>, Constable, StringRepresentable
- Enclosing class:
Panda
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IntFunction<Panda.Gene> static final com.mojang.serialization.Codec<Panda.Gene> private final intprivate final booleanprivate static final intprivate final StringFields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Panda.GenebyId(int id) intgetId()static Panda.GenegetRandom(RandomSource random) private static Panda.GenegetVariantFromGenes(Panda.Gene mainGene, Panda.Gene hiddenGene) booleanstatic Panda.GeneReturns the enum constant of this class with the specified name.static Panda.Gene[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
-
LAZY
-
WORRIED
-
PLAYFUL
-
BROWN
-
WEAK
-
AGGRESSIVE
-
-
Field Details
-
CODEC
-
BY_ID
-
MAX_GENE
private static final int MAX_GENE- See Also:
-
id
private final int id -
name
-
isRecessive
private final boolean isRecessive
-
-
Constructor Details
-
Gene
-
-
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
-
getId
public int getId() -
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-
isRecessive
public boolean isRecessive() -
getVariantFromGenes
-
byId
-
getRandom
-