Interface IConfigScreenCategoryBuilder
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionaddKeyMapping(net.minecraft.client.KeyMapping keyMapping) Add one key mapping to this category.addKeyMappings(Collection<? extends net.minecraft.client.KeyMapping> keyMappings) Add key mappings to this category.addScreenValue(IConfigScreenValue<?> value) Add one config screen value to this category.addScreenValues(Collection<? extends IConfigScreenValue<?>> values) Add config screen values to this category.<T> ISortingConfigGuiBuilder<T>addSortingConfig(String name, String localizationKey, net.mezzdev.config.api.sorting.ISortingConfig<T> sortingConfig, Collection<T> values, net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> valueSerializer) Add a GUI list editor for a MezzConfig sorting config.addStringSortingConfig(String name, String localizationKey, net.mezzdev.config.api.sorting.ISortingConfig<String> sortingConfig, Collection<String> values) Add a GUI list editor for a string-backed MezzConfig sorting config.addValue(net.mezzdev.config.api.value.IConfigValue<?> value) Add one config value to this category.addValueByName(String valueName) Add one config screen value to this category by stable name.addValues(Collection<? extends net.mezzdev.config.api.value.IConfigValue<?>> values) Add config values to this category.addValuesByName(Collection<String> valueNames) Add config screen values to this category by stable name.Remove this category's automatically detected values from the screen.getScreenValueBuilder(IConfigScreenValue<?> value) Get a builder for configuring one config screen value in this category.getValueBuilder(net.mezzdev.config.api.value.IConfigValue<?> value) Get a builder for configuring one config value in this category.getValueBuilderByName(String valueName) Get a builder for configuring one config screen value in this category by stable name.hideScreenValue(IConfigScreenValue<?> value) Hide one config screen value from this category.hideScreenValues(Collection<? extends IConfigScreenValue<?>> values) Hide config screen values from this category.hideValue(net.mezzdev.config.api.value.IConfigValue<?> value) Hide one schema config value from this category.hideValueByName(String valueName) Hide one config screen value from this category by stable name.hideValues(Collection<? extends net.mezzdev.config.api.value.IConfigValue<?>> values) Hide schema config values from this category.hideValuesByName(Collection<String> valueNames) Hide config screen values from this category by stable name.setDefaultApplyMode(ConfigValueApplyMode applyMode) Set the default apply mode for config screen values in this category.setDescription(net.minecraft.network.chat.Component description) Override the description shown for this category.setScreenValueApplyMode(IConfigScreenValue<?> value, ConfigValueApplyMode applyMode) Set the apply mode for one config screen value in this category.setScreenValueRestartRequirement(IConfigScreenValue<?> value, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config screen value in this category is saved.setTitle(net.minecraft.network.chat.Component title) Override the title shown for this category.setValueApplyMode(net.mezzdev.config.api.value.IConfigValue<?> value, ConfigValueApplyMode applyMode) Set the apply mode for one config value in this category.setValueApplyModeByName(String valueName, ConfigValueApplyMode applyMode) Set the apply mode for one config screen value in this category by stable name.setValueRestartRequirement(net.mezzdev.config.api.value.IConfigValue<?> value, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config value in this category is saved.setValueRestartRequirementByName(String valueName, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config screen value in this category is saved, selected by stable name.
-
Method Details
-
setTitle
Override the title shown for this category.If this is not called, the config GUI uses the existing schema category title or the default category localization key.
- Parameters:
title- category title- Returns:
- this builder
- Since:
- 0.1.0
-
setDescription
Override the description shown for this category.If this is not called, the config GUI uses the existing schema category description or the default category description localization key.
- Parameters:
description- category description- Returns:
- this builder
- Since:
- 0.1.0
-
clearDefaultValues
IConfigScreenCategoryBuilder clearDefaultValues()Remove this category's automatically detected values from the screen.Values added with this builder are still shown. Use this when a category should be manually populated instead of appending to its automatically detected values.
- Returns:
- this builder
- Since:
- 0.1.0
-
setDefaultApplyMode
Set the default apply mode for config screen values in this category.Individual values can override this with
getValueBuilder(IConfigValue),getScreenValueBuilder(IConfigScreenValue), orgetValueBuilderByName(String).- Parameters:
applyMode- when edits for this category's values are saved- Returns:
- this builder
- Since:
- 0.1.0
-
getValueBuilder
Get a builder for configuring one config value in this category.- Parameters:
value- config value to configure- Returns:
- value builder
- Since:
- 0.1.0
-
getScreenValueBuilder
Get a builder for configuring one config screen value in this category.- Parameters:
value- config screen value to configure- Returns:
- value builder
- Since:
- 0.1.0
-
getValueBuilderByName
Get a builder for configuring one config screen value in this category by stable name.The value name is resolved against this category first, so category-local value names can be used safely when multiple categories contain the same value name.
- Parameters:
valueName- stable config screen value name- Returns:
- value builder
- Since:
- 0.1.0
-
setValueApplyMode
IConfigScreenCategoryBuilder setValueApplyMode(net.mezzdev.config.api.value.IConfigValue<?> value, ConfigValueApplyMode applyMode) Set the apply mode for one config value in this category.Equivalent to
getValueBuilder(value).setApplyMode(applyMode).- Parameters:
value- config value to configureapplyMode- when edits for this value are saved- Returns:
- this builder
- Since:
- 0.1.0
-
setScreenValueApplyMode
IConfigScreenCategoryBuilder setScreenValueApplyMode(IConfigScreenValue<?> value, ConfigValueApplyMode applyMode) Set the apply mode for one config screen value in this category.Equivalent to
getScreenValueBuilder(value).setApplyMode(applyMode).- Parameters:
value- config screen value to configureapplyMode- when edits for this value are saved- Returns:
- this builder
- Since:
- 0.1.0
-
setValueApplyModeByName
IConfigScreenCategoryBuilder setValueApplyModeByName(String valueName, ConfigValueApplyMode applyMode) Set the apply mode for one config screen value in this category by stable name.Equivalent to
getValueBuilderByName(valueName).setApplyMode(applyMode).This is useful for screen values that do not have a MezzConfig
IConfigValuebacking object, such as platform-native config values adapted for the config GUI.- Parameters:
valueName- stable config screen value nameapplyMode- when edits for this value are saved- Returns:
- this builder
- Since:
- 0.1.0
-
setValueRestartRequirement
IConfigScreenCategoryBuilder setValueRestartRequirement(net.mezzdev.config.api.value.IConfigValue<?> value, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config value in this category is saved.- Parameters:
value- config value to configurerestartRequirement- the required restart or reload- Returns:
- this builder
- Since:
- 0.1.0
-
setScreenValueRestartRequirement
IConfigScreenCategoryBuilder setScreenValueRestartRequirement(IConfigScreenValue<?> value, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config screen value in this category is saved.- Parameters:
value- config screen value to configurerestartRequirement- the required restart or reload- Returns:
- this builder
- Since:
- 0.1.0
-
setValueRestartRequirementByName
IConfigScreenCategoryBuilder setValueRestartRequirementByName(String valueName, net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after one config screen value in this category is saved, selected by stable name.- Parameters:
valueName- stable config screen value namerestartRequirement- the required restart or reload- Returns:
- this builder
- Since:
- 0.1.0
-
addValue
Add one config value to this category.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values.- Parameters:
value- config value to display- Returns:
- this builder
- Since:
- 0.1.0
-
addScreenValue
Add one config screen value to this category.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values.- Parameters:
value- config screen value to display- Returns:
- this builder
- Since:
- 0.1.0
-
addValues
IConfigScreenCategoryBuilder addValues(Collection<? extends net.mezzdev.config.api.value.IConfigValue<?>> values) Add config values to this category.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values.- Parameters:
values- config values to display- Returns:
- this builder
- Since:
- 0.1.0
-
addScreenValues
Add config screen values to this category.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values.- Parameters:
values- config screen values to display- Returns:
- this builder
- Since:
- 0.1.0
-
addSortingConfig
<T> ISortingConfigGuiBuilder<T> addSortingConfig(String name, String localizationKey, net.mezzdev.config.api.sorting.ISortingConfig<T> sortingConfig, Collection<T> values, net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> valueSerializer) Add a GUI list editor for a MezzConfig sorting config.The sorting config keeps owning storage and sorting behavior. The config GUI adapts it into a list editor for the given runtime value set.
- Type Parameters:
T- the sortable value type- Parameters:
name- stable config screen value namelocalizationKey- translation key for this sort-order value's namesortingConfig- sorting config that stores and applies the edited ordervalues- complete runtime value set to expose in the list editorvalueSerializer- serializer and display metadata for one sortable value- Returns:
- builder for configuring how this sorting config is shown
- Since:
- 0.1.0
-
addStringSortingConfig
ISortingConfigGuiBuilder<String> addStringSortingConfig(String name, String localizationKey, net.mezzdev.config.api.sorting.ISortingConfig<String> sortingConfig, Collection<String> values) Add a GUI list editor for a string-backed MezzConfig sorting config.- Parameters:
name- stable config screen value namelocalizationKey- translation key for this sort-order value's namesortingConfig- sorting config that stores and applies the edited ordervalues- complete runtime value set to expose in the list editor- Returns:
- builder for configuring how this sorting config is shown
- Since:
- 0.1.0
-
hideValue
Hide one schema config value from this category.This is only needed when this category keeps automatically detected values and some of those values should still be omitted.
- Parameters:
value- config value to hide- Returns:
- this builder
- Since:
- 0.1.0
-
hideScreenValue
Hide one config screen value from this category.This is only needed when this category keeps automatically detected values and some of those values should still be omitted.
- Parameters:
value- config screen value to hide- Returns:
- this builder
- Since:
- 0.1.0
-
hideValues
IConfigScreenCategoryBuilder hideValues(Collection<? extends net.mezzdev.config.api.value.IConfigValue<?>> values) Hide schema config values from this category.This is only needed when this category keeps automatically detected values and some of those values should still be omitted.
- Parameters:
values- config values to hide- Returns:
- this builder
- Since:
- 0.1.0
-
hideScreenValues
Hide config screen values from this category.This is only needed when this category keeps automatically detected values and some of those values should still be omitted.
- Parameters:
values- config screen values to hide- Returns:
- this builder
- Since:
- 0.1.0
-
addValueByName
Add one config screen value to this category by stable name.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values. The value name is resolved against this category first, so category-local value names can be used safely when multiple categories contain the same value name. This is useful for screen values that do not have a MezzConfigIConfigValuebacking object, such as platform-native config values adapted for the config GUI.- Parameters:
valueName- stable config screen value name- Returns:
- this builder
- Since:
- 0.1.0
-
hideValueByName
Hide one config screen value from this category by stable name.This is only needed when this category keeps automatically detected values and some of those values should still be omitted. The value name is resolved against this category first, so category-local value names can be used safely when multiple categories contain the same value name. This is useful for screen values that do not have a MezzConfig
IConfigValuebacking object, such as platform-native config values adapted for the config GUI.- Parameters:
valueName- stable config screen value name to hide- Returns:
- this builder
- Since:
- 0.1.0
-
addValuesByName
Add config screen values to this category by stable name.Added values are appended to this category's automatically detected values. Call
clearDefaultValues()to replace the automatically detected values. Value names are resolved against this category first, so category-local value names can be used safely when multiple categories contain the same value name. This is useful for screen values that do not have a MezzConfigIConfigValuebacking object, such as platform-native config values adapted for the config GUI.- Parameters:
valueNames- stable config screen value names- Returns:
- this builder
- Since:
- 0.1.0
-
hideValuesByName
Hide config screen values from this category by stable name.This is only needed when this category keeps automatically detected values and some of those values should still be omitted. Value names are resolved against this category first, so category-local value names can be used safely when multiple categories contain the same value name. This is useful for screen values that do not have a MezzConfig
IConfigValuebacking object, such as platform-native config values adapted for the config GUI.- Parameters:
valueNames- stable config screen value names to hide- Returns:
- this builder
- Since:
- 0.1.0
-
addKeyMapping
Add one key mapping to this category.Adding key mappings to any configured category disables the automatically detected key mappings category for this screen. Added key mappings are appended to this category's automatically detected values.
- Parameters:
keyMapping- key mapping to display- Returns:
- this builder
- Since:
- 0.1.0
-
addKeyMappings
IConfigScreenCategoryBuilder addKeyMappings(Collection<? extends net.minecraft.client.KeyMapping> keyMappings) Add key mappings to this category.Adding key mappings to any configured category disables the automatically detected key mappings category for this screen. Added key mappings are appended to this category's automatically detected values.
- Parameters:
keyMappings- key mappings to display- Returns:
- this builder
- Since:
- 0.1.0
-