Class ConfigScreens
java.lang.Object
net.ixdarklord.coolcatcore.api.config.client.ConfigScreens
Client only: the generated config screens. On NeoForge every mod with a config gets its screen in the mod list
automatically; elsewhere, open it from a button or key with these.
/coolcatlib_client config open [mod] [category]
opens them too.-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable net.minecraft.client.gui.screens.ScreencategoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, String modId, String path) categoryPopup(Screen, Config, String)for a mod's config named by the path's first part, e.g.static net.minecraft.client.gui.screens.ScreencategoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path) A small window with one category of a config: a group's settings, like the full screen's, with Save and Cancel.static net.minecraft.client.gui.screens.ScreencategoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path, ConfigTheme theme) categoryPopup(Screen, Config, String)drawn with its own theme instead of the config's, e.g.static net.minecraft.client.gui.screens.ScreencolorPicker(@Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, int color, boolean alpha, IntConsumer onDone) The color picker config screens use for colors, for any color a mod lets players choose.static @Nullable net.minecraft.client.gui.screens.ScreenThe main screen for a mod's configs: a card for each of them, even when there's only one.static net.minecraft.client.gui.screens.ScreenThe screen editing one config.static net.minecraft.client.gui.screens.ScreencreateModList(@Nullable net.minecraft.client.gui.screens.Screen parent) A screen listing every mod's configs.static booleanhasConfigs(String modId) static voidOpens a mod's config screen on top of the current screen.static voidopenCategory(String modId, String path) OpenscategoryPopup(Screen, String, String)over the current screen, or over the game.
-
Method Details
-
create
@Nullable public static @Nullable net.minecraft.client.gui.screens.Screen create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, String modId) The main screen for a mod's configs: a card for each of them, even when there's only one.- Returns:
- null when the mod registered no config
-
create
public static net.minecraft.client.gui.screens.Screen create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config) The screen editing one config. -
categoryPopup
public static net.minecraft.client.gui.screens.Screen categoryPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path) A small window with one category of a config: a group's settings, like the full screen's, with Save and Cancel. It floats overparent(or over the game when null). The path is the group's keys joined by/or., e.g."rendering/particles"; a single setting's path shows just that setting, and an empty path the whole config.- Throws:
IllegalArgumentException- when the config has nothing at the path
-
categoryPopup
public static net.minecraft.client.gui.screens.Screen categoryPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path, ConfigTheme theme) categoryPopup(Screen, Config, String)drawn with its own theme instead of the config's, e.g. to match the screen it's opened from (withConfigTheme.Builder.popupSpritefor the panel). -
categoryPopup
@Nullable public static @Nullable net.minecraft.client.gui.screens.Screen categoryPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, String modId, String path) categoryPopup(Screen, Config, String)for a mod's config named by the path's first part, e.g."client/example_category"for theexample_categorygroup of the mod'sclientconfig.- Returns:
- null when the mod has no such config or category
-
openCategory
OpenscategoryPopup(Screen, String, String)over the current screen, or over the game. -
createModList
public static net.minecraft.client.gui.screens.Screen createModList(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent) A screen listing every mod's configs. -
open
Opens a mod's config screen on top of the current screen. -
colorPicker
public static net.minecraft.client.gui.screens.Screen colorPicker(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, int color, boolean alpha, IntConsumer onDone) The color picker config screens use for colors, for any color a mod lets players choose. "Done" passes the picked color (ARGB; opaque unlessalpha) toonDone, then returns toparent. -
hasConfigs
-