Package net.minecraft.client
Record Class OptionInstance.ClampingLazyMaxIntRange
java.lang.Object
java.lang.Record
net.minecraft.client.OptionInstance.ClampingLazyMaxIntRange
- All Implemented Interfaces:
OptionInstance.CycleableValueSet<Integer>,OptionInstance.IntRangeBase,OptionInstance.SliderableOrCyclableValueSet<Integer>,OptionInstance.SliderableValueSet<Integer>,OptionInstance.ValueSet<Integer>
- Enclosing class:
OptionInstance<T>
public static record OptionInstance.ClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive)
extends Record
implements OptionInstance.IntRangeBase, OptionInstance.SliderableOrCyclableValueSet<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.OptionInstance.CycleableValueSet
OptionInstance.CycleableValueSet.ValueSetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theencodableMaxInclusiverecord component.private final IntSupplierThe field for themaxSupplierrecord component.private final intThe field for theminInclusiverecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive) Creates an instance of aClampingLazyMaxIntRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer> codec()booleanintReturns 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.intReturns the value of themaxSupplierrecord component.intReturns the value of theminInclusiverecord component.final StringtoString()Returns a string representation of this record class.validateValue(Integer p_231590_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.OptionInstance.CycleableValueSet
valueSetterMethods inherited from interface net.minecraft.client.OptionInstance.IntRangeBase
fromSliderValue, toSliderValue, xmapMethods inherited from interface net.minecraft.client.OptionInstance.SliderableOrCyclableValueSet
createButtonMethods inherited from interface net.minecraft.client.OptionInstance.SliderableValueSet
applyValueImmediately, createButton
-
Field Details
-
minInclusive
private final int minInclusiveThe field for theminInclusiverecord component. -
maxSupplier
The field for themaxSupplierrecord component. -
encodableMaxInclusive
private final int encodableMaxInclusiveThe field for theencodableMaxInclusiverecord component.
-
-
Constructor Details
-
ClampingLazyMaxIntRange
public ClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive) Creates an instance of aClampingLazyMaxIntRangerecord class.- Parameters:
minInclusive- the value for theminInclusiverecord componentmaxSupplier- the value for themaxSupplierrecord componentencodableMaxInclusive- the value for theencodableMaxInclusiverecord component
-
-
Method Details
-
validateValue
- Specified by:
validateValuein interfaceOptionInstance.ValueSet<Integer>
-
maxInclusive
public int maxInclusive()- Specified by:
maxInclusivein interfaceOptionInstance.IntRangeBase
-
codec
- Specified by:
codecin interfaceOptionInstance.ValueSet<Integer>
-
createCycleButton
public boolean createCycleButton()- Specified by:
createCycleButtonin interfaceOptionInstance.SliderableOrCyclableValueSet<Integer>
-
valueListSupplier
- Specified by:
valueListSupplierin interfaceOptionInstance.CycleableValueSet<Integer>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
minInclusive
public int minInclusive()Returns the value of theminInclusiverecord component.- Specified by:
minInclusivein interfaceOptionInstance.IntRangeBase- Returns:
- the value of the
minInclusiverecord component
-
maxSupplier
Returns the value of themaxSupplierrecord component.- Returns:
- the value of the
maxSupplierrecord component
-
encodableMaxInclusive
public int encodableMaxInclusive()Returns the value of theencodableMaxInclusiverecord component.- Returns:
- the value of the
encodableMaxInclusiverecord component
-