Class MinMaxBounds<T extends java.lang.Number>
- java.lang.Object
-
- net.minecraft.advancements.criterion.MinMaxBounds<T>
-
- Direct Known Subclasses:
MinMaxBounds.FloatBound
,MinMaxBounds.IntBound
public abstract class MinMaxBounds<T extends java.lang.Number> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_EMPTY
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_SWAPPED
protected T
max
protected T
min
-
Constructor Summary
Constructors Modifier Constructor Description protected
MinMaxBounds(T p_i49720_1_, T p_i49720_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static <T extends java.lang.Number,R extends MinMaxBounds<T>>
RfromJson(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>>
RfromReader(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
isAny()
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>
TreadNumber(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
serializeToJson()
-
-
-
Field Detail
-
ERROR_EMPTY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EMPTY
-
ERROR_SWAPPED
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SWAPPED
-
min
protected final T extends java.lang.Number min
-
max
protected final T extends java.lang.Number max
-
-
Method Detail
-
getMin
@Nullable public T getMin()
-
getMax
@Nullable public T getMax()
-
isAny
public boolean isAny()
-
serializeToJson
public com.google.gson.JsonElement serializeToJson()
-
fromJson
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_)
-
fromReader
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
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNumber
@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
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
isAllowedInputChat
private static boolean isAllowedInputChat(com.mojang.brigadier.StringReader p_196970_0_)
-
optionallyFormat
@Nullable private static <T> T optionallyFormat(@Nullable T p_196972_0_, java.util.function.Function<T,T> p_196972_1_)
-
-