Record Class WrappedMinMaxBounds
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.WrappedMinMaxBounds
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final WrappedMinMaxBoundsstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate final FloatThe field for themaxrecord component.private final FloatThe field for theminrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionWrappedMinMaxBounds(Float min, Float max) Creates an instance of aWrappedMinMaxBoundsrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic WrappedMinMaxBoundsatLeast(float p_164415_) static WrappedMinMaxBoundsatMost(float p_164418_) static WrappedMinMaxBoundsbetween(float p_164405_, float p_164406_) final booleanIndicates whether some other object is "equal to" this one.static WrappedMinMaxBoundsexactly(float p_164403_) static WrappedMinMaxBoundsfromJson(com.google.gson.JsonElement p_164408_) static WrappedMinMaxBoundsfromReader(com.mojang.brigadier.StringReader p_164410_, boolean p_164411_) static WrappedMinMaxBoundsfromReader(com.mojang.brigadier.StringReader p_75360_, boolean p_75361_, Function<Float, Float> p_75362_) final inthashCode()Returns a hash code value for this object.private static booleanisAllowedNumber(com.mojang.brigadier.StringReader p_75371_, boolean p_75372_) booleanmatches(float p_164420_) booleanmatchesSqr(double p_164401_) max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.private static FloatoptionallyFormat(Float p_75364_, Function<Float, Float> p_75365_) private static FloatreadNumber(com.mojang.brigadier.StringReader p_75368_, boolean p_75369_) com.google.gson.JsonElementfinal StringtoString()Returns a string representation of this record class.
- 
Field Details- 
minThe field for theminrecord component.
- 
maxThe field for themaxrecord component.
- 
ANY
- 
ERROR_INTS_ONLYpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INTS_ONLY
 
- 
- 
Constructor Details- 
WrappedMinMaxBoundsCreates an instance of aWrappedMinMaxBoundsrecord class.- Parameters:
- min- the value for the- minrecord component
- max- the value for the- maxrecord component
 
 
- 
- 
Method Details- 
exactly
- 
between
- 
atLeast
- 
atMost
- 
matchespublic boolean matches(float p_164420_) 
- 
matchesSqrpublic boolean matchesSqr(double p_164401_) 
- 
serializeToJsonpublic com.google.gson.JsonElement serializeToJson()
- 
fromJson
- 
fromReaderpublic static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader p_164410_, boolean p_164411_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
fromReaderpublic static WrappedMinMaxBounds fromReader(com.mojang.brigadier.StringReader p_75360_, boolean p_75361_, Function<Float, Float> p_75362_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
readNumber@Nullable private static Float readNumber(com.mojang.brigadier.StringReader p_75368_, boolean p_75369_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
isAllowedNumberprivate static boolean isAllowedNumber(com.mojang.brigadier.StringReader p_75371_, boolean p_75372_) 
- 
optionallyFormat
- 
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).
- 
minReturns the value of theminrecord component.- Returns:
- the value of the minrecord component
 
- 
maxReturns the value of themaxrecord component.- Returns:
- the value of the maxrecord component
 
 
-