Interface TraitType

All Known Implementing Classes:
AbstractTraitType

public interface TraitType
Trait type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Comparator<TraitType>
    Comparator for trait types.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.Holder<Trait>
    Default trait.
    void
    setValues(net.minecraft.core.HolderSet<Trait> values)
    Set the traits bound to this type.
    The string representation of this trait type.
    net.minecraft.core.HolderSet<Trait>
    All traits bound to this type.
  • Field Details

  • Method Details

    • example

      net.minecraft.core.Holder<Trait> example()
      Default trait.
      Returns:
      a trait bound to this type
    • values

      net.minecraft.core.HolderSet<Trait> values()
      All traits bound to this type.
      Returns:
      a collection of traits
    • setValues

      @Internal void setValues(net.minecraft.core.HolderSet<Trait> values)
      Set the traits bound to this type.
      Parameters:
      values - a collection of traits
    • toString

      String toString()
      The string representation of this trait type. It is recommended to use the registry name of this trait type.
      Overrides:
      toString in class Object
      Returns:
      name of this trait type.