Interface ConfigScreenContent<T>


public interface ConfigScreenContent<T>
Interface that defines content for custom config editor screens.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Provides access to some screen operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buildGui(net.minecraft.client.gui.screens.Screen screen, ConfigScreenContent.ScreenManager manager, String search, Consumer<net.minecraft.client.gui.components.AbstractWidget> consumer)
    Builds the screen content.
    void
    init(Consumer<T> inputChanged)
    Initialises the screen.
    default net.minecraft.network.chat.Component
    Gets the message for the button that opens the screen.
    boolean
    Whether this screen is searchable
    net.minecraft.network.chat.Component
    Gets the title of the screen.
  • Method Details

    • title

      net.minecraft.network.chat.Component title()
      Gets the title of the screen.
    • message

      default net.minecraft.network.chat.Component message()
      Gets the message for the button that opens the screen.
    • searchable

      boolean searchable()
      Whether this screen is searchable
    • init

      void init(Consumer<T> inputChanged)
      Initialises the screen.
      Parameters:
      inputChanged - A consumer that should be called with the new value whenever the input changes.
    • buildGui

      void buildGui(net.minecraft.client.gui.screens.Screen screen, ConfigScreenContent.ScreenManager manager, String search, Consumer<net.minecraft.client.gui.components.AbstractWidget> consumer)
      Builds the screen content.
      Parameters:
      screen - The screen that is used. This can be used to get the available width. Height is unlimited because the screen is scrollable. Also, this must be used if the screen wants to draw tooltips, or they won't work correctly.
      manager - A ConfigScreenContent.ScreenManager that provides access to the internal screen history and can be used to rebuild the screen.
      search - The current search term or an empty String if there is none.
      consumer - A consumer that will consume all widgets that should be displayed.