Package net.minecraft.state.property
Class EnumProperty<T extends Enum<T> & StringIdentifiable>
java.lang.Object
net.minecraft.state.property.Property<T>
net.minecraft.state.property.EnumProperty<T>
- Direct Known Subclasses:
DirectionProperty
public class EnumProperty<T extends Enum<T> & StringIdentifiable> extends Property<T>
- Mappings:
Namespace Name official cirintermediary net/minecraft/class_2754named net/minecraft/state/property/EnumProperty
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.state.property.Property
Property.Value<T extends Comparable<T>> -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnumProperty(String name, Class<T> type, Collection<T> values) -
Method Summary
Modifier and Type Method Description intcomputeHashCode()booleanequals(Object object)Collection<T>getValues()Returns all possible values the property can take.Stringname(T t)static <T extends Enum<T> & StringIdentifiable>
EnumProperty<T>of(String name, Class<T> type)Creates an enum property.static <T extends Enum<T> & StringIdentifiable>
EnumProperty<T>of(String name, Class<T> type, Collection<T> values)Creates an enum property.static <T extends Enum<T> & StringIdentifiable>
EnumProperty<T>of(String name, Class<T> type, Predicate<T> filter)Creates an enum property.static <T extends Enum<T> & StringIdentifiable>
EnumProperty<T>of(String name, Class<T> type, T[] values)Optional<T>parse(String name)Methods inherited from class net.minecraft.state.property.Property
createValue, createValue, getName, getType, getValueCodec, hashCode, stream, toString
-
Field Details
-
values
- Mappings:
Namespace Name Mixin selector official aLcir;a:Lcom/google/common/collect/ImmutableSet;intermediary field_12595Lnet/minecraft/class_2754;field_12595:Lcom/google/common/collect/ImmutableSet;named valuesLnet/minecraft/state/property/EnumProperty;values:Lcom/google/common/collect/ImmutableSet;
-
byName
- Mappings:
Namespace Name Mixin selector official bLcir;b:Ljava/util/Map;intermediary field_12596Lnet/minecraft/class_2754;field_12596:Ljava/util/Map;named byNameLnet/minecraft/state/property/EnumProperty;byName:Ljava/util/Map;
-
-
Constructor Details
-
EnumProperty
- Mappings:
Namespace Name Mixin selector official <init>Lcir;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Vintermediary <init>Lnet/minecraft/class_2754;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Vnamed <init>Lnet/minecraft/state/property/EnumProperty;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
-
-
Method Details
-
getValues
Returns all possible values the property can take.- Specified by:
getValuesin classProperty<T extends Enum<T> & StringIdentifiable>- Mappings:
Namespace Name Mixin selector official aLciw;a()Ljava/util/Collection;intermediary method_11898Lnet/minecraft/class_2769;method_11898()Ljava/util/Collection;named getValuesLnet/minecraft/state/property/Property;getValues()Ljava/util/Collection;
-
parse
- Specified by:
parsein classProperty<T extends Enum<T> & StringIdentifiable>- Mappings:
Namespace Name Mixin selector official bLciw;b(Ljava/lang/String;)Ljava/util/Optional;intermediary method_11900Lnet/minecraft/class_2769;method_11900(Ljava/lang/String;)Ljava/util/Optional;named parseLnet/minecraft/state/property/Property;parse(Ljava/lang/String;)Ljava/util/Optional;
-
name
- Specified by:
namein classProperty<T extends Enum<T> & StringIdentifiable>- Mappings:
Namespace Name Mixin selector official aLcir;a(Ljava/lang/Enum;)Ljava/lang/String;intermediary method_11846Lnet/minecraft/class_2754;method_11846(Ljava/lang/Enum;)Ljava/lang/String;named nameLnet/minecraft/state/property/EnumProperty;name(Ljava/lang/Enum;)Ljava/lang/String;
-
equals
- Overrides:
equalsin classProperty<T extends Enum<T> & StringIdentifiable>- Mappings:
Namespace Name Mixin selector official equalsLciw;equals(Ljava/lang/Object;)Zintermediary equalsLnet/minecraft/class_2769;equals(Ljava/lang/Object;)Znamed equalsLnet/minecraft/state/property/Property;equals(Ljava/lang/Object;)Z
-
computeHashCode
public int computeHashCode()- Overrides:
computeHashCodein classProperty<T extends Enum<T> & StringIdentifiable>- Mappings:
Namespace Name Mixin selector official bLciw;b()Iintermediary method_11799Lnet/minecraft/class_2769;method_11799()Inamed computeHashCodeLnet/minecraft/state/property/Property;computeHashCode()I
-
of
public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type)Creates an enum property.- Parameters:
name- the name of this propertytype- the type this property contains- Mappings:
Namespace Name Mixin selector official aLcir;a(Ljava/lang/String;Ljava/lang/Class;)Lcir;intermediary method_11850Lnet/minecraft/class_2754;method_11850(Ljava/lang/String;Ljava/lang/Class;)Lnet/minecraft/class_2754;named ofLnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;)Lnet/minecraft/state/property/EnumProperty;
-
of
public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type, Predicate<T> filter)Creates an enum property.- Parameters:
name- the name of this propertytype- the type this property containsfilter- a filter that specifies if a value is allowed- Mappings:
Namespace Name Mixin selector official aLcir;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lcir;intermediary method_11848Lnet/minecraft/class_2754;method_11848(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lnet/minecraft/class_2754;named ofLnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lnet/minecraft/state/property/EnumProperty;
-
of
public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type, T[] values)- Mappings:
Namespace Name Mixin selector official aLcir;a(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lcir;intermediary method_11849Lnet/minecraft/class_2754;method_11849(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lnet/minecraft/class_2754;named ofLnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lnet/minecraft/state/property/EnumProperty;
-
of
public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type, Collection<T> values)Creates an enum property.- Parameters:
name- the name of this propertytype- the type this property containsvalues- the values this property could contain- Mappings:
Namespace Name Mixin selector official aLcir;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lcir;intermediary method_11847Lnet/minecraft/class_2754;method_11847(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/class_2754;named ofLnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/state/property/EnumProperty;
-