Class ConfigScreens

java.lang.Object
net.ixdarklord.coolcatcore.api.config.client.ConfigScreens

public final class ConfigScreens extends Object
Client only: config screens for Core's configs. They come from Glazed Menu (a separate, client-side mod) when it's installed; without it, CoolCatLib's own simpler screens, in the style of its screen effects screen, stand in. The methods return null only when neither is there (on a dedicated server, or before the client started), and tellUnavailable(Config) tells the player how to change a config without screens.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    What makes the screens: Glazed Menu sets it as it starts, and CoolCatLib's own screens are the fallback.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable net.minecraft.client.gui.screens.Screen
    categoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, String modId, String path)
    A popup editing one category of a mod's configs, or null when it has none there or there are no screens.
    static @Nullable net.minecraft.client.gui.screens.Screen
    categoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path)
    A popup editing one category of a config (its path, like "client.visuals"), or null without screens.
    static @Nullable net.minecraft.client.gui.screens.Screen
    categoryPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path, ConfigTheme theme)
    static @Nullable net.minecraft.client.gui.screens.Screen
    colorPicker(@Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, int color, boolean alpha, IntConsumer onDone)
    A color picker in the screens' style, or null without screens.
    static @Nullable net.minecraft.client.gui.screens.Screen
    create(@Nullable net.minecraft.client.gui.screens.Screen parent, String modId)
    The mod's config screen (its configs' list, or the one config), or null when it has none or there are no screens.
    static @Nullable net.minecraft.client.gui.screens.Screen
    create(@Nullable net.minecraft.client.gui.screens.Screen parent, Config config)
    The screen editing one config, or null without screens.
    static @Nullable net.minecraft.client.gui.screens.Screen
    createModList(@Nullable net.minecraft.client.gui.screens.Screen parent)
    A screen listing every mod's configs, or null without screens.
    static boolean
    Whether the mod has configs the screens can show; false without screens.
    static boolean
    Whether there are config screens: Glazed Menu's or CoolCatLib's own.
    static boolean
    Whether the screens are Glazed Menu's rather than CoolCatLib's simpler ones.
    static void
    open(String modId)
    Opens a mod's config screen on top of the current screen; nothing without screens.
    static void
    openCategory(String modId, String path)
    Opens categoryPopup(Screen, String, String) over the current screen; nothing without screens.
    static void
    CoolCatLib's own screens, used while no provider is set.
    static void
     
    static void
    Puts unavailableMessage(Config) in the player's chat.
    static net.minecraft.network.chat.Component
    Without screens: what to tell the player who wants to change the config in game.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • setProvider

      @Internal public static void setProvider(ConfigScreens.Provider screens)
    • setFallback

      @Internal public static void setFallback(ConfigScreens.Provider screens)
      CoolCatLib's own screens, used while no provider is set.
    • isAvailable

      public static boolean isAvailable()
      Whether there are config screens: Glazed Menu's or CoolCatLib's own.
    • isGlazedMenu

      public static boolean isGlazedMenu()
      Whether the screens are Glazed Menu's rather than CoolCatLib's simpler ones.
    • create

      @Nullable public static @Nullable net.minecraft.client.gui.screens.Screen create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, String modId)
      The mod's config screen (its configs' list, or the one config), or null when it has none or there are no screens.
    • create

      @Nullable public static @Nullable net.minecraft.client.gui.screens.Screen create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config)
      The screen editing one config, or null without screens.
    • categoryPopup

      @Nullable public static @Nullable net.minecraft.client.gui.screens.Screen categoryPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path)
      A popup editing one category of a config (its path, like "client.visuals"), or null without screens.
    • categoryPopup

      @Nullable public static @Nullable net.minecraft.client.gui.screens.Screen categoryPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, Config config, String path, ConfigTheme theme)
    • 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)
      A popup editing one category of a mod's configs, or null when it has none there or there are no screens.
    • openCategory

      public static void openCategory(String modId, String path)
      Opens categoryPopup(Screen, String, String) over the current screen; nothing without screens.
    • createModList

      @Nullable public static @Nullable net.minecraft.client.gui.screens.Screen createModList(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent)
      A screen listing every mod's configs, or null without screens.
    • open

      public static void open(String modId)
      Opens a mod's config screen on top of the current screen; nothing without screens.
    • colorPicker

      @Nullable public static @Nullable 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)
      A color picker in the screens' style, or null without screens.
    • hasConfigs

      public static boolean hasConfigs(String modId)
      Whether the mod has configs the screens can show; false without screens.
    • unavailableMessage

      public static net.minecraft.network.chat.Component unavailableMessage(Config config)
      Without screens: what to tell the player who wants to change the config in game. Install Glazed Menu, or edit the config's file, which they can click to open its folder.
    • tellUnavailable

      public static void tellUnavailable(Config config)
      Puts unavailableMessage(Config) in the player's chat.