public abstract class MinMaxBounds<T extends java.lang.Number>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MinMaxBounds.FloatBound |
static interface |
MinMaxBounds.IBoundFactory<T extends java.lang.Number,R extends MinMaxBounds<T>> |
static interface |
MinMaxBounds.IBoundReader<T extends java.lang.Number,R extends MinMaxBounds<T>> |
static class |
MinMaxBounds.IntBound |
Modifier and Type | Field and Description |
---|---|
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ERROR_EMPTY |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ERROR_SWAPPED |
protected T |
max |
protected T |
min |
Modifier | Constructor and Description |
---|---|
protected |
MinMaxBounds(T p_i49720_1_,
T p_i49720_2_) |
Modifier and Type | Method and Description |
---|---|
protected static <T extends java.lang.Number,R extends MinMaxBounds<T>> |
fromJson(com.google.gson.JsonElement p_211331_0_,
R p_211331_1_,
java.util.function.BiFunction<com.google.gson.JsonElement,java.lang.String,T> p_211331_2_,
MinMaxBounds.IBoundFactory<T,R> p_211331_3_) |
protected static <T extends java.lang.Number,R extends MinMaxBounds<T>> |
fromReader(com.mojang.brigadier.StringReader p_211337_0_,
MinMaxBounds.IBoundReader<T,R> p_211337_1_,
java.util.function.Function<java.lang.String,T> p_211337_2_,
java.util.function.Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_211337_3_,
java.util.function.Function<T,T> p_211337_4_) |
T |
getMax() |
T |
getMin() |
private static boolean |
isAllowedInputChat(com.mojang.brigadier.StringReader p_196970_0_) |
boolean |
isUnbounded() |
private static <T> T |
optionallyFormat(T p_196972_0_,
java.util.function.Function<T,T> p_196972_1_) |
private static <T extends java.lang.Number> |
readNumber(com.mojang.brigadier.StringReader p_196975_0_,
java.util.function.Function<java.lang.String,T> p_196975_1_,
java.util.function.Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_196975_2_) |
com.google.gson.JsonElement |
serialize() |
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EMPTY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SWAPPED
protected final T extends java.lang.Number min
protected final T extends java.lang.Number max
@Nullable public T getMin()
@Nullable public T getMax()
public boolean isUnbounded()
public com.google.gson.JsonElement serialize()
protected static <T extends java.lang.Number,R extends MinMaxBounds<T>> R fromJson(@Nullable com.google.gson.JsonElement p_211331_0_, R p_211331_1_, java.util.function.BiFunction<com.google.gson.JsonElement,java.lang.String,T> p_211331_2_, MinMaxBounds.IBoundFactory<T,R> p_211331_3_)
protected static <T extends java.lang.Number,R extends MinMaxBounds<T>> R fromReader(com.mojang.brigadier.StringReader p_211337_0_, MinMaxBounds.IBoundReader<T,R> p_211337_1_, java.util.function.Function<java.lang.String,T> p_211337_2_, java.util.function.Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_211337_3_, java.util.function.Function<T,T> p_211337_4_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
@Nullable private static <T extends java.lang.Number> T readNumber(com.mojang.brigadier.StringReader p_196975_0_, java.util.function.Function<java.lang.String,T> p_196975_1_, java.util.function.Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> p_196975_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static boolean isAllowedInputChat(com.mojang.brigadier.StringReader p_196970_0_)
@Nullable private static <T> T optionallyFormat(@Nullable T p_196972_0_, java.util.function.Function<T,T> p_196972_1_)