Package net.minecraft.state
Class Property<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- net.minecraft.state.Property<T>
-
- Direct Known Subclasses:
BooleanProperty
,EnumProperty
,IntegerProperty
public abstract class Property<T extends java.lang.Comparable<T>> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Property.ValuePair<T extends java.lang.Comparable<T>>
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<T>
clazz
private com.mojang.serialization.Codec<T>
codec
private java.lang.Integer
hashCode
private java.lang.String
name
private com.mojang.serialization.Codec<Property.ValuePair<T>>
valueCodec
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object p_equals_1_)
int
generateHashCode()
java.util.stream.Stream<Property.ValuePair<T>>
getAllValues()
java.lang.String
getName()
abstract java.lang.String
getName(T p_177702_1_)
abstract java.util.Collection<T>
getPossibleValues()
abstract java.util.Optional<T>
getValue(java.lang.String p_185929_1_)
java.lang.Class<T>
getValueClass()
int
hashCode()
java.lang.String
toString()
Property.ValuePair<T>
value(StateHolder<?,?> p_241489_1_)
Property.ValuePair<T>
value(T p_241490_1_)
com.mojang.serialization.Codec<Property.ValuePair<T>>
valueCodec()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
hashCode
private java.lang.Integer hashCode
-
valueCodec
private final com.mojang.serialization.Codec<Property.ValuePair<T extends java.lang.Comparable<T>>> valueCodec
-
-
Constructor Detail
-
Property
protected Property(java.lang.String p_i45652_1_, java.lang.Class<T> p_i45652_2_)
-
-
Method Detail
-
value
public Property.ValuePair<T> value(T p_241490_1_)
-
value
public Property.ValuePair<T> value(StateHolder<?,?> p_241489_1_)
-
getAllValues
public java.util.stream.Stream<Property.ValuePair<T>> getAllValues()
-
valueCodec
public com.mojang.serialization.Codec<Property.ValuePair<T>> valueCodec()
-
getName
public java.lang.String getName()
-
getValueClass
public java.lang.Class<T> getValueClass()
-
getPossibleValues
public abstract java.util.Collection<T> getPossibleValues()
-
getName
public abstract java.lang.String getName(T p_177702_1_)
-
getValue
public abstract java.util.Optional<T> getValue(java.lang.String p_185929_1_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
generateHashCode
public int generateHashCode()
-
-