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)
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 IntSupplierThe field for themaxSupplierrecord component.private final intThe field for theminInclusiverecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier) Creates an instance of aClampingLazyMaxIntRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer>codec()booleanfinal 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
createButton
-
Field Details
-
minInclusive
private final int minInclusiveThe field for theminInclusiverecord component. -
maxSupplier
The field for themaxSupplierrecord component.
-
-
Constructor Details
-
ClampingLazyMaxIntRange
Creates an instance of aClampingLazyMaxIntRangerecord class.- Parameters:
minInclusive- the value for theminInclusiverecord componentmaxSupplier- the value for themaxSupplierrecord 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>
-
minInclusive
public int minInclusive()Returns the value of theminInclusiverecord component.- Specified by:
minInclusivein interfaceOptionInstance.IntRangeBase- Returns:
- the value of the
minInclusiverecord component
-
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 '=='. -
maxSupplier
Returns the value of themaxSupplierrecord component.- Returns:
- the value of the
maxSupplierrecord component
-