Class Property<T extends Comparable<T>>

java.lang.Object
net.minecraft.state.property.Property<T>
Direct Known Subclasses:
BooleanProperty, EnumProperty, IntProperty

public abstract class Property<T extends Comparable<T>>
extends Object
  • Field Details

  • Constructor Details

    • Property

      protected Property​(String name, Class<T> type)
  • Method Details

    • createValue

      public Property.Value<T> createValue​(T value)
    • createValue

      public Property.Value<T> createValue​(State<?,​?> state)
    • stream

      public Stream<Property.Value<T>> stream()
    • getValueCodec

      public com.mojang.serialization.Codec<Property.Value<T>> getValueCodec()
    • getName

      public String getName()
    • getType

      public Class<T> getType()
    • getValues

      public abstract Collection<T> getValues()
      Returns all possible values the property can take.
    • name

      public abstract String name​(T value)
    • parse

      public abstract Optional<T> parse​(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • computeHashCode

      public int computeHashCode()