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
FieldsModifier and TypeFieldDescriptionstatic final MinMaxBounds.Doublesstatic final com.mojang.serialization.Codec<MinMaxBounds.Doubles> The field for themaxrecord component.The field for themaxSqrecord component.The field for theminrecord component.The field for theminSqrecord component.Fields inherited from interface net.minecraft.advancements.critereon.MinMaxBounds
ERROR_EMPTY, ERROR_SWAPPED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MinMaxBounds.DoublesatLeast(double p_154805_) static MinMaxBounds.DoublesatMost(double p_154809_) static MinMaxBounds.Doublesbetween(double p_154789_, double p_154790_) private static MinMaxBounds.Doublescreate(com.mojang.brigadier.StringReader p_154796_, Optional<Double> p_298478_, Optional<Double> p_298476_) final booleanIndicates whether some other object is "equal to" this one.static MinMaxBounds.Doublesexactly(double p_154787_) static MinMaxBounds.DoublesfromReader(com.mojang.brigadier.StringReader p_154794_) static MinMaxBounds.DoublesfromReader(com.mojang.brigadier.StringReader p_154800_, Function<Double, Double> p_154801_) final inthashCode()Returns a hash code value for this object.booleanmatches(double p_154811_) booleanmatchesSqr(double p_154813_) max()Returns the value of themaxrecord component.maxSq()Returns the value of themaxSqrecord component.min()Returns the value of theminrecord component.minSq()Returns the value of theminSqrecord component.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.critereon.MinMaxBounds
isAny, unwrapPoint
-
Field Details
-
min
The field for theminrecord component. -
max
The field for themaxrecord component. -
minSq
The field for theminSqrecord component. -
maxSq
The field for themaxSqrecord 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 aDoublesrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentminSq- the value for theminSqrecord componentmaxSq- the value for themaxSqrecord component
-
-
Method Details
-
create
private static MinMaxBounds.Doubles create(com.mojang.brigadier.StringReader p_154796_, Optional<Double> p_298478_, Optional<Double> p_298476_) 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
-
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). -
min
Returns the value of theminrecord component.- Specified by:
minin interfaceMinMaxBounds<Double>- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Specified by:
maxin interfaceMinMaxBounds<Double>- Returns:
- the value of the
maxrecord component
-
minSq
Returns the value of theminSqrecord component.- Returns:
- the value of the
minSqrecord component
-
maxSq
Returns the value of themaxSqrecord component.- Returns:
- the value of the
maxSqrecord component
-