Interface ConfigEntrypoint.Context

Enclosing interface:
ConfigEntrypoint

public static interface ConfigEntrypoint.Context
Information about, and actions for, the mod whose entrypoint is being called. Meant to be used while ConfigEntrypoint.registerConfigs(Context) runs. A config registered after it returns logs a warning, and is ignored if OneConfig already fell back to extracting the original screen.
  • Method Summary

    Modifier and Type
    Method
    Description
    The id of the mod that provides this entrypoint
    void
    Replaces how the "open original" button opens this mod's original config screen.
    <T extends Config>
    T
    register(T config)
    Marks the config as belonging to this mod, so it gets the "open original" button.
  • Method Details

    • modId

      String modId()
      The id of the mod that provides this entrypoint
    • register

      <T extends Config> T register(T config)
      Marks the config as belonging to this mod, so it gets the "open original" button. Only needed for configs whose class is not in this mod, such as one from a library, whenever they were created
      Returns:
      the config, for chaining
    • originalScreen

      void originalScreen(Runnable opener)
      Replaces how the "open original" button opens this mod's original config screen. By default, it opens the screen the mod gives Mod Menu.