Interface MinMaxBounds<T extends Number>
- All Known Implementing Classes:
MinMaxBounds.Doubles,MinMaxBounds.Ints
public interface MinMaxBounds<T extends Number>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMinMaxBounds.BoundsFactory<T extends Number,R extends MinMaxBounds<T>> static interfaceMinMaxBounds.BoundsFromReaderFactory<T extends Number,R extends MinMaxBounds<T>> static final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number,R extends MinMaxBounds<T>>
com.mojang.serialization.Codec<R> createCodec(com.mojang.serialization.Codec<T> codec, MinMaxBounds.BoundsFactory<T, R> boundsFactory) static <B extends io.netty.buffer.ByteBuf,T extends Number, R extends MinMaxBounds<T>>
StreamCodec<B, R> createStreamCodec(StreamCodec<B, T> streamCodec, MinMaxBounds.BoundsFactory<T, R> boundsFactory) static <T extends Number,R extends MinMaxBounds<T>>
RfromReader(com.mojang.brigadier.StringReader reader, MinMaxBounds.BoundsFromReaderFactory<T, R> boundedFactory, Function<String, T> valueFactory, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> commandExceptionSupplier, Function<T, T> formatter) private static booleanisAllowedInputChat(com.mojang.brigadier.StringReader reader) default booleanisAny()max()min()readNumber(com.mojang.brigadier.StringReader reader, Function<String, T> stringToValueFunction, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> commandExceptionSupplier)
-
Field Details
-
ERROR_EMPTY
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EMPTY -
ERROR_SWAPPED
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SWAPPED
-
-
Method Details
-
min
-
max
-
isAny
default boolean isAny() -
unwrapPoint
-
createCodec
static <T extends Number,R extends MinMaxBounds<T>> com.mojang.serialization.Codec<R> createCodec(com.mojang.serialization.Codec<T> codec, MinMaxBounds.BoundsFactory<T, R> boundsFactory) -
createStreamCodec
static <B extends io.netty.buffer.ByteBuf,T extends Number, StreamCodec<B,R extends MinMaxBounds<T>> R> createStreamCodec(StreamCodec<B, T> streamCodec, MinMaxBounds.BoundsFactory<T, R> boundsFactory) -
fromReader
static <T extends Number,R extends MinMaxBounds<T>> R fromReader(com.mojang.brigadier.StringReader reader, MinMaxBounds.BoundsFromReaderFactory<T, R> boundedFactory, Function<String, throws com.mojang.brigadier.exceptions.CommandSyntaxExceptionT> valueFactory, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> commandExceptionSupplier, Function<T, T> formatter) - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNumber
private static <T extends Number> Optional<T> readNumber(com.mojang.brigadier.StringReader reader, Function<String, T> stringToValueFunction, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> commandExceptionSupplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
isAllowedInputChat
private static boolean isAllowedInputChat(com.mojang.brigadier.StringReader reader)
-