Package net.minecraft.state
Class EnumProperty<T extends java.lang.Enum<T> & IStringSerializable>
- java.lang.Object
-
- net.minecraft.state.Property<T>
-
- net.minecraft.state.EnumProperty<T>
-
- Direct Known Subclasses:
DirectionProperty
public class EnumProperty<T extends java.lang.Enum<T> & IStringSerializable> extends Property<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.state.Property
Property.ValuePair<T extends java.lang.Comparable<T>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnumProperty(java.lang.String p_i45649_1_, java.lang.Class<T> p_i45649_2_, java.util.Collection<T> p_i45649_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends java.lang.Enum<T> & IStringSerializable>
EnumProperty<T>create(java.lang.String p_177709_0_, java.lang.Class<T> p_177709_1_)
static <T extends java.lang.Enum<T> & IStringSerializable>
EnumProperty<T>create(java.lang.String p_177707_0_, java.lang.Class<T> p_177707_1_, java.util.Collection<T> p_177707_2_)
static <T extends java.lang.Enum<T> & IStringSerializable>
EnumProperty<T>create(java.lang.String p_177708_0_, java.lang.Class<T> p_177708_1_, java.util.function.Predicate<T> p_177708_2_)
static <T extends java.lang.Enum<T> & IStringSerializable>
EnumProperty<T>create(java.lang.String p_177706_0_, java.lang.Class<T> p_177706_1_, T... p_177706_2_)
boolean
equals(java.lang.Object p_equals_1_)
int
generateHashCode()
java.lang.String
getName(T p_177702_1_)
java.util.Collection<T>
getPossibleValues()
java.util.Optional<T>
getValue(java.lang.String p_185929_1_)
-
Methods inherited from class net.minecraft.state.Property
getAllValues, getName, getValueClass, hashCode, toString, value, value, valueCodec
-
-
-
-
Field Detail
-
values
private final com.google.common.collect.ImmutableSet<T extends java.lang.Enum<T> & IStringSerializable> values
-
names
private final java.util.Map<java.lang.String,T extends java.lang.Enum<T> & IStringSerializable> names
-
-
Method Detail
-
getPossibleValues
public java.util.Collection<T> getPossibleValues()
- Specified by:
getPossibleValues
in classProperty<T extends java.lang.Enum<T> & IStringSerializable>
-
getValue
public java.util.Optional<T> getValue(java.lang.String p_185929_1_)
- Specified by:
getValue
in classProperty<T extends java.lang.Enum<T> & IStringSerializable>
-
getName
public java.lang.String getName(T p_177702_1_)
- Specified by:
getName
in classProperty<T extends java.lang.Enum<T> & IStringSerializable>
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classProperty<T extends java.lang.Enum<T> & IStringSerializable>
-
generateHashCode
public int generateHashCode()
- Overrides:
generateHashCode
in classProperty<T extends java.lang.Enum<T> & IStringSerializable>
-
create
public static <T extends java.lang.Enum<T> & IStringSerializable> EnumProperty<T> create(java.lang.String p_177709_0_, java.lang.Class<T> p_177709_1_)
-
create
public static <T extends java.lang.Enum<T> & IStringSerializable> EnumProperty<T> create(java.lang.String p_177708_0_, java.lang.Class<T> p_177708_1_, java.util.function.Predicate<T> p_177708_2_)
-
create
public static <T extends java.lang.Enum<T> & IStringSerializable> EnumProperty<T> create(java.lang.String p_177706_0_, java.lang.Class<T> p_177706_1_, T... p_177706_2_)
-
create
public static <T extends java.lang.Enum<T> & IStringSerializable> EnumProperty<T> create(java.lang.String p_177707_0_, java.lang.Class<T> p_177707_1_, java.util.Collection<T> p_177707_2_)
-
-