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 class
Property.Value<T extends Comparable<T>>
-
Field Summary
Fields Modifier and Type Field Description private com.mojang.serialization.Codec<T>
codec
private Integer
hashCodeCache
private String
name
private Class<T>
type
private com.mojang.serialization.Codec<Property.Value<T>>
valueCodec
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
computeHashCode()
Property.Value<T>
createValue(State<?,?> state)
Property.Value<T>
createValue(T value)
boolean
equals(Object object)
String
getName()
Class<T>
getType()
com.mojang.serialization.Codec<Property.Value<T>>
getValueCodec()
abstract Collection<T>
getValues()
Returns all possible values the property can take.int
hashCode()
abstract String
name(T value)
abstract Optional<T>
parse(String name)
Stream<Property.Value<T>>
stream()
String
toString()
-
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()
-