public class Ukutils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static ConfigOption<java.lang.Boolean> |
createButton(int id,
java.lang.String text,
java.lang.Object value,
java.util.function.Consumer<net.minecraft.client.gui.Screen> callback)
Creates a
ConfigOption which acts as a simple button. |
static ConfigOption<java.lang.Boolean> |
createButton(int id,
java.lang.String text,
java.lang.String value,
java.util.function.Consumer<net.minecraft.client.gui.Screen> callback)
Creates a
ConfigOption which acts as a simple button. |
static ConfigOption<java.lang.Boolean> |
createOpenButton(int id,
java.lang.String text,
java.lang.Object value,
java.util.function.UnaryOperator<net.minecraft.client.gui.Screen> callback)
Creates a
ConfigOption which acts as a simple button. |
static ConfigOption<java.lang.Boolean> |
createOpenButton(int id,
java.lang.String text,
java.lang.String value,
java.util.function.UnaryOperator<net.minecraft.client.gui.Screen> callback)
Creates a
ConfigOption which acts as a simple button that opens a screen when clicked. |
public static ConfigOption<java.lang.Boolean> createButton(int id, java.lang.String text, java.lang.Object value, java.util.function.Consumer<net.minecraft.client.gui.Screen> callback)
ConfigOption which acts as a simple button.
Equivalent to createButton(key, Text.of(String.valueOf(value)), callback).text - The translation key of the button textvalue - The value to be displayed after the coloncallback - The action to be performed when the button is clickedcreateButton(int, String, String, Consumer)public static ConfigOption<java.lang.Boolean> createOpenButton(int id, java.lang.String text, java.lang.Object value, java.util.function.UnaryOperator<net.minecraft.client.gui.Screen> callback)
ConfigOption which acts as a simple button.
Equivalent to createOpenButton(key, Text.of(String.valueOf(value)), callback).text - The translation key of the button textvalue - The value to be displayed after the coloncallback - The getter for the screen to be opened when the button is clickedcreateButton(int, String, String, Consumer)public static ConfigOption<java.lang.Boolean> createButton(int id, java.lang.String text, java.lang.String value, java.util.function.Consumer<net.minecraft.client.gui.Screen> callback)
ConfigOption which acts as a simple button.text - The translation key of the button textvalue - The text to be displayed after the coloncallback - The action to be performed when the button is clickedpublic static ConfigOption<java.lang.Boolean> createOpenButton(int id, java.lang.String text, java.lang.String value, java.util.function.UnaryOperator<net.minecraft.client.gui.Screen> callback)
ConfigOption which acts as a simple button that opens a screen when clicked.text - The translation key of the button textvalue - The text to be displayed after the coloncallback - The getter for the screen to be opened when the button is clicked