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
FieldsModifier and TypeFieldDescriptionstatic final MinMaxBounds.Intsstatic final com.mojang.serialization.Codec<MinMaxBounds.Ints> 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.IntsatLeast(int p_55387_) static MinMaxBounds.IntsatMost(int p_154820_) static MinMaxBounds.Intsbetween(int p_154815_, int p_154816_) private static MinMaxBounds.Intscreate(com.mojang.brigadier.StringReader p_55378_, Optional<Integer> p_297316_, Optional<Integer> p_300359_) final booleanIndicates whether some other object is "equal to" this one.static MinMaxBounds.Intsexactly(int p_55372_) static MinMaxBounds.IntsfromReader(com.mojang.brigadier.StringReader p_55376_) static MinMaxBounds.IntsfromReader(com.mojang.brigadier.StringReader p_55382_, Function<Integer, Integer> p_55383_) final inthashCode()Returns a hash code value for this object.booleanmatches(int p_55391_) booleanmatchesSqr(long p_154818_) 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
-
Ints
-
Ints
public Ints(Optional<Integer> min, Optional<Integer> max, Optional<Long> minSq, Optional<Long> maxSq) Creates an instance of aIntsrecord 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.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 theminrecord component.- Specified by:
minin interfaceMinMaxBounds<Integer>- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Specified by:
maxin interfaceMinMaxBounds<Integer>- Returns:
- the value of the
maxrecord 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 theminSqrecord component.- Returns:
- the value of the
minSqrecord component
-
maxSq
Returns the value of themaxSqrecord component.- Returns:
- the value of the
maxSqrecord component
-