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 interface
static enum
(package private) static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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.TooltipSupplierFactory<T>
private static final int
(package private) T
private final OptionInstance.ValueSet<T>
-
Constructor Summary
ConstructorDescriptionOptionInstance
(String p_231484_, OptionInstance.TooltipSupplierFactory<T> p_231485_, OptionInstance.CaptionBasedToString<T> p_231486_, OptionInstance.ValueSet<T> p_231487_, com.mojang.serialization.Codec<T> p_231488_, T p_231489_, Consumer<T> p_231490_) OptionInstance
(String p_231492_, OptionInstance.TooltipSupplierFactory<T> p_231493_, OptionInstance.CaptionBasedToString<T> p_231494_, OptionInstance.ValueSet<T> p_231495_, T p_231496_, Consumer<T> p_231497_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> OptionInstance.TooltipSupplierFactory<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_231517_, OptionInstance.TooltipSupplierFactory<Boolean> p_231518_, boolean p_231519_) static OptionInstance<Boolean>
createBoolean
(String p_231521_, OptionInstance.TooltipSupplierFactory<Boolean> p_231522_, boolean p_231523_, Consumer<Boolean> p_231524_) createButton
(Options p_231508_, int p_231509_, int p_231510_, int p_231511_) static <T extends OptionEnum>
OptionInstance.CaptionBasedToString<T>get()
static <T> OptionInstance.TooltipSupplierFactory<T>
void
protected static List<FormattedCharSequence>
splitTooltip
(Minecraft p_231502_, Component p_231503_) toString()
values()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
BOOLEAN_VALUES
-
TOOLTIP_WIDTH
private static final int TOOLTIP_WIDTH- See Also:
-
tooltip
-
toString
-
values
-
codec
-
initialValue
-
onValueUpdate
-
value
T value
-
-
Constructor Details
-
OptionInstance
public OptionInstance(String p_231492_, OptionInstance.TooltipSupplierFactory<T> p_231493_, OptionInstance.CaptionBasedToString<T> p_231494_, OptionInstance.ValueSet<T> p_231495_, T p_231496_, Consumer<T> p_231497_) -
OptionInstance
public OptionInstance(String p_231484_, OptionInstance.TooltipSupplierFactory<T> p_231485_, OptionInstance.CaptionBasedToString<T> p_231486_, OptionInstance.ValueSet<T> p_231487_, com.mojang.serialization.Codec<T> p_231488_, T p_231489_, Consumer<T> p_231490_)
-
-
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_231517_, OptionInstance.TooltipSupplierFactory<Boolean> p_231518_, boolean p_231519_) -
createBoolean
public static OptionInstance<Boolean> createBoolean(String p_231521_, OptionInstance.TooltipSupplierFactory<Boolean> p_231522_, boolean p_231523_, Consumer<Boolean> p_231524_) -
noTooltip
-
cachedConstantTooltip
public static <T> OptionInstance.TooltipSupplierFactory<T> cachedConstantTooltip(Component p_231536_) -
forOptionEnum
-
splitTooltip
-
createButton
-
get
-
codec
-
toString
-
set
-
values
-