Class DirectionProperty


public class DirectionProperty extends EnumProperty<Direction>
Represents a property that has direction values.

See Properties for example usages.

Mappings:
Namespace Name
official cvl
intermediary net/minecraft/class_2753
named net/minecraft/state/property/DirectionProperty
  • Constructor Details

    • DirectionProperty

      protected DirectionProperty(String name, Collection<Direction> values)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcvl;<init>(Ljava/lang/String;Ljava/util/Collection;)V
      intermediary <init> Lnet/minecraft/class_2753;<init>(Ljava/lang/String;Ljava/util/Collection;)V
      named <init> Lnet/minecraft/state/property/DirectionProperty;<init>(Ljava/lang/String;Ljava/util/Collection;)V
  • Method Details

    • of

      public static DirectionProperty of(String name)
      Creates a direction property with all directions as values.
      Parameters:
      name - the name of the property; see the note on the name
      Mappings:
      Namespace Name Mixin selector
      official a Lcvl;a(Ljava/lang/String;)Lcvl;
      intermediary method_35305 Lnet/minecraft/class_2753;method_35305(Ljava/lang/String;)Lnet/minecraft/class_2753;
      named of Lnet/minecraft/state/property/DirectionProperty;of(Ljava/lang/String;)Lnet/minecraft/state/property/DirectionProperty;
    • of

      public static DirectionProperty of(String name, Predicate<Direction> filter)
      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 name
      filter - the filter which specifies if a value is allowed; required to allow 2 or more values
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcvl;a(Ljava/lang/String;Ljava/util/function/Predicate;)Lcvl;
      intermediary method_11844 Lnet/minecraft/class_2753;method_11844(Ljava/lang/String;Ljava/util/function/Predicate;)Lnet/minecraft/class_2753;
      named of Lnet/minecraft/state/property/DirectionProperty;of(Ljava/lang/String;Ljava/util/function/Predicate;)Lnet/minecraft/state/property/DirectionProperty;
    • of

      public static DirectionProperty of(String name, Direction[] values)
      Creates a direction property with the given values.
      Parameters:
      name - the name of the property; see the note on the name
      values - the values the property contains; required to have 2 or more values
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcvl;a(Ljava/lang/String;[Lgy;)Lcvl;
      intermediary method_11845 Lnet/minecraft/class_2753;method_11845(Ljava/lang/String;[Lnet/minecraft/class_2350;)Lnet/minecraft/class_2753;
      named of Lnet/minecraft/state/property/DirectionProperty;of(Ljava/lang/String;[Lnet/minecraft/util/math/Direction;)Lnet/minecraft/state/property/DirectionProperty;
    • of

      public static DirectionProperty of(String name, Collection<Direction> values)
      Creates a direction property with the given values.
      Parameters:
      name - the name of the property; see the note on the name
      values - the values the property contains; required to have 2 or more values
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcvl;a(Ljava/lang/String;Ljava/util/Collection;)Lcvl;
      intermediary method_11843 Lnet/minecraft/class_2753;method_11843(Ljava/lang/String;Ljava/util/Collection;)Lnet/minecraft/class_2753;
      named of Lnet/minecraft/state/property/DirectionProperty;of(Ljava/lang/String;Ljava/util/Collection;)Lnet/minecraft/state/property/DirectionProperty;