Interface IConfigScreenBuilder


@NonExtendable public interface IConfigScreenBuilder
Customizes a config screen provided by the config GUI.
Since:
0.1.0
  • Method Details

    • setTitle

      IConfigScreenBuilder setTitle(net.minecraft.network.chat.Component title)
      Set the title shown at the top of the config screen.
      Parameters:
      title - the screen title
      Returns:
      this builder
      Since:
      0.1.0
    • clearDefaultCategories

      IConfigScreenBuilder clearDefaultCategories()
      Do not add automatically detected categories to this screen unless they are also configured here.

      Configured categories still keep their automatically detected values unless IConfigScreenCategoryBuilder.clearDefaultValues() is called for that category.

      Returns:
      this builder
      Since:
      0.1.0
    • addCategory

      Add a category in the order it should appear on the screen.

      Adding a category does not remove automatically detected categories. Call clearDefaultCategories() when the screen should only show configured categories. Values added to this category are appended to its automatically detected values unless IConfigScreenCategoryBuilder.clearDefaultValues() is called.

      The category title and description default to existing schema localization when the category already exists, or to the screen's inferred category localization path followed by . and name.

      Parameters:
      name - the stable category name
      Returns:
      the category builder
      Since:
      0.1.0
    • configureCategory

      IConfigScreenCategoryBuilder configureCategory(String name)
      Configure a category without forcing it into the ordered category list.

      If this matches an automatically detected category, the category keeps its automatically detected position and values. Values added to this category are appended to its automatically detected values unless IConfigScreenCategoryBuilder.clearDefaultValues() is called.

      The category title and description default to existing schema localization when the category already exists, or to the screen's inferred category localization path followed by . and name.

      Parameters:
      name - the stable category name
      Returns:
      the category builder
      Since:
      0.1.0