Package net.minecraft.client.option
Record Class SimpleOption.MaxSuppliableIntCallbacks
java.lang.Object
java.lang.Record
net.minecraft.client.option.SimpleOption.MaxSuppliableIntCallbacks
- Record Components:
- minInclusive-
- maxSupplier-
- encodableMaxInclusive-
- All Implemented Interfaces:
- SimpleOption.Callbacks<Integer>,- SimpleOption.CyclingCallbacks<Integer>,- SimpleOption.IntSliderCallbacks,- SimpleOption.SliderCallbacks<Integer>,- SimpleOption.TypeChangeableCallbacks<Integer>
- Enclosing class:
- SimpleOption<T>
@Environment(CLIENT)
public static record SimpleOption.MaxSuppliableIntCallbacks(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive)
extends Record
implements SimpleOption.IntSliderCallbacks, SimpleOption.TypeChangeableCallbacks<Integer>
A set of callbacks for a cycling option with a fixed minimum value and a dynamic
 maximum value. This clamps the value during validation.
- See Also:
- Mappings:
- Namespace - Name - named - net/minecraft/client/option/SimpleOption$MaxSuppliableIntCallbacks- intermediary - net/minecraft/class_7172$class_7304- official - fln$c- named - minInclusive- intermediary - comp_593- official - a- named - maxSupplier- intermediary - comp_690- official - b- named - encodableMaxInclusive- intermediary - comp_1316- official - c
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.option.SimpleOption.CyclingCallbacksSimpleOption.CyclingCallbacks.ValueSetter<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for theencodableMaxInclusiverecord component.private final IntSupplierThe field for themaxSupplierrecord component.private final intThe field for theminInclusiverecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer> codec()intReturns the value of theencodableMaxInclusiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanintReturns the value of themaxSupplierrecord 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.option.SimpleOption.CyclingCallbacksvalueSetterMethods inherited from interface net.minecraft.client.option.SimpleOption.IntSliderCallbackstoSliderProgress, toValue, withModifierMethods inherited from interface net.minecraft.client.option.SimpleOption.SliderCallbacksapplyValueImmediately, getWidgetCreatorMethods inherited from interface net.minecraft.client.option.SimpleOption.TypeChangeableCallbacksgetWidgetCreator
- 
Field Details- 
minInclusiveprivate final int minInclusiveThe field for theminInclusiverecord component.
- 
maxSupplierThe field for themaxSupplierrecord component.
- 
encodableMaxInclusiveprivate final int encodableMaxInclusiveThe field for theencodableMaxInclusiverecord component.
 
- 
- 
Constructor Details- 
MaxSuppliableIntCallbacks
 
- 
- 
Method Details- 
validateDescription 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 interface- SimpleOption.Callbacks<Integer>
- Returns:
- the validated value
- Mappings:
- Namespace - Name - Mixin selector - named - validate- Lnet/minecraft/client/option/SimpleOption$MaxSuppliableIntCallbacks;validate(Ljava/lang/Integer;)Ljava/util/Optional;- intermediary - method_42408- Lnet/minecraft/class_7172$class_7304;method_42408(Ljava/lang/Integer;)Ljava/util/Optional;- official - a- Lfln$c;a(Ljava/lang/Integer;)Ljava/util/Optional;
 
- 
maxInclusivepublic int maxInclusive()- Specified by:
- maxInclusivein interface- SimpleOption.IntSliderCallbacks
- Mappings:
- Namespace - Name - Mixin selector - named - maxInclusive- Lnet/minecraft/client/option/SimpleOption$IntSliderCallbacks;maxInclusive()I- intermediary - comp_594- Lnet/minecraft/class_7172$class_7275;comp_594()I- official - b- Lfln$g;b()I
 
- 
codec- Specified by:
- codecin interface- SimpleOption.Callbacks<Integer>
- 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- Lfln$n;f()Lcom/mojang/serialization/Codec;
 
- 
isCyclingpublic boolean isCycling()- Specified by:
- isCyclingin interface- SimpleOption.TypeChangeableCallbacks<Integer>
- Mappings:
- Namespace - Name - Mixin selector - named - isCycling- Lnet/minecraft/client/option/SimpleOption$TypeChangeableCallbacks;isCycling()Z- intermediary - method_42722- Lnet/minecraft/class_7172$class_7306;method_42722()Z- official - c- Lfln$j;c()Z
 
- 
getValues- Specified by:
- getValuesin interface- SimpleOption.CyclingCallbacks<Integer>
- Mappings:
- Namespace - Name - Mixin selector - named - getValues- Lnet/minecraft/client/option/SimpleOption$CyclingCallbacks;getValues()Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Values;- intermediary - method_42721- Lnet/minecraft/class_7172$class_7305;method_42721()Lnet/minecraft/class_5676$class_5680;- official - a- Lfln$d;a()Lfpb$c;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
minInclusivepublic int minInclusive()Returns the value of theminInclusiverecord component.- Specified by:
- minInclusivein interface- SimpleOption.IntSliderCallbacks
- Returns:
- the value of the minInclusiverecord component
 
- 
maxSupplierReturns the value of themaxSupplierrecord component.- Returns:
- the value of the maxSupplierrecord component
 
- 
encodableMaxInclusivepublic int encodableMaxInclusive()Returns the value of theencodableMaxInclusiverecord component.- Returns:
- the value of the encodableMaxInclusiverecord component
 
 
-