Package net.minecraft.state.property
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProperty.Value<T extends Comparable<T>> -
Field Summary
Fields Modifier and Type Field Description private com.mojang.serialization.Codec<T>codecprivate IntegerhashCodeCacheprivate Stringnameprivate Class<T>typeprivate com.mojang.serialization.Codec<Property.Value<T>>valueCodec -
Constructor Summary
-
Method Summary
Modifier and Type Method Description intcomputeHashCode()Property.Value<T>createValue(State<?,?> state)Property.Value<T>createValue(T value)booleanequals(Object object)StringgetName()Class<T>getType()com.mojang.serialization.Codec<Property.Value<T>>getValueCodec()abstract Collection<T>getValues()Returns all possible values the property can take.inthashCode()abstract Stringname(T value)abstract Optional<T>parse(String name)Stream<Property.Value<T>>stream()StringtoString()
-
Field Details
-
type
-
name
-
hashCodeCache
-
codec
-
valueCodec
-
-
Constructor Details
-
Property
-
-
Method Details
-
createValue
-
createValue
-
stream
-
getValueCodec
-
getName
-
getType
-
getValues
Returns all possible values the property can take. -
name
-
parse
-
toString
-
equals
-
hashCode
public final int hashCode() -
computeHashCode
public int computeHashCode()
-