Record Class MinMaxBounds.Ints
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.MinMaxBounds.Ints
- All Implemented Interfaces:
MinMaxBounds<Integer>
- 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.Ints
static final com.mojang.serialization.Codec<MinMaxBounds.Ints>
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.Ints
atLeast
(int p_55387_) static MinMaxBounds.Ints
atMost
(int p_154820_) static MinMaxBounds.Ints
between
(int p_154815_, int p_154816_) private static MinMaxBounds.Ints
create
(com.mojang.brigadier.StringReader p_55378_, Optional<Integer> p_297316_, Optional<Integer> p_300359_) final boolean
Indicates whether some other object is "equal to" this one.static MinMaxBounds.Ints
exactly
(int p_55372_) static MinMaxBounds.Ints
fromReader
(com.mojang.brigadier.StringReader p_55376_) static MinMaxBounds.Ints
fromReader
(com.mojang.brigadier.StringReader p_55382_, Function<Integer, Integer> p_55383_) final int
hashCode()
Returns a hash code value for this object.boolean
matches
(int p_55391_) boolean
matchesSqr
(long p_154818_) 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
-
Ints
-
Ints
public Ints(Optional<Integer> min, Optional<Integer> max, Optional<Long> minSq, Optional<Long> maxSq) Creates an instance of aInts
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.Ints create(com.mojang.brigadier.StringReader p_55378_, Optional<Integer> p_297316_, Optional<Integer> p_300359_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
squareOpt
-
exactly
-
between
-
atLeast
-
atMost
-
matches
public boolean matches(int p_55391_) -
matchesSqr
public boolean matchesSqr(long p_154818_) -
fromReader
public static MinMaxBounds.Ints fromReader(com.mojang.brigadier.StringReader p_55376_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fromReader
public static MinMaxBounds.Ints fromReader(com.mojang.brigadier.StringReader p_55382_, Function<Integer, Integer> p_55383_) 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<Integer>
- Returns:
- the value of the
min
record component
-
max
Returns the value of themax
record component.- Specified by:
max
in interfaceMinMaxBounds<Integer>
- 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
-