类 IntProperty


  • public class IntProperty
    extends Property<Integer>
    Mappings:
    Namespace Name
    official ckr
    intermediary net/minecraft/class_2758
    named net/minecraft/state/property/IntProperty
    • 字段详细资料

      • values

        private final ImmutableSet<Integer> values
        Mappings:
        Namespace Name Mixin selector
        official a Lckr;a:Lcom/google/common/collect/ImmutableSet;
        intermediary field_12614 Lnet/minecraft/class_2758;field_12614:Lcom/google/common/collect/ImmutableSet;
        named values Lnet/minecraft/state/property/IntProperty;values:Lcom/google/common/collect/ImmutableSet;
    • 构造器详细资料

      • IntProperty

        protected IntProperty​(String name,
                              int min,
                              int max)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lckr;<init>(Ljava/lang/String;II)V
        intermediary <init> Lnet/minecraft/class_2758;<init>(Ljava/lang/String;II)V
        named <init> Lnet/minecraft/state/property/IntProperty;<init>(Ljava/lang/String;II)V
    • 方法详细资料

      • getValues

        public Collection<Integer> getValues()
        Returns all possible values the property can take.
        指定者:
        getValues 在类中 Property<Integer>
        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;
      • equals

        public boolean equals​(Object o)
        覆盖:
        equals 在类中 Property<Integer>
        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<Integer>
        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 IntProperty of​(String name,
                                     int min,
                                     int max)
        Creates an integer property.

        min must be non-negative and max must be greater than min.

        Note that this method takes O(max - min) time as it computes all possible values during instantiation.

        参数:
        name - the name of the property
        min - the minimum value the property can take
        max - the maximum value the property can take
        Mappings:
        Namespace Name Mixin selector
        official a Lckr;a(Ljava/lang/String;II)Lckr;
        intermediary method_11867 Lnet/minecraft/class_2758;method_11867(Ljava/lang/String;II)Lnet/minecraft/class_2758;
        named of Lnet/minecraft/state/property/IntProperty;of(Ljava/lang/String;II)Lnet/minecraft/state/property/IntProperty;
      • parse

        public Optional<Integer> parse​(String name)
        指定者:
        parse 在类中 Property<Integer>
        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​(Integer integer)
        指定者:
        name 在类中 Property<Integer>
        Mappings:
        Namespace Name Mixin selector
        official a Lckr;a(Ljava/lang/Integer;)Ljava/lang/String;
        intermediary method_11868 Lnet/minecraft/class_2758;method_11868(Ljava/lang/Integer;)Ljava/lang/String;
        named name Lnet/minecraft/state/property/IntProperty;name(Ljava/lang/Integer;)Ljava/lang/String;