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 SummaryNested classes/interfaces inherited from interface net.minecraft.advancements.critereon.MinMaxBoundsMinMaxBounds.BoundsFactory<T extends Number,R extends MinMaxBounds<T>>, MinMaxBounds.BoundsFromReaderFactory<T extends Number, R extends MinMaxBounds<T>>, MinMaxBounds.Doubles, MinMaxBounds.Ints 
- 
Field SummaryFieldsModifier 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.MinMaxBoundsERROR_EMPTY, ERROR_SWAPPED
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.IntsfromJson(com.google.gson.JsonElement p_55374_) 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.com.google.gson.JsonElementfinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.advancements.critereon.MinMaxBoundsisAny, unwrapPoint
- 
Field Details- 
minThe field for theminrecord component.
- 
maxThe field for themaxrecord component.
- 
minSqThe field for theminSqrecord component.
- 
maxSqThe field for themaxSqrecord component.
- 
ANY
- 
CODEC
 
- 
- 
Constructor Details- 
Ints
- 
Intspublic Ints(Optional<Integer> min, Optional<Integer> max, Optional<Long> minSq, Optional<Long> maxSq) Creates an instance of aIntsrecord class.- Parameters:
- min- the value for the- minrecord component
- max- the value for the- maxrecord component
- minSq- the value for the- minSqrecord component
- maxSq- the value for the- maxSqrecord component
 
 
- 
- 
Method Details- 
createprivate 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
- 
matchespublic boolean matches(int p_55391_) 
- 
matchesSqrpublic boolean matchesSqr(long p_154818_) 
- 
fromJson
- 
serializeToJsonpublic com.google.gson.JsonElement serializeToJson()
- 
fromReaderpublic static MinMaxBounds.Ints fromReader(com.mojang.brigadier.StringReader p_55376_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
fromReaderpublic 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
 
- 
minReturns the value of theminrecord component.- Specified by:
- minin interface- MinMaxBounds<Integer>
- Returns:
- the value of the minrecord component
 
- 
maxReturns the value of themaxrecord component.- Specified by:
- maxin interface- MinMaxBounds<Integer>
- Returns:
- the value of the maxrecord component
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
minSqReturns the value of theminSqrecord component.- Returns:
- the value of the minSqrecord component
 
- 
maxSqReturns the value of themaxSqrecord component.- Returns:
- the value of the maxSqrecord component
 
 
-