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-applyValueImmediately-
- 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, boolean applyValueImmediately)
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 named net/minecraft/client/option/SimpleOption$ValidatingIntSliderCallbacksintermediary net/minecraft/class_7172$class_7174official fgr$fnamed minInclusiveintermediary comp_593official anamed maxInclusiveintermediary comp_594official bnamed applyValueImmediatelyintermediary comp_2661official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theapplyValueImmediatelyrecord component.private final intThe field for themaxInclusiverecord component.private final intThe field for theminInclusiverecord component. -
Constructor Summary
ConstructorsConstructorDescriptionValidatingIntSliderCallbacks(int minInclusive, int maxInclusive) ValidatingIntSliderCallbacks(int int2, int int3, boolean bool) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theapplyValueImmediatelyrecord component.com.mojang.serialization.Codec<Integer> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxInclusiverecord component.intReturns the value of theminInclusiverecord component.final StringtoString()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, waitMethods inherited from interface net.minecraft.client.option.SimpleOption.IntSliderCallbacks
toSliderProgress, toValue, withModifierMethods inherited from interface net.minecraft.client.option.SimpleOption.SliderCallbacks
getWidgetCreator
-
Field Details
-
minInclusive
private final int minInclusiveThe field for theminInclusiverecord component. -
maxInclusive
private final int maxInclusiveThe field for themaxInclusiverecord component. -
applyValueImmediately
private final boolean applyValueImmediatelyThe field for theapplyValueImmediatelyrecord component.
-
-
Constructor Details
-
ValidatingIntSliderCallbacks
public ValidatingIntSliderCallbacks(int minInclusive, int maxInclusive) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/option/SimpleOption$ValidatingIntSliderCallbacks;<init>(II)Vintermediary <init>Lnet/minecraft/class_7172$class_7174;<init>(II)Vofficial <init>Lfgr$f;<init>(II)V
-
ValidatingIntSliderCallbacks
public ValidatingIntSliderCallbacks(int int2, int int3, boolean bool)
-
-
Method Details
-
validate
Description copied from interface:SimpleOption.CallbacksReturns 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:
validatein interfaceSimpleOption.Callbacks<Integer>- Returns:
- the validated value
- Mappings:
Namespace Name Mixin selector named validateLnet/minecraft/client/option/SimpleOption$ValidatingIntSliderCallbacks;validate(Ljava/lang/Integer;)Ljava/util/Optional;intermediary method_41761Lnet/minecraft/class_7172$class_7174;method_41761(Ljava/lang/Integer;)Ljava/util/Optional;official aLfgr$f;a(Ljava/lang/Integer;)Ljava/util/Optional;
-
codec
- Specified by:
codecin interfaceSimpleOption.Callbacks<Integer>- Mappings:
Namespace Name Mixin selector named codecLnet/minecraft/client/option/SimpleOption$Callbacks;codec()Lcom/mojang/serialization/Codec;intermediary comp_675Lnet/minecraft/class_7172$class_7178;comp_675()Lcom/mojang/serialization/Codec;official fLfgr$n;f()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()Returns the value of theminInclusiverecord component.- Specified by:
minInclusivein interfaceSimpleOption.IntSliderCallbacks- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
public int maxInclusive()Returns the value of themaxInclusiverecord component.- Specified by:
maxInclusivein interfaceSimpleOption.IntSliderCallbacks- Returns:
- the value of the
maxInclusiverecord component
-
applyValueImmediately
public boolean applyValueImmediately()Returns the value of theapplyValueImmediatelyrecord component.- Specified by:
applyValueImmediatelyin interfaceSimpleOption.SliderCallbacks<Integer>- Returns:
- the value of the
applyValueImmediatelyrecord component
-