Enum Class CowType

java.lang.Object
java.lang.Enum<CowType>
dev.jaxydog.astral.utility.CowType
All Implemented Interfaces:
Serializable, Comparable<CowType>, Constable, net.minecraft.util.StringIdentifiable

public enum CowType extends Enum<CowType> implements net.minecraft.util.StringIdentifiable
Determines a cow's texture variant.
Since:
1.7.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>

    Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable

    net.minecraft.util.StringIdentifiable.Codec<E extends Enum<E> & net.minecraft.util.StringIdentifiable>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A normal, brown cow.
    A pink cow.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.util.StringIdentifiable.Codec<CowType>
    A codec that allows for easy string lookups.
    static final net.minecraft.entity.data.TrackedData<String>
    A data tracker entry to be used within CowEntityMixin.

    Fields inherited from interface net.minecraft.util.StringIdentifiable

    field_38377
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static CowType
    Returns the variant associated with the given name, or BROWN if the given name is invalid.
    static CowType
    Returns the enum constant of this class with the specified name.
    static CowType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BROWN

      public static final CowType BROWN
      A normal, brown cow.
      Since:
      1.7.0
    • PINK

      public static final CowType PINK
      A pink cow.
      Since:
      1.7.0
  • Field Details

    • CODEC

      public static final net.minecraft.util.StringIdentifiable.Codec<CowType> CODEC
      A codec that allows for easy string lookups.
      Since:
      1.7.0
    • COW_TYPE

      public static final net.minecraft.entity.data.TrackedData<String> COW_TYPE
      A data tracker entry to be used within CowEntityMixin.
      Since:
      1.7.0
  • Method Details

    • values

      public static CowType[] 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 CowType 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
    • fromName

      public static CowType fromName(String name)
      Returns the variant associated with the given name, or BROWN if the given name is invalid.
      Parameters:
      name - The name of the variant.
      Returns:
      The variant associated with the given name.
      Since:
      1.7.0
    • asString

      public String asString()
      Specified by:
      asString in interface net.minecraft.util.StringIdentifiable