Package net.minecraft.client
Record Class OptionInstance.AltEnum<T>
java.lang.Object
java.lang.Record
net.minecraft.client.OptionInstance.AltEnum<T>
- All Implemented Interfaces:
- OptionInstance.CycleableValueSet<T>,- OptionInstance.ValueSet<T>
- Enclosing class:
- OptionInstance<T>
public static record OptionInstance.AltEnum<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec)
extends Record
implements OptionInstance.CycleableValueSet<T>
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.OptionInstance.CycleableValueSetOptionInstance.CycleableValueSet.ValueSetter<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final BooleanSupplierThe field for thealtConditionrecord component.The field for thealtValuesrecord component.private final com.mojang.serialization.Codec<T>The field for thecodecrecord component.The field for thevaluesrecord component.private final OptionInstance.CycleableValueSet.ValueSetter<T>The field for thevalueSetterrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionAltEnum(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec) Creates an instance of aAltEnumrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thealtConditionrecord component.Returns the value of thealtValuesrecord component.com.mojang.serialization.Codec<T>codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.validateValue(T p_231570_) values()Returns the value of thevaluesrecord component.Returns the value of thevalueSetterrecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.OptionInstance.CycleableValueSetcreateButton
- 
Field Details- 
valuesThe field for thevaluesrecord component.
- 
altValuesThe field for thealtValuesrecord component.
- 
altConditionThe field for thealtConditionrecord component.
- 
valueSetterThe field for thevalueSetterrecord component.
- 
codecThe field for thecodecrecord component.
 
- 
- 
Constructor Details- 
AltEnumpublic AltEnum(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec) Creates an instance of aAltEnumrecord class.- Parameters:
- values- the value for the- valuesrecord component
- altValues- the value for the- altValuesrecord component
- altCondition- the value for the- altConditionrecord component
- valueSetter- the value for the- valueSetterrecord component
- codec- the value for the- codecrecord component
 
 
- 
- 
Method Details- 
valueListSupplier- Specified by:
- valueListSupplierin interface- OptionInstance.CycleableValueSet<T>
 
- 
validateValue- Specified by:
- validateValuein interface- OptionInstance.ValueSet<T>
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
valuesReturns the value of thevaluesrecord component.- Returns:
- the value of the valuesrecord component
 
- 
altValuesReturns the value of thealtValuesrecord component.- Returns:
- the value of the altValuesrecord component
 
- 
altConditionReturns the value of thealtConditionrecord component.- Returns:
- the value of the altConditionrecord component
 
- 
valueSetterReturns the value of thevalueSetterrecord component.- Specified by:
- valueSetterin interface- OptionInstance.CycleableValueSet<T>
- Returns:
- the value of the valueSetterrecord component
 
- 
codecReturns the value of thecodecrecord component.- Specified by:
- codecin interface- OptionInstance.ValueSet<T>
- Returns:
- the value of the codecrecord component
 
 
-