Package net.minecraft.client.option
Enum Class SimpleOption.DoubleSliderCallbacks
java.lang.Object
java.lang.Enum<SimpleOption.DoubleSliderCallbacks>
net.minecraft.client.option.SimpleOption.DoubleSliderCallbacks
- All Implemented Interfaces:
Serializable
,Comparable<SimpleOption.DoubleSliderCallbacks>
,Constable
,SimpleOption.Callbacks<Double>
,SimpleOption.SliderCallbacks<Double>
- Enclosing class:
SimpleOption<T>
@Environment(CLIENT)
public static enum SimpleOption.DoubleSliderCallbacks
extends Enum<SimpleOption.DoubleSliderCallbacks>
implements SimpleOption.SliderCallbacks<Double>
A set of callbacks for a slider of values from
0.0
to 1.0
(both
inclusive). There is only one instance of this callbacks.- See Also:
- Mappings:
Namespace Name named net/minecraft/client/option/SimpleOption$DoubleSliderCallbacks
intermediary net/minecraft/class_7172$class_7177
official ffk$m
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec
<Double> codec()
double
toSliderProgress
(Double double2) Returns the progress (0.0
to1.0
, both inclusive) of the slider.toValue
(double double2) Returns the value from the progress (0.0
to1.0
, both inclusive) of the slider.Returns the validated value.Returns the enum constant of this class with the specified name.static SimpleOption.DoubleSliderCallbacks[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.<R> SimpleOption.SliderCallbacks
<R> withModifier
(DoubleFunction<? extends R> sliderProgressValueToValue, ToDoubleFunction<? super R> valueToSliderProgressValue) Creates a slider callback with the modifier applied.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.minecraft.client.option.SimpleOption.SliderCallbacks
applyValueImmediately, getWidgetCreator
-
Enum Constant Details
-
INSTANCE
- Mappings:
Namespace Name Mixin selector named INSTANCE
Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;INSTANCE:Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;
intermediary field_37875
Lnet/minecraft/class_7172$class_7177;field_37875:Lnet/minecraft/class_7172$class_7177;
official a
Lffk$m;a:Lffk$m;
-
-
Constructor Details
-
DoubleSliderCallbacks
private DoubleSliderCallbacks()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
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<Double>
- Returns:
- the validated value
- Mappings:
Namespace Name Mixin selector named validate
Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;validate(Ljava/lang/Double;)Ljava/util/Optional;
intermediary method_41770
Lnet/minecraft/class_7172$class_7177;method_41770(Ljava/lang/Double;)Ljava/util/Optional;
official a
Lffk$m;a(Ljava/lang/Double;)Ljava/util/Optional;
-
toSliderProgress
Description copied from interface:SimpleOption.SliderCallbacks
Returns the progress (0.0
to1.0
, both inclusive) of the slider.- Specified by:
toSliderProgress
in interfaceSimpleOption.SliderCallbacks<Double>
- Returns:
- the progress (
0.0
to1.0
, both inclusive) of the slider - Mappings:
Namespace Name Mixin selector named toSliderProgress
Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;toSliderProgress(Ljava/lang/Double;)D
intermediary method_41771
Lnet/minecraft/class_7172$class_7177;method_41771(Ljava/lang/Double;)D
official b
Lffk$m;b(Ljava/lang/Double;)D
-
toValue
Description copied from interface:SimpleOption.SliderCallbacks
Returns the value from the progress (0.0
to1.0
, both inclusive) of the slider.- Specified by:
toValue
in interfaceSimpleOption.SliderCallbacks<Double>
- Returns:
- the value from the progress (
0.0
to1.0
, both inclusive) of the slider - Mappings:
Namespace Name Mixin selector named toValue
Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;toValue(D)Ljava/lang/Double;
intermediary method_41768
Lnet/minecraft/class_7172$class_7177;method_41768(D)Ljava/lang/Double;
official a
Lffk$m;a(D)Ljava/lang/Double;
-
withModifier
public <R> SimpleOption.SliderCallbacks<R> withModifier(DoubleFunction<? extends R> sliderProgressValueToValue, ToDoubleFunction<? super R> valueToSliderProgressValue) Creates a slider callback with the modifier applied.- See Also:
- Mappings:
Namespace Name Mixin selector named withModifier
Lnet/minecraft/client/option/SimpleOption$DoubleSliderCallbacks;withModifier(Ljava/util/function/DoubleFunction;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/client/option/SimpleOption$SliderCallbacks;
intermediary method_42420
Lnet/minecraft/class_7172$class_7177;method_42420(Ljava/util/function/DoubleFunction;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/class_7172$class_7176;
official a
Lffk$m;a(Ljava/util/function/DoubleFunction;Ljava/util/function/ToDoubleFunction;)Lffk$k;
-
codec
- Specified by:
codec
in interfaceSimpleOption.Callbacks<Double>
- Mappings:
Namespace Name Mixin selector named codec
Lnet/minecraft/client/option/SimpleOption$Callbacks;codec()Lcom/mojang/serialization/Codec;
intermediary comp_675
Lnet/minecraft/class_7172$class_7178;comp_675()Lcom/mojang/serialization/Codec;
official f
Lffk$n;f()Lcom/mojang/serialization/Codec;
-