Interface IConfigGuiPlugin
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 TypeMethodDescriptiongetModId()The mod id that owns these config GUI registrations.default voidonScreenFactoryAvailable(IConfigScreenFactory screenFactory) Receive this mod's config screen factory once, after all plugins have registered.voidregister(IConfigGuiRegistration registration) 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
Register config GUI customizations for this mod.- Parameters:
registration- the config GUI registration- Since:
- 0.1.0
-
onScreenFactoryAvailable
Receive this mod's config screen factory once, after all plugins have registered. Only called during client setup if this mod has a config screen.Store the factory and use it later on the client thread to create and display a screen.
- Parameters:
screenFactory- creates this mod's config screen- Since:
- 0.5.9
-