Record Class MinMaxBounds.Ints
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.MinMaxBounds.Ints
- All Implemented Interfaces:
MinMaxBounds<Integer>
- Enclosing interface:
MinMaxBounds<T extends Number & Comparable<T>>
public static record MinMaxBounds.Ints(MinMaxBounds.Bounds<Integer> bounds, MinMaxBounds.Bounds<Long> boundsSqr)
extends Record
implements MinMaxBounds<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.criterion.MinMaxBounds
MinMaxBounds.Bounds<T extends Number & Comparable<T>>, MinMaxBounds.Doubles, MinMaxBounds.FloatDegrees, MinMaxBounds.Ints -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MinMaxBounds.Intsprivate final MinMaxBounds.Bounds<Integer> The field for theboundsrecord component.private final MinMaxBounds.Bounds<Long> The field for theboundsSqrrecord component.static final com.mojang.serialization.Codec<MinMaxBounds.Ints> static final StreamCodec<io.netty.buffer.ByteBuf, MinMaxBounds.Ints> Fields inherited from interface net.minecraft.advancements.criterion.MinMaxBounds
ERROR_EMPTY, ERROR_SWAPPED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInts(MinMaxBounds.Bounds<Integer> p_466835_) Ints(MinMaxBounds.Bounds<Integer> bounds, MinMaxBounds.Bounds<Long> boundsSqr) Creates an instance of aIntsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MinMaxBounds.IntsatLeast(int pMin) static MinMaxBounds.IntsatMost(int pMax) static MinMaxBounds.Intsbetween(int pMin, int pMax) bounds()Returns the value of theboundsrecord component.Returns the value of theboundsSqrrecord component.final booleanIndicates whether some other object is "equal to" this one.static MinMaxBounds.Intsexactly(int pValue) static MinMaxBounds.IntsfromReader(com.mojang.brigadier.StringReader pReader) final inthashCode()Returns a hash code value for this object.booleanmatches(int pValue) booleanmatchesSqr(long pValue) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.advancements.criterion.MinMaxBounds
isAny, max, min
-
Field Details
-
bounds
The field for theboundsrecord component. -
boundsSqr
The field for theboundsSqrrecord component. -
ANY
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Ints
-
Ints
Creates an instance of aIntsrecord class.- Parameters:
bounds- the value for theboundsrecord componentboundsSqr- the value for theboundsSqrrecord component
-
-
Method Details
-
exactly
-
between
-
atLeast
-
atMost
-
matches
public boolean matches(int pValue) -
matchesSqr
public boolean matchesSqr(long pValue) -
fromReader
public static MinMaxBounds.Ints fromReader(com.mojang.brigadier.StringReader pReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
bounds
Returns the value of theboundsrecord component.- Specified by:
boundsin interfaceMinMaxBounds<Integer>- Returns:
- the value of the
boundsrecord component
-
boundsSqr
Returns the value of theboundsSqrrecord component.- Returns:
- the value of the
boundsSqrrecord component
-