Package net.minecraft.client.option
Record Class SimpleOption.ValidatingIntSliderCallbacks
java.lang.Object
java.lang.Record
net.minecraft.client.option.SimpleOption.ValidatingIntSliderCallbacks
- Record Components:
minInclusive
-maxInclusive
-
- All Implemented Interfaces:
SimpleOption.Callbacks<Integer>
,SimpleOption.IntSliderCallbacks
,SimpleOption.SliderCallbacks<Integer>
- Enclosing class:
SimpleOption<T>
@Environment(CLIENT)
public static record SimpleOption.ValidatingIntSliderCallbacks(int minInclusive, int maxInclusive)
extends Record
implements SimpleOption.IntSliderCallbacks
A set of callbacks for a slider of integer values with a fixed minimum and maximum values.
- See Also:
- Mappings:
Namespace Name official emk$f
intermediary net/minecraft/class_7172$class_7174
named net/minecraft/client/option/SimpleOption$ValidatingIntSliderCallbacks
official a
intermediary comp_593
named minInclusive
official b
intermediary comp_594
named maxInclusive
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for themaxInclusive
record component.private final int
The field for theminInclusive
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer>
codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
int
final String
toString()
Returns a string representation of this record class.Returns the validated value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.client.option.SimpleOption.IntSliderCallbacks
toSliderProgress, toValue, withModifier
Methods inherited from interface net.minecraft.client.option.SimpleOption.SliderCallbacks
getWidgetCreator
-
Field Details
-
minInclusive
private final int minInclusiveThe field for theminInclusive
record component. -
maxInclusive
private final int maxInclusiveThe field for themaxInclusive
record component.
-
-
Constructor Details
-
ValidatingIntSliderCallbacks
public ValidatingIntSliderCallbacks(int int2, int int3)
-
-
Method Details
-
validate
Description copied from interface:SimpleOption.Callbacks
Returns the validated value.Returning
Optional.empty()
indicates the passed value is invalid and it should reset to the default value. This method can also coerce the invalid value into a valid one by clamping, etc.- Specified by:
validate
in interfaceSimpleOption.Callbacks<Integer>
- Returns:
- the validated value
- Mappings:
Namespace Name Mixin selector official a
Lemk$f;a(Ljava/lang/Integer;)Ljava/util/Optional;
intermediary method_41761
Lnet/minecraft/class_7172$class_7174;method_41761(Ljava/lang/Integer;)Ljava/util/Optional;
named validate
Lnet/minecraft/client/option/SimpleOption$ValidatingIntSliderCallbacks;validate(Ljava/lang/Integer;)Ljava/util/Optional;
-
codec
- Specified by:
codec
in interfaceSimpleOption.Callbacks<Integer>
- Mappings:
Namespace Name Mixin selector official f
Lemk$n;f()Lcom/mojang/serialization/Codec;
intermediary comp_675
Lnet/minecraft/class_7172$class_7178;comp_675()Lcom/mojang/serialization/Codec;
named codec
Lnet/minecraft/client/option/SimpleOption$Callbacks;codec()Lcom/mojang/serialization/Codec;
-
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 with '=='. -
minInclusive
public int minInclusive()- Specified by:
minInclusive
in interfaceSimpleOption.IntSliderCallbacks
- Mappings:
Namespace Name Mixin selector official d
Lemk$g;d()I
intermediary comp_593
Lnet/minecraft/class_7172$class_7275;comp_593()I
named minInclusive
Lnet/minecraft/client/option/SimpleOption$IntSliderCallbacks;minInclusive()I
-
maxInclusive
public int maxInclusive()- Specified by:
maxInclusive
in interfaceSimpleOption.IntSliderCallbacks
- Mappings:
Namespace Name Mixin selector official b
Lemk$g;b()I
intermediary comp_594
Lnet/minecraft/class_7172$class_7275;comp_594()I
named maxInclusive
Lnet/minecraft/client/option/SimpleOption$IntSliderCallbacks;maxInclusive()I
-