Package net.minecraft.client
Class OptionInstance<T>
java.lang.Object
net.minecraft.client.OptionInstance<T>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static interface
static final record
(package private) static interface
static final record
static final record
(package private) static interface
static final record
(package private) static final class
(package private) static interface
(package private) static interface
static interface
static enum
(package private) static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final OptionInstance.CaptionBasedToString<Boolean>
static final OptionInstance.Enum<Boolean>
(package private) final Component
private final com.mojang.serialization.Codec<T>
private final T
private static final org.slf4j.Logger
private final OptionInstance.TooltipSupplier<T>
(package private) T
private final OptionInstance.ValueSet<T>
-
Constructor Summary
ConstructorDescriptionOptionInstance
(String p_259964_, OptionInstance.TooltipSupplier<T> p_260354_, OptionInstance.CaptionBasedToString<T> p_259496_, OptionInstance.ValueSet<T> p_259090_, com.mojang.serialization.Codec<T> p_259043_, T p_259396_, Consumer<T> p_260147_) OptionInstance
(String p_260248_, OptionInstance.TooltipSupplier<T> p_259437_, OptionInstance.CaptionBasedToString<T> p_259148_, OptionInstance.ValueSet<T> p_259590_, T p_260067_, Consumer<T> p_259392_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> OptionInstance.TooltipSupplier<T>
cachedConstantTooltip
(Component p_231536_) com.mojang.serialization.Codec<T>
codec()
static OptionInstance<Boolean>
createBoolean
(String p_231526_, boolean p_231527_) static OptionInstance<Boolean>
createBoolean
(String p_231529_, boolean p_231530_, Consumer<Boolean> p_231531_) static OptionInstance<Boolean>
createBoolean
(String p_259291_, OptionInstance.TooltipSupplier<Boolean> p_260306_, boolean p_259985_) static OptionInstance<Boolean>
createBoolean
(String p_259289_, OptionInstance.TooltipSupplier<Boolean> p_260210_, boolean p_259359_, Consumer<Boolean> p_259975_) static OptionInstance<Boolean>
createBoolean
(String p_262002_, OptionInstance.TooltipSupplier<Boolean> p_261507_, OptionInstance.CaptionBasedToString<Boolean> p_262099_, boolean p_262136_, Consumer<Boolean> p_261984_) createButton
(Options p_231508_, int p_231509_, int p_231510_, int p_231511_) createButton
(Options p_261971_, int p_261486_, int p_261569_, int p_261677_, Consumer<T> p_261912_) static <T extends OptionEnum>
OptionInstance.CaptionBasedToString<T>get()
static <T> OptionInstance.TooltipSupplier<T>
void
toString()
values()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
BOOLEAN_VALUES
-
BOOLEAN_TO_STRING
-
tooltip
-
toString
-
values
-
codec
-
initialValue
-
onValueUpdate
-
value
T value
-
-
Constructor Details
-
OptionInstance
public OptionInstance(String p_260248_, OptionInstance.TooltipSupplier<T> p_259437_, OptionInstance.CaptionBasedToString<T> p_259148_, OptionInstance.ValueSet<T> p_259590_, T p_260067_, Consumer<T> p_259392_) -
OptionInstance
public OptionInstance(String p_259964_, OptionInstance.TooltipSupplier<T> p_260354_, OptionInstance.CaptionBasedToString<T> p_259496_, OptionInstance.ValueSet<T> p_259090_, com.mojang.serialization.Codec<T> p_259043_, T p_259396_, Consumer<T> p_260147_)
-
-
Method Details
-
createBoolean
public static OptionInstance<Boolean> createBoolean(String p_231529_, boolean p_231530_, Consumer<Boolean> p_231531_) -
createBoolean
-
createBoolean
public static OptionInstance<Boolean> createBoolean(String p_259291_, OptionInstance.TooltipSupplier<Boolean> p_260306_, boolean p_259985_) -
createBoolean
public static OptionInstance<Boolean> createBoolean(String p_259289_, OptionInstance.TooltipSupplier<Boolean> p_260210_, boolean p_259359_, Consumer<Boolean> p_259975_) -
createBoolean
public static OptionInstance<Boolean> createBoolean(String p_262002_, OptionInstance.TooltipSupplier<Boolean> p_261507_, OptionInstance.CaptionBasedToString<Boolean> p_262099_, boolean p_262136_, Consumer<Boolean> p_261984_) -
noTooltip
-
cachedConstantTooltip
-
forOptionEnum
-
createButton
-
createButton
public AbstractWidget createButton(Options p_261971_, int p_261486_, int p_261569_, int p_261677_, Consumer<T> p_261912_) -
get
-
codec
-
toString
-
set
-
values
-