Package net.minecraft.command
Record Class FloatRangeArgument
java.lang.Object
java.lang.Record
net.minecraft.command.FloatRangeArgument
- Record Components:
min-max-
- Mappings:
Namespace Name official diintermediary net/minecraft/class_2152named net/minecraft/command/FloatRangeArgumentofficial cintermediary comp_1840named minofficial dintermediary comp_1841named max
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FloatRangeArgumentThe field for themaxrecord component.The field for theminrecord component.static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Constructor Summary
ConstructorsConstructorDescriptionFloatRangeArgument(@Nullable Float min, @Nullable Float max) Creates an instance of aFloatRangeArgumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic FloatRangeArgumentatLeast(float value) static FloatRangeArgumentatMost(float value) static FloatRangeArgumentbetween(float min, float max) final booleanIndicates whether some other object is "equal to" this one.static FloatRangeArgumentexactly(float value) static FloatRangeArgumentfromJson(@Nullable JsonElement json) final inthashCode()Returns a hash code value for this object.booleanisInRange(float value) booleanisInSquaredRange(double value) max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.static FloatRangeArgumentparse(com.mojang.brigadier.StringReader reader, boolean allowFloats) static FloatRangeArgumentparse(com.mojang.brigadier.StringReader reader, boolean allowFloats, Function<Float, Float> transform) parseFloat(com.mojang.brigadier.StringReader reader, boolean allowFloats) private static booleanpeekDigit(com.mojang.brigadier.StringReader reader, boolean allowFloats) toJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
min
The field for theminrecord component. -
max
The field for themaxrecord component. -
ANY
- Mappings:
Namespace Name Mixin selector official aLdi;a:Ldi;intermediary field_9780Lnet/minecraft/class_2152;field_9780:Lnet/minecraft/class_2152;named ANYLnet/minecraft/command/FloatRangeArgument;ANY:Lnet/minecraft/command/FloatRangeArgument;
-
ONLY_INTS_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ONLY_INTS_EXCEPTION- Mappings:
Namespace Name Mixin selector official bLdi;b:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;intermediary field_9781Lnet/minecraft/class_2152;field_9781:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;named ONLY_INTS_EXCEPTIONLnet/minecraft/command/FloatRangeArgument;ONLY_INTS_EXCEPTION:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
-
-
Constructor Details
-
Method Details
-
exactly
- Mappings:
Namespace Name Mixin selector official aLdi;a(F)Ldi;intermediary method_35401Lnet/minecraft/class_2152;method_35401(F)Lnet/minecraft/class_2152;named exactlyLnet/minecraft/command/FloatRangeArgument;exactly(F)Lnet/minecraft/command/FloatRangeArgument;
-
between
- Mappings:
Namespace Name Mixin selector official aLdi;a(FF)Ldi;intermediary method_35402Lnet/minecraft/class_2152;method_35402(FF)Lnet/minecraft/class_2152;named betweenLnet/minecraft/command/FloatRangeArgument;between(FF)Lnet/minecraft/command/FloatRangeArgument;
-
atLeast
- Mappings:
Namespace Name Mixin selector official bLdi;b(F)Ldi;intermediary method_35406Lnet/minecraft/class_2152;method_35406(F)Lnet/minecraft/class_2152;named atLeastLnet/minecraft/command/FloatRangeArgument;atLeast(F)Lnet/minecraft/command/FloatRangeArgument;
-
atMost
- Mappings:
Namespace Name Mixin selector official cLdi;c(F)Ldi;intermediary method_35408Lnet/minecraft/class_2152;method_35408(F)Lnet/minecraft/class_2152;named atMostLnet/minecraft/command/FloatRangeArgument;atMost(F)Lnet/minecraft/command/FloatRangeArgument;
-
isInRange
public boolean isInRange(float value) - Mappings:
Namespace Name Mixin selector official dLdi;d(F)Zintermediary method_35409Lnet/minecraft/class_2152;method_35409(F)Znamed isInRangeLnet/minecraft/command/FloatRangeArgument;isInRange(F)Z
-
isInSquaredRange
public boolean isInSquaredRange(double value) - Mappings:
Namespace Name Mixin selector official aLdi;a(D)Zintermediary method_35400Lnet/minecraft/class_2152;method_35400(D)Znamed isInSquaredRangeLnet/minecraft/command/FloatRangeArgument;isInSquaredRange(D)Z
-
toJson
- Mappings:
Namespace Name Mixin selector official aLdi;a()Lcom/google/gson/JsonElement;intermediary method_35407Lnet/minecraft/class_2152;method_35407()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/command/FloatRangeArgument;toJson()Lcom/google/gson/JsonElement;
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLdi;a(Lcom/google/gson/JsonElement;)Ldi;intermediary method_35403Lnet/minecraft/class_2152;method_35403(Lcom/google/gson/JsonElement;)Lnet/minecraft/class_2152;named fromJsonLnet/minecraft/command/FloatRangeArgument;fromJson(Lcom/google/gson/JsonElement;)Lnet/minecraft/command/FloatRangeArgument;
-
parse
public static FloatRangeArgument parse(com.mojang.brigadier.StringReader reader, boolean allowFloats) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector official aLdi;a(Lcom/mojang/brigadier/StringReader;Z)Ldi;intermediary method_35404Lnet/minecraft/class_2152;method_35404(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/class_2152;named parseLnet/minecraft/command/FloatRangeArgument;parse(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/command/FloatRangeArgument;
-
parse
public static FloatRangeArgument parse(com.mojang.brigadier.StringReader reader, boolean allowFloats, Function<Float, Float> transform) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector official aLdi;a(Lcom/mojang/brigadier/StringReader;ZLjava/util/function/Function;)Ldi;intermediary method_9172Lnet/minecraft/class_2152;method_9172(Lcom/mojang/brigadier/StringReader;ZLjava/util/function/Function;)Lnet/minecraft/class_2152;named parseLnet/minecraft/command/FloatRangeArgument;parse(Lcom/mojang/brigadier/StringReader;ZLjava/util/function/Function;)Lnet/minecraft/command/FloatRangeArgument;
-
parseFloat
@Nullable private static @Nullable Float parseFloat(com.mojang.brigadier.StringReader reader, boolean allowFloats) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector official bLdi;b(Lcom/mojang/brigadier/StringReader;Z)Ljava/lang/Float;intermediary method_9176Lnet/minecraft/class_2152;method_9176(Lcom/mojang/brigadier/StringReader;Z)Ljava/lang/Float;named parseFloatLnet/minecraft/command/FloatRangeArgument;parseFloat(Lcom/mojang/brigadier/StringReader;Z)Ljava/lang/Float;
-
peekDigit
private static boolean peekDigit(com.mojang.brigadier.StringReader reader, boolean allowFloats) - Mappings:
Namespace Name Mixin selector official cLdi;c(Lcom/mojang/brigadier/StringReader;Z)Zintermediary method_9173Lnet/minecraft/class_2152;method_9173(Lcom/mojang/brigadier/StringReader;Z)Znamed peekDigitLnet/minecraft/command/FloatRangeArgument;peekDigit(Lcom/mojang/brigadier/StringReader;Z)Z
-
mapFloat
@Nullable private static @Nullable Float mapFloat(@Nullable @Nullable Float value, Function<Float, Float> function) - Mappings:
Namespace Name Mixin selector official aLdi;a(Ljava/lang/Float;Ljava/util/function/Function;)Ljava/lang/Float;intermediary method_9174Lnet/minecraft/class_2152;method_9174(Ljava/lang/Float;Ljava/util/function/Function;)Ljava/lang/Float;named mapFloatLnet/minecraft/command/FloatRangeArgument;mapFloat(Ljava/lang/Float;Ljava/util/function/Function;)Ljava/lang/Float;
-
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.- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-