Record Class MinMaxBounds.Bounds<T extends Number & Comparable<T>>
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.MinMaxBounds.Bounds<T>
- Enclosing interface:
MinMaxBounds<T extends Number & Comparable<T>>
public static record MinMaxBounds.Bounds<T extends Number & Comparable<T>>(Optional<T extends Number & Comparable<T>> min, Optional<T extends Number & Comparable<T>> max)
extends Record
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> any()booleanasPoint()asRange()static <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> atLeast(T value) static <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> atMost(T value) static <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> between(T min, T max) (package private) static <T extends Number & Comparable<T>>
com.mojang.serialization.Codec<MinMaxBounds.Bounds<T>> createCodec(com.mojang.serialization.Codec<T> numberCodec) (package private) static <B extends io.netty.buffer.ByteBuf, T extends Number & Comparable<T>>
StreamCodec<B, MinMaxBounds.Bounds<T>> createStreamCodec(StreamCodec<B, T> numberCodec) final booleanIndicates whether some other object is "equal to" this one.static <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> exactly(T value) static <T extends Number & Comparable<T>>
MinMaxBounds.Bounds<T> fromReader(com.mojang.brigadier.StringReader reader, Function<String, T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> parseExc) final inthashCode()Returns a hash code value for this object.private static booleanisAllowedInputChar(com.mojang.brigadier.StringReader reader) booleanisAny()<U extends Number & Comparable<U>>
MinMaxBounds.Bounds<U> max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.readNumber(com.mojang.brigadier.StringReader reader, Function<String, T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> parseExc) final StringtoString()Returns a string representation of this record class.com.mojang.serialization.DataResult<MinMaxBounds.Bounds<T>>
-
Field Details
-
min
The field for theminrecord component. -
max
The field for themaxrecord component.
-
-
Constructor Details
-
Bounds
-
-
Method Details
-
isAny
public boolean isAny() -
validateSwappedBoundsInCodec
-
areSwapped
public boolean areSwapped() -
asRange
-
asPoint
-
any
-
exactly
-
between
-
atLeast
-
atMost
-
map
-
createCodec
static <T extends Number & Comparable<T>> com.mojang.serialization.Codec<MinMaxBounds.Bounds<T>> createCodec(com.mojang.serialization.Codec<T> numberCodec) -
createStreamCodec
static <B extends io.netty.buffer.ByteBuf, T extends Number & Comparable<T>> StreamCodec<B, MinMaxBounds.Bounds<T>> createStreamCodec(StreamCodec<B, T> numberCodec) -
fromReader
public static <T extends Number & Comparable<T>> MinMaxBounds.Bounds<T> fromReader(com.mojang.brigadier.StringReader reader, Function<String, T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> parseExc) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNumber
private static <T extends Number> Optional<T> readNumber(com.mojang.brigadier.StringReader reader, Function<String, T> converter, Supplier<com.mojang.brigadier.exceptions.DynamicCommandExceptionType> parseExc) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
isAllowedInputChar
private static boolean isAllowedInputChar(com.mojang.brigadier.StringReader reader) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
min
-
max
-