Package net.minecraft.client.option
Interface SimpleOption.Callbacks<T>
- All Known Subinterfaces:
- SimpleOption.CyclingCallbacks<T>,- SimpleOption.IntSliderCallbacks,- SimpleOption.SliderCallbacks<T>,- SimpleOption.TypeChangeableCallbacks<T>
- All Known Implementing Classes:
- SimpleOption.AlternateValuesSupportingCyclingCallbacks,- SimpleOption.DoubleSliderCallbacks,- SimpleOption.LazyCyclingCallbacks,- SimpleOption.MaxSuppliableIntCallbacks,- SimpleOption.PotentialValuesBasedCallbacks,- SimpleOption.ValidatingIntSliderCallbacks
- Enclosing class:
- SimpleOption<T>
A set of callbacks to customize an option's behavior.
- See Also:
- Mappings:
- Namespace - Name - official - efx$o- intermediary - net/minecraft/class_7172$class_7178- named - net/minecraft/client/option/SimpleOption$Callbacks
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T>codec()getButtonCreator(SimpleOption.TooltipFactory<T> tooltipFactory, GameOptions gameOptions, int x, int y, int width) Returns the button creator.Returns the validated value.
- 
Method Details- 
getButtonCreatorFunction<SimpleOption<T>,ClickableWidget> getButtonCreator(SimpleOption.TooltipFactory<T> tooltipFactory, GameOptions gameOptions, int x, int y, int width) Returns the button creator.Button creators are responsible for rendering the option. - Returns:
- the button creator
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lefx$o;a(Lefx$l;Lefy;III)Ljava/util/function/Function;- intermediary - method_41756- Lnet/minecraft/class_7172$class_7178;method_41756(Lnet/minecraft/class_7172$class_7277;Lnet/minecraft/class_315;III)Ljava/util/function/Function;- named - getButtonCreator- Lnet/minecraft/client/option/SimpleOption$Callbacks;getButtonCreator(Lnet/minecraft/client/option/SimpleOption$TooltipFactory;Lnet/minecraft/client/option/GameOptions;III)Ljava/util/function/Function;
 
- 
validateReturns 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.- Returns:
- the validated value
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lefx$o;a(Ljava/lang/Object;)Ljava/util/Optional;- intermediary - method_41758- Lnet/minecraft/class_7172$class_7178;method_41758(Ljava/lang/Object;)Ljava/util/Optional;- named - validate- Lnet/minecraft/client/option/SimpleOption$Callbacks;validate(Ljava/lang/Object;)Ljava/util/Optional;
 
- 
codeccom.mojang.serialization.Codec<T> codec()- Mappings:
- Namespace - Name - Mixin selector - official - f- Lefx$o;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;
 
 
-