Package net.minecraft.predicate
Class NumberRange.IntRange
- Enclosing class:
- NumberRange<T extends Number>
public static class NumberRange.IntRange extends NumberRange<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.predicate.NumberRange
NumberRange.CommandFactory<T extends Number,R extends NumberRange<T>>, NumberRange.Factory<T extends Number,R extends NumberRange<T>>, NumberRange.FloatRange, NumberRange.IntRange
-
Field Summary
Fields Modifier and Type Field Description static NumberRange.IntRange
ANY
private Long
maxSquared
private Long
minSquared
Fields inherited from class net.minecraft.predicate.NumberRange
EXCEPTION_EMPTY, EXCEPTION_SWAPPED, max, min
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static NumberRange.IntRange
atLeast(int value)
static NumberRange.IntRange
exactly(int value)
static NumberRange.IntRange
fromJson(JsonElement element)
static NumberRange.IntRange
fromStringReader(com.mojang.brigadier.StringReader reader, Function<Integer,Integer> converter)
static NumberRange.IntRange
parse(com.mojang.brigadier.StringReader reader)
private static NumberRange.IntRange
parse(com.mojang.brigadier.StringReader reader, Integer min, Integer max)
private static Long
squared(Integer value)
boolean
test(int value)
-
Field Details
-
ANY
-
minSquared
-
maxSquared
-
-
Constructor Details
-
IntRange
-
-
Method Details
-
parse
private static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader, @Nullable Integer min, @Nullable Integer max) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
squared
-
exactly
-
atLeast
-
test
public boolean test(int value) -
fromJson
-
parse
public static NumberRange.IntRange parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fromStringReader
public static NumberRange.IntRange fromStringReader(com.mojang.brigadier.StringReader reader, Function<Integer,Integer> converter)
-