Record Class MinMaxBounds.Doubles
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.MinMaxBounds.Doubles
- All Implemented Interfaces:
MinMaxBounds<Double>
- Enclosing interface:
MinMaxBounds<T extends Number>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.advancements.critereon.MinMaxBounds
MinMaxBounds.BoundsFactory<T extends Number,
R extends MinMaxBounds<T>>, MinMaxBounds.BoundsFromReaderFactory<T extends Number, R extends MinMaxBounds<T>>, MinMaxBounds.Doubles, MinMaxBounds.Ints -
Field Summary
Modifier and TypeFieldDescriptionstatic final MinMaxBounds.Doubles
static final com.mojang.serialization.Codec
<MinMaxBounds.Doubles> The field for themax
record component.The field for themaxSq
record component.The field for themin
record component.The field for theminSq
record component.Fields inherited from interface net.minecraft.advancements.critereon.MinMaxBounds
ERROR_EMPTY, ERROR_SWAPPED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MinMaxBounds.Doubles
atLeast
(double p_154805_) static MinMaxBounds.Doubles
atMost
(double p_154809_) static MinMaxBounds.Doubles
between
(double p_154789_, double p_154790_) private static MinMaxBounds.Doubles
create
(com.mojang.brigadier.StringReader p_154796_, Optional<Double> p_299495_, Optional<Double> p_301206_) final boolean
Indicates whether some other object is "equal to" this one.static MinMaxBounds.Doubles
exactly
(double p_154787_) static MinMaxBounds.Doubles
fromReader
(com.mojang.brigadier.StringReader p_154794_) static MinMaxBounds.Doubles
fromReader
(com.mojang.brigadier.StringReader p_154800_, Function<Double, Double> p_154801_) final int
hashCode()
Returns a hash code value for this object.boolean
matches
(double p_154811_) boolean
matchesSqr
(double p_154813_) max()
Returns the value of themax
record component.maxSq()
Returns the value of themaxSq
record component.min()
Returns the value of themin
record component.minSq()
Returns the value of theminSq
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.advancements.critereon.MinMaxBounds
isAny, unwrapPoint
-
Field Details
-
min
The field for themin
record component. -
max
The field for themax
record component. -
minSq
The field for theminSq
record component. -
maxSq
The field for themaxSq
record component. -
ANY
-
CODEC
-
-
Constructor Details
-
Doubles
-
Doubles
public Doubles(Optional<Double> min, Optional<Double> max, Optional<Double> minSq, Optional<Double> maxSq) Creates an instance of aDoubles
record class.- Parameters:
min
- the value for themin
record componentmax
- the value for themax
record componentminSq
- the value for theminSq
record componentmaxSq
- the value for themaxSq
record component
-
-
Method Details
-
create
private static MinMaxBounds.Doubles create(com.mojang.brigadier.StringReader p_154796_, Optional<Double> p_299495_, Optional<Double> p_301206_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
squareOpt
-
exactly
-
between
-
atLeast
-
atMost
-
matches
public boolean matches(double p_154811_) -
matchesSqr
public boolean matchesSqr(double p_154813_) -
fromReader
public static MinMaxBounds.Doubles fromReader(com.mojang.brigadier.StringReader p_154794_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fromReader
public static MinMaxBounds.Doubles fromReader(com.mojang.brigadier.StringReader p_154800_, Function<Double, Double> p_154801_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
min
Returns the value of themin
record component.- Specified by:
min
in interfaceMinMaxBounds<Double>
- Returns:
- the value of the
min
record component
-
max
Returns the value of themax
record component.- Specified by:
max
in interfaceMinMaxBounds<Double>
- Returns:
- the value of the
max
record component
-
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)
. -
minSq
Returns the value of theminSq
record component.- Returns:
- the value of the
minSq
record component
-
maxSq
Returns the value of themaxSq
record component.- Returns:
- the value of the
maxSq
record component
-