Package net.minecraft.predicate
Record Class NumberRange.IntRange
java.lang.Object
java.lang.Record
net.minecraft.predicate.NumberRange.IntRange
- Record Components:
min
-max
-minSquared
-maxSquared
-
- All Implemented Interfaces:
NumberRange<Integer>
- Enclosing interface:
NumberRange<T extends Number>
public static record NumberRange.IntRange(Optional<Integer> min, Optional<Integer> max, Optional<Long> minSquared, Optional<Long> maxSquared)
extends Record
implements NumberRange<Integer>
- Mappings:
Namespace Name official cl$d
intermediary net/minecraft/class_2096$class_2100
named net/minecraft/predicate/NumberRange$IntRange
official e
intermediary comp_1805
named min
official f
intermediary comp_1806
named max
official g
intermediary comp_1809
named minSquared
official h
intermediary comp_1810
named maxSquared
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.predicate.NumberRange
NumberRange.CommandFactory<T extends Number,
R extends NumberRange<T>>, NumberRange.DoubleRange, NumberRange.Factory<T extends Number, R extends NumberRange<T>>, NumberRange.IntRange -
Field Summary
Modifier and TypeFieldDescriptionstatic final NumberRange.IntRange
static final com.mojang.serialization.Codec<NumberRange.IntRange>
The field for themax
record component.The field for themaxSquared
record component.The field for themin
record component.The field for theminSquared
record component.Fields inherited from interface net.minecraft.predicate.NumberRange
EXCEPTION_EMPTY, EXCEPTION_SWAPPED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic NumberRange.IntRange
atLeast
(int value) static NumberRange.IntRange
atMost
(int value) static NumberRange.IntRange
between
(int min, int max) final boolean
Indicates whether some other object is "equal to" this one.static NumberRange.IntRange
exactly
(int value) static NumberRange.IntRange
fromJson
(@Nullable com.google.gson.JsonElement element) static NumberRange.IntRange
fromStringReader
(com.mojang.brigadier.StringReader reader, Function<Integer, Integer> converter) final int
hashCode()
Returns a hash code value for this object.max()
Returns the value of themaxSquared
record component.min()
Returns the value of theminSquared
record component.static NumberRange.IntRange
parse
(com.mojang.brigadier.StringReader reader) private static NumberRange.IntRange
parse
(com.mojang.brigadier.StringReader reader, Optional<Integer> optional, Optional<Integer> optional2) boolean
test
(int value) boolean
testSqrt
(long value) com.google.gson.JsonElement
toJson()
final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.predicate.NumberRange
getConstantValue, isDummy
-
Field Details
-
min
The field for themin
record component. -
max
The field for themax
record component. -
minSquared
The field for theminSquared
record component. -
maxSquared
The field for themaxSquared
record component. -
ANY
- Mappings:
Namespace Name Mixin selector official c
Lcl$d;c:Lcl$d;
intermediary field_9708
Lnet/minecraft/class_2096$class_2100;field_9708:Lnet/minecraft/class_2096$class_2100;
named ANY
Lnet/minecraft/predicate/NumberRange$IntRange;ANY:Lnet/minecraft/predicate/NumberRange$IntRange;
-
CODEC
- Mappings:
Namespace Name Mixin selector official d
Lcl$d;d:Lcom/mojang/serialization/Codec;
intermediary field_45763
Lnet/minecraft/class_2096$class_2100;field_45763:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/predicate/NumberRange$IntRange;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
IntRange
-
IntRange
-
-
Method Details
-
parse
private static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader, Optional<Integer> optional, Optional<Integer> optional2) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(Lcom/mojang/brigadier/StringReader;Ljava/util/Optional;Ljava/util/Optional;)Lcl$d;
intermediary method_9055
Lnet/minecraft/class_2096$class_2100;method_9055(Lcom/mojang/brigadier/StringReader;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_2096$class_2100;
named parse
Lnet/minecraft/predicate/NumberRange$IntRange;parse(Lcom/mojang/brigadier/StringReader;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/predicate/NumberRange$IntRange;
-
squared
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(Ljava/util/Optional;)Ljava/util/Optional;
intermediary method_9059
Lnet/minecraft/class_2096$class_2100;method_9059(Ljava/util/Optional;)Ljava/util/Optional;
named squared
Lnet/minecraft/predicate/NumberRange$IntRange;squared(Ljava/util/Optional;)Ljava/util/Optional;
-
exactly
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(I)Lcl$d;
intermediary method_9058
Lnet/minecraft/class_2096$class_2100;method_9058(I)Lnet/minecraft/class_2096$class_2100;
named exactly
Lnet/minecraft/predicate/NumberRange$IntRange;exactly(I)Lnet/minecraft/predicate/NumberRange$IntRange;
-
between
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(II)Lcl$d;
intermediary method_35287
Lnet/minecraft/class_2096$class_2100;method_35287(II)Lnet/minecraft/class_2096$class_2100;
named between
Lnet/minecraft/predicate/NumberRange$IntRange;between(II)Lnet/minecraft/predicate/NumberRange$IntRange;
-
atLeast
- Mappings:
Namespace Name Mixin selector official b
Lcl$d;b(I)Lcl$d;
intermediary method_9053
Lnet/minecraft/class_2096$class_2100;method_9053(I)Lnet/minecraft/class_2096$class_2100;
named atLeast
Lnet/minecraft/predicate/NumberRange$IntRange;atLeast(I)Lnet/minecraft/predicate/NumberRange$IntRange;
-
atMost
- Mappings:
Namespace Name Mixin selector official c
Lcl$d;c(I)Lcl$d;
intermediary method_35289
Lnet/minecraft/class_2096$class_2100;method_35289(I)Lnet/minecraft/class_2096$class_2100;
named atMost
Lnet/minecraft/predicate/NumberRange$IntRange;atMost(I)Lnet/minecraft/predicate/NumberRange$IntRange;
-
test
public boolean test(int value) - Mappings:
Namespace Name Mixin selector official d
Lcl$d;d(I)Z
intermediary method_9054
Lnet/minecraft/class_2096$class_2100;method_9054(I)Z
named test
Lnet/minecraft/predicate/NumberRange$IntRange;test(I)Z
-
testSqrt
public boolean testSqrt(long value) - Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(J)Z
intermediary method_35288
Lnet/minecraft/class_2096$class_2100;method_35288(J)Z
named testSqrt
Lnet/minecraft/predicate/NumberRange$IntRange;testSqrt(J)Z
-
fromJson
public static NumberRange.IntRange fromJson(@Nullable @Nullable com.google.gson.JsonElement element) - Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(Lcom/google/gson/JsonElement;)Lcl$d;
intermediary method_9056
Lnet/minecraft/class_2096$class_2100;method_9056(Lcom/google/gson/JsonElement;)Lnet/minecraft/class_2096$class_2100;
named fromJson
Lnet/minecraft/predicate/NumberRange$IntRange;fromJson(Lcom/google/gson/JsonElement;)Lnet/minecraft/predicate/NumberRange$IntRange;
-
toJson
public com.google.gson.JsonElement toJson()- Mappings:
Namespace Name Mixin selector official e
Lcl$d;e()Lcom/google/gson/JsonElement;
intermediary method_53199
Lnet/minecraft/class_2096$class_2100;method_53199()Lcom/google/gson/JsonElement;
named toJson
Lnet/minecraft/predicate/NumberRange$IntRange;toJson()Lcom/google/gson/JsonElement;
-
parse
public static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(Lcom/mojang/brigadier/StringReader;)Lcl$d;
intermediary method_9060
Lnet/minecraft/class_2096$class_2100;method_9060(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_2096$class_2100;
named parse
Lnet/minecraft/predicate/NumberRange$IntRange;parse(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/predicate/NumberRange$IntRange;
-
fromStringReader
public static NumberRange.IntRange fromStringReader(com.mojang.brigadier.StringReader reader, Function<Integer, Integer> converter) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lcl$d;a(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;)Lcl$d;
intermediary method_9057
Lnet/minecraft/class_2096$class_2100;method_9057(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;)Lnet/minecraft/class_2096$class_2100;
named fromStringReader
Lnet/minecraft/predicate/NumberRange$IntRange;fromStringReader(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;)Lnet/minecraft/predicate/NumberRange$IntRange;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
min
- Specified by:
min
in interfaceNumberRange<Integer>
- Mappings:
Namespace Name Mixin selector official a
Lcl;a()Ljava/util/Optional;
intermediary comp_1805
Lnet/minecraft/class_2096;comp_1805()Ljava/util/Optional;
named min
Lnet/minecraft/predicate/NumberRange;min()Ljava/util/Optional;
-
max
- Specified by:
max
in interfaceNumberRange<Integer>
- Mappings:
Namespace Name Mixin selector official b
Lcl;b()Ljava/util/Optional;
intermediary comp_1806
Lnet/minecraft/class_2096;comp_1806()Ljava/util/Optional;
named max
Lnet/minecraft/predicate/NumberRange;max()Ljava/util/Optional;
-
minSquared
Returns the value of theminSquared
record component.- Returns:
- the value of the
minSquared
record component
-
maxSquared
Returns the value of themaxSquared
record component.- Returns:
- the value of the
maxSquared
record component
-