Package net.minecraft.client.option
Record Class SimpleOption.AlternateValuesSupportingCyclingCallbacks<T>
java.lang.Object
java.lang.Record
net.minecraft.client.option.SimpleOption.AlternateValuesSupportingCyclingCallbacks<T>
- Record Components:
values
-altValues
-altCondition
-valueSetter
-codec
-
- All Implemented Interfaces:
SimpleOption.Callbacks<T>
,SimpleOption.CyclingCallbacks<T>
- Enclosing class:
SimpleOption<T>
@Environment(CLIENT)
public static record SimpleOption.AlternateValuesSupportingCyclingCallbacks<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, SimpleOption.CyclingCallbacks.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec)
extends Record
implements SimpleOption.CyclingCallbacks<T>
A set of callbacks for a cycling option with alternate potential values that are used
only when certain conditions are met.
- See Also:
- Mappings:
Namespace Name named net/minecraft/client/option/SimpleOption$AlternateValuesSupportingCyclingCallbacks
intermediary net/minecraft/class_7172$class_7273
official ffj$a
named values
intermediary comp_671
official a
named altValues
intermediary comp_672
official b
named altCondition
intermediary comp_673
official c
named valueSetter
intermediary comp_674
official d
named codec
intermediary comp_675
official e
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.option.SimpleOption.CyclingCallbacks
SimpleOption.CyclingCallbacks.ValueSetter<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BooleanSupplier
The field for thealtCondition
record component.The field for thealtValues
record component.private final com.mojang.serialization.Codec
<T> The field for thecodec
record component.The field for thevalues
record component.private final SimpleOption.CyclingCallbacks.ValueSetter
<T> The field for thevalueSetter
record component. -
Constructor Summary
ConstructorDescriptionAlternateValuesSupportingCyclingCallbacks
(List<T> list, List<T> list2, BooleanSupplier booleanSupplier, SimpleOption.CyclingCallbacks.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealtCondition
record component.Returns the value of thealtValues
record component.com.mojang.serialization.Codec
<T> codec()
Returns the value of thecodec
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Returns the validated value.values()
Returns the value of thevalues
record component.Returns the value of thevalueSetter
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.client.option.SimpleOption.CyclingCallbacks
getWidgetCreator
-
Field Details
-
values
The field for thevalues
record component. -
altValues
The field for thealtValues
record component. -
altCondition
The field for thealtCondition
record component. -
valueSetter
The field for thevalueSetter
record component. -
codec
The field for thecodec
record component.
-
-
Constructor Details
-
AlternateValuesSupportingCyclingCallbacks
public AlternateValuesSupportingCyclingCallbacks(List<T> list, List<T> list2, BooleanSupplier booleanSupplier, SimpleOption.CyclingCallbacks.ValueSetter<T> valueSetter, com.mojang.serialization.Codec<T> codec)
-
-
Method Details
-
getValues
- Specified by:
getValues
in interfaceSimpleOption.CyclingCallbacks<T>
- 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
Lffj$d;a()Lfhm$c;
-
validate
Returns 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:
validate
in interfaceSimpleOption.Callbacks<T>
- Returns:
- the validated value
- Mappings:
Namespace Name Mixin selector named validate
Lnet/minecraft/client/option/SimpleOption$Callbacks;validate(Ljava/lang/Object;)Ljava/util/Optional;
intermediary method_41758
Lnet/minecraft/class_7172$class_7178;method_41758(Ljava/lang/Object;)Ljava/util/Optional;
official a
Lffj$n;a(Ljava/lang/Object;)Ljava/util/Optional;
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
values
Returns the value of thevalues
record component.- Returns:
- the value of the
values
record component
-
altValues
Returns the value of thealtValues
record component.- Returns:
- the value of the
altValues
record component
-
altCondition
Returns the value of thealtCondition
record component.- Returns:
- the value of the
altCondition
record component
-
valueSetter
Returns the value of thevalueSetter
record component.- Specified by:
valueSetter
in interfaceSimpleOption.CyclingCallbacks<T>
- Returns:
- the value of the
valueSetter
record component
-
codec
Returns the value of thecodec
record component.- Specified by:
codec
in interfaceSimpleOption.Callbacks<T>
- Returns:
- the value of the
codec
record component
-