Record Class OptionInstance.SliderableEnum<T>
java.lang.Object
java.lang.Record
net.minecraft.client.OptionInstance.SliderableEnum<T>
- All Implemented Interfaces:
OptionInstance.SliderableValueSet<T>, OptionInstance.ValueSet<T>
- Enclosing class:
OptionInstance<T>
public static record OptionInstance.SliderableEnum<T>(List<T> values, com.mojang.serialization.Codec<T> codec)
extends Record
implements OptionInstance.SliderableValueSet<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSliderableEnum(List<T> values, com.mojang.serialization.Codec<T> codec) Creates an instance of aSliderableEnumrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.fromSliderValue(double slider) final inthashCode()Returns a hash code value for this object.doubletoSliderValue(T value) final StringtoString()Returns a string representation of this record class.validateValue(T value) values()Returns the value of thevaluesrecord component.Methods inherited from interface OptionInstance.SliderableValueSet
applyValueImmediately, createButton
-
Field Details
-
values
-
codec
The field for thecodecrecord component.
-
-
Constructor Details
-
SliderableEnum
-
-
Method Details
-
toSliderValue
- Specified by:
toSliderValuein interfaceOptionInstance.SliderableValueSet<T>
-
next
-
previous
-
fromSliderValue
- Specified by:
fromSliderValuein interfaceOptionInstance.SliderableValueSet<T>
-
validateValue
- Specified by:
validateValuein interfaceOptionInstance.ValueSet<T>
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
values
-
codec
Returns the value of thecodecrecord component.- Specified by:
codecin interfaceOptionInstance.ValueSet<T>- Returns:
- the value of the
codecrecord component
-