Enum Class TaxonomicRank

java.lang.Object
java.lang.Enum<TaxonomicRank>
forestry.api.core.genetics.TaxonomicRank
All Implemented Interfaces:
Serializable, Comparable<TaxonomicRank>, Constable, net.minecraft.util.StringRepresentable

public enum TaxonomicRank extends Enum<TaxonomicRank> implements net.minecraft.util.StringRepresentable
Represents taxonomic ranks, sometimes called levels of classification, for an ITaxon.
  • Enum Constant Details

  • Field Details

    • VALUES

      public static final List<TaxonomicRank> VALUES
    • CODEC

      public static final com.mojang.serialization.Codec<TaxonomicRank> CODEC
      Serializes a rank by its lowercase name (e.g. "domain"), used by datapack taxon definitions.
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,TaxonomicRank> STREAM_CODEC
      Network form of CODEC (by ordinal), used to sync datapack taxa to clients.
  • Method Details

    • values

      public static TaxonomicRank[] 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 TaxonomicRank 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
    • getColour

      public int getColour()
      Returns:
      Colour to use for displaying this classification.
    • isDroppable

      public boolean isDroppable()
      Returns:
      Whether display of this classification level can be omitted in case of space constraints.
    • next

      public TaxonomicRank next()
      Returns:
      The rank below this one. Never goes past GENUS.
    • getSerializedName

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