Record Class MinMaxBounds.Doubles
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.MinMaxBounds.Doubles
- All Implemented Interfaces:
MinMaxBounds<Double>
- Enclosing interface:
MinMaxBounds<T extends Number & Comparable<T>>
public static record MinMaxBounds.Doubles(MinMaxBounds.Bounds<Double> bounds, MinMaxBounds.Bounds<Double> boundsSqr)
extends Record
implements MinMaxBounds<Double>
-
Nested Class Summary
Nested classes/interfaces inherited from interface MinMaxBounds
MinMaxBounds.Bounds<T>, MinMaxBounds.Doubles, MinMaxBounds.FloatDegrees, MinMaxBounds.Ints -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MinMaxBounds.Doublesprivate final MinMaxBounds.Bounds<Double> The field for theboundsrecord component.private final MinMaxBounds.Bounds<Double> The field for theboundsSqrrecord component.static final com.mojang.serialization.Codec<MinMaxBounds.Doubles> static final StreamCodec<io.netty.buffer.ByteBuf, MinMaxBounds.Doubles> Fields inherited from interface MinMaxBounds
ERROR_EMPTY, ERROR_SWAPPED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDoubles(MinMaxBounds.Bounds<Double> bounds) Doubles(MinMaxBounds.Bounds<Double> bounds, MinMaxBounds.Bounds<Double> boundsSqr) Creates an instance of aDoublesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MinMaxBounds.DoublesatLeast(double value) static MinMaxBounds.DoublesatMost(double value) static MinMaxBounds.Doublesbetween(double min, double max) 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.Doublesexactly(double value) static MinMaxBounds.DoublesfromReader(com.mojang.brigadier.StringReader reader) final inthashCode()Returns a hash code value for this object.booleanmatches(double value) booleanmatchesSqr(double valueSqr) final StringtoString()Returns a string representation of this record class.Methods inherited from interface MinMaxBounds
isAny, max, min
-
Field Details
-
bounds
The field for theboundsrecord component. -
boundsSqr
The field for theboundsSqrrecord component. -
ANY
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Doubles
-
Doubles
Creates an instance of aDoublesrecord class.- Parameters:
bounds- the value for theboundsrecord componentboundsSqr- the value for theboundsSqrrecord component
-
-
Method Details
-
exactly
-
between
-
atLeast
-
atMost
-
matches
public boolean matches(double value) -
matchesSqr
public boolean matchesSqr(double valueSqr) -
fromReader
public static MinMaxBounds.Doubles fromReader(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
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). -
bounds
Returns the value of theboundsrecord component.- Specified by:
boundsin interfaceMinMaxBounds<Double>- Returns:
- the value of the
boundsrecord component
-
boundsSqr
Returns the value of theboundsSqrrecord component.- Returns:
- the value of the
boundsSqrrecord component
-