Class EnumProperty<T extends Enum<T> & StringRepresentable>
java.lang.Object
net.minecraft.world.level.block.state.properties.Property<T>
net.minecraft.world.level.block.state.properties.EnumProperty<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.properties.Property
Property.Value<T extends Comparable<T>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Enum<T> & StringRepresentable>
EnumProperty<T> Create a new EnumProperty with all Enum constants of the given class.static <T extends Enum<T> & StringRepresentable>
EnumProperty<T> Create a new EnumProperty with all Enum constants of the given class that match the given Predicate.static <T extends Enum<T> & StringRepresentable>
EnumProperty<T> static <T extends Enum<T> & StringRepresentable>
EnumProperty<T> Create a new EnumProperty with the specified valuesboolean
int
int
getInternalIndex
(T pValue) Methods inherited from class net.minecraft.world.level.block.state.properties.Property
codec, getAllValues, getName, getValueClass, hashCode, parseValue, toString, value, value, valueCodec
-
Field Details
-
values
-
names
Map of names to Enum values -
ordinalToIndex
private final int[] ordinalToIndex
-
-
Constructor Details
-
EnumProperty
-
-
Method Details
-
getPossibleValues
- Specified by:
getPossibleValues
in classProperty<T extends Enum<T> & StringRepresentable>
-
getValue
-
getName
-
getInternalIndex
- Specified by:
getInternalIndex
in classProperty<T extends Enum<T> & StringRepresentable>
-
equals
-
generateHashCode
public int generateHashCode()- Overrides:
generateHashCode
in classProperty<T extends Enum<T> & StringRepresentable>
-
create
public static <T extends Enum<T> & StringRepresentable> EnumProperty<T> create(String pName, Class<T> pClazz) Create a new EnumProperty with all Enum constants of the given class. -
create
public static <T extends Enum<T> & StringRepresentable> EnumProperty<T> create(String pName, Class<T> pClazz, Predicate<T> pFilter) Create a new EnumProperty with all Enum constants of the given class that match the given Predicate. -
create
@SafeVarargs public static <T extends Enum<T> & StringRepresentable> EnumProperty<T> create(String pName, Class<T> pClazz, T... pValues) Create a new EnumProperty with the specified values -
create
public static <T extends Enum<T> & StringRepresentable> EnumProperty<T> create(String pName, Class<T> pClazz, List<T> pValues)
-