Package net.minecraft.state.property
Class DirectionProperty
public class DirectionProperty extends EnumProperty<Direction>
Represents a property that has direction values.
See Properties for example
usages.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.state.property.Property
Property.Value<T extends Comparable<T>> -
Constructor Summary
Constructors Modifier Constructor Description protectedDirectionProperty(String name, Collection<Direction> values) -
Method Summary
Modifier and Type Method Description static DirectionPropertyof(String name, Collection<Direction> values)Creates a direction property with the given values.static DirectionPropertyof(String name, Predicate<Direction> filter)Creates a direction property with the values allowed by the given filter out of all 6 directions.static DirectionPropertyof(String name, Direction[] values)Creates a direction property with the given values.Methods inherited from class net.minecraft.state.property.EnumProperty
computeHashCode, equals, getValues, name, of, of, of, of, parseMethods inherited from class net.minecraft.state.property.Property
createValue, createValue, getName, getType, getValueCodec, hashCode, stream, toString
-
Constructor Details
-
DirectionProperty
-
-
Method Details
-
of
Creates a direction property with the values allowed by the given filter out of all 6 directions.- Parameters:
name- the name of the property; see the note on the namefilter- the filter which specifies if a value is allowed; required to allow 2 or more values
-
of
Creates a direction property with the given values.- Parameters:
name- the name of the property; see the note on the namevalues- the values the property contains; required to have 2 or more values
-
of
Creates a direction property with the given values.- Parameters:
name- the name of the property; see the note on the namevalues- the values the property contains; required to have 2 or more values
-