Package net.minecraft.predicate
Class NumberRange<T extends Number>
java.lang.Object
net.minecraft.predicate.NumberRange<T>
- Direct Known Subclasses:
NumberRange.FloatRange
,NumberRange.IntRange
public abstract class NumberRange<T extends Number> extends Object
- Mappings:
Namespace Name official bz
intermediary net/minecraft/class_2096
named net/minecraft/predicate/NumberRange
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
NumberRange.CommandFactory<T extends Number,R extends NumberRange<T>>
static interface
NumberRange.Factory<T extends Number,R extends NumberRange<T>>
static class
NumberRange.FloatRange
static class
NumberRange.IntRange
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
EXCEPTION_EMPTY
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
EXCEPTION_SWAPPED
protected T
max
protected T
min
-
Constructor Summary
Constructors Modifier Constructor Description protected
NumberRange(T min, T max)
-
Method Summary
Modifier and Type Method Description protected static <T extends Number, R extends NumberRange<T>>
RfromJson(JsonElement json, R fallback, BiFunction<JsonElement,String,T> asNumber, NumberRange.Factory<T,R> factory)
private static <T extends Number>
TfromStringReader(com.mojang.brigadier.StringReader reader, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier)
T
getMax()
T
getMin()
boolean
isDummy()
private static boolean
isNextCharValid(com.mojang.brigadier.StringReader reader)
private static <T> T
map(T object, Function<T,T> function)
protected static <T extends Number, R extends NumberRange<T>>
Rparse(com.mojang.brigadier.StringReader commandReader, NumberRange.CommandFactory<T,R> commandFactory, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier, Function<T,T> mapper)
JsonElement
toJson()
-
Field Details
-
EXCEPTION_EMPTY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXCEPTION_EMPTY- Mappings:
Namespace Name Mixin selector official a
Lbz;a:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
intermediary field_9700
Lnet/minecraft/class_2096;field_9700:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
named EXCEPTION_EMPTY
Lnet/minecraft/predicate/NumberRange;EXCEPTION_EMPTY:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
-
EXCEPTION_SWAPPED
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXCEPTION_SWAPPED- Mappings:
Namespace Name Mixin selector official b
Lbz;b:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
intermediary field_9701
Lnet/minecraft/class_2096;field_9701:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
named EXCEPTION_SWAPPED
Lnet/minecraft/predicate/NumberRange;EXCEPTION_SWAPPED:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
-
min
- Mappings:
Namespace Name Mixin selector official c
Lbz;c:Ljava/lang/Number;
intermediary field_9702
Lnet/minecraft/class_2096;field_9702:Ljava/lang/Number;
named min
Lnet/minecraft/predicate/NumberRange;min:Ljava/lang/Number;
-
max
- Mappings:
Namespace Name Mixin selector official d
Lbz;d:Ljava/lang/Number;
intermediary field_9699
Lnet/minecraft/class_2096;field_9699:Ljava/lang/Number;
named max
Lnet/minecraft/predicate/NumberRange;max:Ljava/lang/Number;
-
-
Constructor Details
-
NumberRange
- Mappings:
Namespace Name Mixin selector official <init>
Lbz;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
intermediary <init>
Lnet/minecraft/class_2096;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
named <init>
Lnet/minecraft/predicate/NumberRange;<init>(Ljava/lang/Number;Ljava/lang/Number;)V
-
-
Method Details
-
getMin
- Mappings:
Namespace Name Mixin selector official a
Lbz;a()Ljava/lang/Number;
intermediary method_9038
Lnet/minecraft/class_2096;method_9038()Ljava/lang/Number;
named getMin
Lnet/minecraft/predicate/NumberRange;getMin()Ljava/lang/Number;
-
getMax
- Mappings:
Namespace Name Mixin selector official b
Lbz;b()Ljava/lang/Number;
intermediary method_9042
Lnet/minecraft/class_2096;method_9042()Ljava/lang/Number;
named getMax
Lnet/minecraft/predicate/NumberRange;getMax()Ljava/lang/Number;
-
isDummy
public boolean isDummy()- Mappings:
Namespace Name Mixin selector official c
Lbz;c()Z
intermediary method_9041
Lnet/minecraft/class_2096;method_9041()Z
named isDummy
Lnet/minecraft/predicate/NumberRange;isDummy()Z
-
toJson
- Mappings:
Namespace Name Mixin selector official d
Lbz;d()Lcom/google/gson/JsonElement;
intermediary method_9036
Lnet/minecraft/class_2096;method_9036()Lcom/google/gson/JsonElement;
named toJson
Lnet/minecraft/predicate/NumberRange;toJson()Lcom/google/gson/JsonElement;
-
fromJson
protected static <T extends Number, R extends NumberRange<T>> R fromJson(@Nullable JsonElement json, R fallback, BiFunction<JsonElement,String,T> asNumber, NumberRange.Factory<T,R> factory)- Mappings:
Namespace Name Mixin selector official a
Lbz;a(Lcom/google/gson/JsonElement;Lbz;Ljava/util/function/BiFunction;Lbz$a;)Lbz;
intermediary method_9039
Lnet/minecraft/class_2096;method_9039(Lcom/google/gson/JsonElement;Lnet/minecraft/class_2096;Ljava/util/function/BiFunction;Lnet/minecraft/class_2096$class_2097;)Lnet/minecraft/class_2096;
named fromJson
Lnet/minecraft/predicate/NumberRange;fromJson(Lcom/google/gson/JsonElement;Lnet/minecraft/predicate/NumberRange;Ljava/util/function/BiFunction;Lnet/minecraft/predicate/NumberRange$Factory;)Lnet/minecraft/predicate/NumberRange;
-
parse
protected static <T extends Number, R extends NumberRange<T>> R parse(com.mojang.brigadier.StringReader commandReader, NumberRange.CommandFactory<T,R> commandFactory, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier, Function<T,T> mapper) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lbz;a(Lcom/mojang/brigadier/StringReader;Lbz$b;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lbz;
intermediary method_9043
Lnet/minecraft/class_2096;method_9043(Lcom/mojang/brigadier/StringReader;Lnet/minecraft/class_2096$class_2098;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lnet/minecraft/class_2096;
named parse
Lnet/minecraft/predicate/NumberRange;parse(Lcom/mojang/brigadier/StringReader;Lnet/minecraft/predicate/NumberRange$CommandFactory;Ljava/util/function/Function;Ljava/util/function/Supplier;Ljava/util/function/Function;)Lnet/minecraft/predicate/NumberRange;
-
fromStringReader
@Nullable private static <T extends Number> T fromStringReader(com.mojang.brigadier.StringReader reader, Function<String,T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> exceptionTypeSupplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lbz;a(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
intermediary method_9037
Lnet/minecraft/class_2096;method_9037(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
named fromStringReader
Lnet/minecraft/predicate/NumberRange;fromStringReader(Lcom/mojang/brigadier/StringReader;Ljava/util/function/Function;Ljava/util/function/Supplier;)Ljava/lang/Number;
-
isNextCharValid
private static boolean isNextCharValid(com.mojang.brigadier.StringReader reader)- Mappings:
Namespace Name Mixin selector official a
Lbz;a(Lcom/mojang/brigadier/StringReader;)Z
intermediary method_9040
Lnet/minecraft/class_2096;method_9040(Lcom/mojang/brigadier/StringReader;)Z
named isNextCharValid
Lnet/minecraft/predicate/NumberRange;isNextCharValid(Lcom/mojang/brigadier/StringReader;)Z
-
map
- Mappings:
Namespace Name Mixin selector official a
Lbz;a(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
intermediary method_9035
Lnet/minecraft/class_2096;method_9035(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
named map
Lnet/minecraft/predicate/NumberRange;map(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
-