类 EnumProperty<T extends Enum<T> & StringIdentifiable>

  • 直接已知子类:
    DirectionProperty

    public class EnumProperty<T extends Enum<T> & StringIdentifiable>
    extends Property<T>
    Mappings:
    Namespace Name
    official ckp
    intermediary net/minecraft/class_2754
    named net/minecraft/state/property/EnumProperty
    • 字段详细资料

      • values

        private final ImmutableSet<T extends Enum<T> & StringIdentifiable> values
        Mappings:
        Namespace Name Mixin selector
        official a Lckp;a:Lcom/google/common/collect/ImmutableSet;
        intermediary field_12595 Lnet/minecraft/class_2754;field_12595:Lcom/google/common/collect/ImmutableSet;
        named values Lnet/minecraft/state/property/EnumProperty;values:Lcom/google/common/collect/ImmutableSet;
      • byName

        private final Map<String,​T extends Enum<T> & StringIdentifiable> byName
        Mappings:
        Namespace Name Mixin selector
        official b Lckp;b:Ljava/util/Map;
        intermediary field_12596 Lnet/minecraft/class_2754;field_12596:Ljava/util/Map;
        named byName Lnet/minecraft/state/property/EnumProperty;byName:Ljava/util/Map;
    • 构造器详细资料

      • EnumProperty

        protected EnumProperty​(String name,
                               Class<T> type,
                               Collection<T> values)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lckp;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
        intermediary <init> Lnet/minecraft/class_2754;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
        named <init> Lnet/minecraft/state/property/EnumProperty;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
    • 方法详细资料

      • getValues

        public Collection<T> getValues()
        Returns all possible values the property can take.
        指定者:
        getValues 在类中 Property<T extends Enum<T> & StringIdentifiable>
        Mappings:
        Namespace Name Mixin selector
        official a Lcku;a()Ljava/util/Collection;
        intermediary method_11898 Lnet/minecraft/class_2769;method_11898()Ljava/util/Collection;
        named getValues Lnet/minecraft/state/property/Property;getValues()Ljava/util/Collection;
      • parse

        public Optional<T> parse​(String name)
        指定者:
        parse 在类中 Property<T extends Enum<T> & StringIdentifiable>
        Mappings:
        Namespace Name Mixin selector
        official b Lcku;b(Ljava/lang/String;)Ljava/util/Optional;
        intermediary method_11900 Lnet/minecraft/class_2769;method_11900(Ljava/lang/String;)Ljava/util/Optional;
        named parse Lnet/minecraft/state/property/Property;parse(Ljava/lang/String;)Ljava/util/Optional;
      • name

        public String name​(T t)
        指定者:
        name 在类中 Property<T extends Enum<T> & StringIdentifiable>
        Mappings:
        Namespace Name Mixin selector
        official a Lckp;a(Ljava/lang/Enum;)Ljava/lang/String;
        intermediary method_11846 Lnet/minecraft/class_2754;method_11846(Ljava/lang/Enum;)Ljava/lang/String;
        named name Lnet/minecraft/state/property/EnumProperty;name(Ljava/lang/Enum;)Ljava/lang/String;
      • equals

        public boolean equals​(Object o)
        覆盖:
        equals 在类中 Property<T extends Enum<T> & StringIdentifiable>
        Mappings:
        Namespace Name Mixin selector
        official equals Lcku;equals(Ljava/lang/Object;)Z
        intermediary equals Lnet/minecraft/class_2769;equals(Ljava/lang/Object;)Z
        named equals Lnet/minecraft/state/property/Property;equals(Ljava/lang/Object;)Z
      • computeHashCode

        public int computeHashCode()
        覆盖:
        computeHashCode 在类中 Property<T extends Enum<T> & StringIdentifiable>
        Mappings:
        Namespace Name Mixin selector
        official b Lcku;b()I
        intermediary method_11799 Lnet/minecraft/class_2769;method_11799()I
        named computeHashCode Lnet/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.
        参数:
        name - the name of this property
        type - the type this property contains
        Mappings:
        Namespace Name Mixin selector
        official a Lckp;a(Ljava/lang/String;Ljava/lang/Class;)Lckp;
        intermediary method_11850 Lnet/minecraft/class_2754;method_11850(Ljava/lang/String;Ljava/lang/Class;)Lnet/minecraft/class_2754;
        named of Lnet/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.
        参数:
        name - the name of this property
        type - the type this property contains
        filter - a filter that specifies if a value is allowed
        Mappings:
        Namespace Name Mixin selector
        official a Lckp;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lckp;
        intermediary method_11848 Lnet/minecraft/class_2754;method_11848(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lnet/minecraft/class_2754;
        named of Lnet/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 a Lckp;a(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lckp;
        intermediary method_11849 Lnet/minecraft/class_2754;method_11849(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lnet/minecraft/class_2754;
        named of Lnet/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.
        参数:
        name - the name of this property
        type - the type this property contains
        values - the values this property could contain
        Mappings:
        Namespace Name Mixin selector
        official a Lckp;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lckp;
        intermediary method_11847 Lnet/minecraft/class_2754;method_11847(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/class_2754;
        named of Lnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/state/property/EnumProperty;