Interface IConfigGuiPlugin


public interface IConfigGuiPlugin
Plugin for registering or customizing a config screen.

Use IConfigGuiRegistration.registerScreen(net.minecraft.network.chat.Component, java.util.function.Supplier<? extends net.mezzdev.config.api.schema.IConfigSchema>) to provide a full screen from a schema. Use IConfigGuiRegistration.configureScreen(java.util.function.Consumer<net.mezzdev.config.gui.api.IConfigScreenBuilder>) to customize a screen that the config GUI detects from a platform-native config system. Custom value editors can also be registered here.

Forge and NeoForge plugins are discovered by scanning for the ConfigGuiPlugin annotation. Annotate your plugin class and provide a constructor with no arguments.

Fabric plugins are discovered from fabric.mod.json. Add your plugin class to the mezz_config_gui_plugin entrypoint.

A shared plugin class can support all loaders by using the annotation and registering the same class as the Fabric entrypoint.

Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    The mod id that owns these config GUI registrations.
    void
    Register config GUI customizations for this mod.
  • Method Details

    • getModId

      String getModId()
      The mod id that owns these config GUI registrations.
      Since:
      0.1.0
    • register

      void register(IConfigGuiRegistration registration)
      Register config GUI customizations for this mod.
      Parameters:
      registration - the config GUI registration
      Since:
      0.1.0