Interface Config

All Known Implementing Classes:
ConfigImpl

public interface Config
  • Method Details

    • builder

      static ConfigBuilder builder(String namespace)
      This is the entrypoint for starting to build a config and all its tabs, properties and widgets.
      Parameters:
      namespace - The namespace to identify the config. This should be your mod id.
      Returns:
      The config builder.
    • createTab

      ConfigTabBuilder createTab(String name)
      Creates a new tab for the config. Use this if you want to split your config into multiple tabs.
      Parameters:
      name - The name of the tab
      Returns:
      A new config tab builder
    • createDefaultTab

      ConfigTabBuilder createDefaultTab()
      Creates the default tab for the config. Use this if you don't want to use multiple tabs for your config. This will create the single default tab to which you can add all your properties.
      Returns:
      The default config tab builder
    • createScreen

      @Deprecated ConfigScreen createScreen(@Nullable @Nullable net.minecraft.client.gui.screen.Screen parent)
      Deprecated.
      Creates a screen for the config. Use this with MinecraftClient.setScreen(Screen) to show the config screen.
      Parameters:
      parent - The parent screen to return to when closing the config screen
      Returns:
      The config screen
    • save

      void save()
      Saves the config to a file using the Serializer defined in the config.
    • load

      void load()
      Loads the config from a file using the Serializer defined in the config.