Interface IConfigGuiRegistration
@NonExtendable
public interface IConfigGuiRegistration
Registration for config GUI customizations provided by one config GUI plugin.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureScreen(Consumer<IConfigScreenBuilder> screenBuilderConsumer) Customize the config screen for this mod.Get helper factories for config values backed by sortable runtime lists.voidregisterScreen(net.minecraft.network.chat.Component title, Supplier<? extends net.mezzdev.config.api.schema.IConfigSchema> schemaSupplier) Register a config screen.<T> voidregisterValueEditor(ConfigValueEditorType<T> editorType, IConfigValueEditorFactory<T> editorFactory) Register a custom value editor for config values that return the matching editor type.
-
Method Details
-
registerValueEditor
<T> void registerValueEditor(ConfigValueEditorType<T> editorType, IConfigValueEditorFactory<T> editorFactory) Register a custom value editor for config values that return the matching editor type.- Type Parameters:
T- the config value type edited by this control- Parameters:
editorType- the config value editor type to handleeditorFactory- creates custom value editors- Since:
- 0.1.0
-
getSortableConfigValueFactory
ISortableConfigValueFactory getSortableConfigValueFactory()Get helper factories for config values backed by sortable runtime lists.Prefer adding sorting configs directly with
IConfigScreenCategoryBuilder.addSortingConfig(String, String, net.mezzdev.config.api.sorting.ISortingConfig, java.util.Collection, net.mezzdev.config.api.value.serializer.IConfigValueSerializer)orIConfigScreenCategoryBuilder.addStringSortingConfig(String, String, net.mezzdev.config.api.sorting.ISortingConfig, java.util.Collection)when customizing a screen category. This helper remains for callers that still need to create a screen value explicitly.- Returns:
- helper factories for sortable runtime list values
- Since:
- 0.1.0
-
configureScreen
Customize the config screen for this mod.This can be used with a screen registered through
registerScreen(Component, Supplier)or with a screen automatically detected by the config GUI from a platform-native config system. This method does not create a screen on its own.- Parameters:
screenBuilderConsumer- receives the screen builder- Since:
- 0.1.0
-
registerScreen
void registerScreen(net.minecraft.network.chat.Component title, Supplier<? extends net.mezzdev.config.api.schema.IConfigSchema> schemaSupplier) Register a config screen.- Parameters:
title- the title shown at the top of the config screenschemaSupplier- supplies the config schema each time the screen is opened- Since:
- 0.1.0
-