Package net.minecraft.state.property
Class IntProperty
public class IntProperty extends Property<Integer>
- Mappings:
Namespace Name official cit
intermediary net/minecraft/class_2758
named net/minecraft/state/property/IntProperty
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.state.property.Property
Property.Value<T extends Comparable<T>>
-
Field Summary
Fields Modifier and Type Field Description private ImmutableSet<Integer>
values
-
Constructor Summary
Constructors Modifier Constructor Description protected
IntProperty(String name, int min, int max)
-
Method Summary
Modifier and Type Method Description int
computeHashCode()
boolean
equals(Object object)
Collection<Integer>
getValues()
Returns all possible values the property can take.String
name(Integer integer)
static IntProperty
of(String name, int min, int max)
Creates an integer property.Optional<Integer>
parse(String name)
Methods inherited from class net.minecraft.state.property.Property
createValue, createValue, getName, getType, getValueCodec, hashCode, stream, toString
-
Field Details
-
values
- Mappings:
Namespace Name Mixin selector official a
Lcit;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;
-
-
Constructor Details
-
IntProperty
- Mappings:
Namespace Name Mixin selector official <init>
Lcit;<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
-
-
Method Details
-
getValues
Returns all possible values the property can take.- Specified by:
getValues
in classProperty<Integer>
- Mappings:
Namespace Name Mixin selector official a
Lciw;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
-
computeHashCode
public int computeHashCode()- Overrides:
computeHashCode
in classProperty<Integer>
- Mappings:
Namespace Name Mixin selector official b
Lciw;b()I
intermediary method_11799
Lnet/minecraft/class_2769;method_11799()I
named computeHashCode
Lnet/minecraft/state/property/Property;computeHashCode()I
-
of
Creates an integer property.min
must be non-negative andmax
must be greater thanmin
.Note that this method takes O(
max
-min
) time as it computes all possible values during instantiation.- Parameters:
name
- the name of the propertymin
- the minimum value the property can takemax
- the maximum value the property can take- Mappings:
Namespace Name Mixin selector official a
Lcit;a(Ljava/lang/String;II)Lcit;
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
- Specified by:
parse
in classProperty<Integer>
- Mappings:
Namespace Name Mixin selector official b
Lciw;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
- Specified by:
name
in classProperty<Integer>
- Mappings:
Namespace Name Mixin selector official a
Lcit;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;
-