Class IntProperty

java.lang.Object
net.minecraft.state.property.Property<Integer>
net.minecraft.state.property.IntProperty

public final class IntProperty extends Property<Integer>
Represents a property that has integer values.

See Properties for example usages.

Mappings:
Namespace Name
named net/minecraft/state/property/IntProperty
intermediary net/minecraft/class_2758
official dxx
  • Field Details Link icon

    • values Link icon

      private final IntImmutableList values
      Mappings:
      Namespace Name Mixin selector
      named values Lnet/minecraft/state/property/IntProperty;values:Lit/unimi/dsi/fastutil/ints/IntImmutableList;
      intermediary field_12614 Lnet/minecraft/class_2758;field_12614:Lit/unimi/dsi/fastutil/ints/IntImmutableList;
      official a Ldxx;a:Lit/unimi/dsi/fastutil/ints/IntImmutableList;
    • min Link icon

      private final int min
      Mappings:
      Namespace Name Mixin selector
      named min Lnet/minecraft/state/property/IntProperty;min:I
      intermediary field_37655 Lnet/minecraft/class_2758;field_37655:I
      official b Ldxx;b:I
    • max Link icon

      private final int max
      Mappings:
      Namespace Name Mixin selector
      named max Lnet/minecraft/state/property/IntProperty;max:I
      intermediary field_37656 Lnet/minecraft/class_2758;field_37656:I
      official c Ldxx;c:I
  • Constructor Details Link icon

    • IntProperty Link icon

      private IntProperty(String name, int min, int max)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/state/property/IntProperty;<init>(Ljava/lang/String;II)V
      intermediary <init> Lnet/minecraft/class_2758;<init>(Ljava/lang/String;II)V
      official <init> Ldxx;<init>(Ljava/lang/String;II)V
  • Method Details Link icon

    • getValues Link icon

      public List<Integer> getValues()
      Returns all possible values of this property.
      Specified by:
      getValues in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named getValues Lnet/minecraft/state/property/Property;getValues()Ljava/util/List;
      intermediary method_11898 Lnet/minecraft/class_2769;method_11898()Ljava/util/List;
      official a Ldya;a()Ljava/util/List;
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/state/property/Property;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2769;equals(Ljava/lang/Object;)Z
      official equals Ldya;equals(Ljava/lang/Object;)Z
    • computeHashCode Link icon

      public int computeHashCode()
      Overrides:
      computeHashCode in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named computeHashCode Lnet/minecraft/state/property/Property;computeHashCode()I
      intermediary method_11799 Lnet/minecraft/class_2769;method_11799()I
      official b Ldya;b()I
    • of Link icon

      public static IntProperty of(String name, int min, int max)
      Creates an integer property.

      Note that this method computes all possible values.

      Parameters:
      name - the name of the property; see the note on the name
      min - the minimum value the property contains
      max - the maximum value the property contains
      Throws:
      IllegalArgumentException - if 0 <= min < max is not satisfied
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/state/property/IntProperty;of(Ljava/lang/String;II)Lnet/minecraft/state/property/IntProperty;
      intermediary method_11867 Lnet/minecraft/class_2758;method_11867(Ljava/lang/String;II)Lnet/minecraft/class_2758;
      official a Ldxx;a(Ljava/lang/String;II)Ldxx;
    • parse Link icon

      public Optional<Integer> parse(String name)
      Specified by:
      parse in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/state/property/Property;parse(Ljava/lang/String;)Ljava/util/Optional;
      intermediary method_11900 Lnet/minecraft/class_2769;method_11900(Ljava/lang/String;)Ljava/util/Optional;
      official b Ldya;b(Ljava/lang/String;)Ljava/util/Optional;
    • name Link icon

      public String name(Integer integer)
      Description copied from class: Property
      Returns the name of the given value of this property.
      Specified by:
      name in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/state/property/IntProperty;name(Ljava/lang/Integer;)Ljava/lang/String;
      intermediary method_11868 Lnet/minecraft/class_2758;method_11868(Ljava/lang/Integer;)Ljava/lang/String;
      official a Ldxx;a(Ljava/lang/Integer;)Ljava/lang/String;
    • ordinal Link icon

      public int ordinal(Integer integer)
      Specified by:
      ordinal in class Property<Integer>
      Mappings:
      Namespace Name Mixin selector
      named ordinal Lnet/minecraft/state/property/IntProperty;ordinal(Ljava/lang/Integer;)I
      intermediary method_64222 Lnet/minecraft/class_2758;method_64222(Ljava/lang/Integer;)I
      official b Ldxx;b(Ljava/lang/Integer;)I