Interface ISortingConfigGuiBuilder<T>
- Type Parameters:
T- the sortable value type
@NonExtendable
public interface ISortingConfigGuiBuilder<T>
Customizes how a MezzConfig sorting config is shown in a config screen.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionsetApplyMode(ConfigValueApplyMode applyMode) Set when edited sort-order values are saved.setRestartRequirement(net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after this sort-order value is saved.setValueDescription(Function<T, Optional<net.minecraft.network.chat.Component>> valueDescriptionFactory) Set descriptions for sortable values.setValueDescriptions(Map<T, net.minecraft.network.chat.Component> valueDescriptions) Set descriptions for sortable values.setValueIcon(Function<T, Optional<IConfigValueIcon>> valueIconFactory) Set icons for sortable values.setValueIcons(Map<T, IConfigValueIcon> valueIcons) Set icons for sortable values.setValueName(Function<T, net.minecraft.network.chat.Component> valueNameFactory) Set display names for sortable values.setValueNames(Map<T, net.minecraft.network.chat.Component> valueNames) Set display names for sortable values.
-
Method Details
-
setApplyMode
Set when edited sort-order values are saved.- Parameters:
applyMode- when edits for this sort-order value are saved- Returns:
- this builder
- Since:
- 0.1.0
-
setRestartRequirement
ISortingConfigGuiBuilder<T> setRestartRequirement(net.mezzdev.config.api.value.editor.ConfigValueRestartRequirement restartRequirement) Set the restart or reload required after this sort-order value is saved.- Parameters:
restartRequirement- the required restart or reload- Returns:
- this builder
- Since:
- 0.1.0
-
setValueNames
Set display names for sortable values.Values missing from the map use the default value name from their serializer.
- Parameters:
valueNames- display names by sortable value- Returns:
- this builder
- Since:
- 0.1.0
-
setValueName
ISortingConfigGuiBuilder<T> setValueName(Function<T, net.minecraft.network.chat.Component> valueNameFactory) Set display names for sortable values.- Parameters:
valueNameFactory- creates a display name for one sortable value- Returns:
- this builder
- Since:
- 0.1.0
-
setValueDescriptions
ISortingConfigGuiBuilder<T> setValueDescriptions(Map<T, net.minecraft.network.chat.Component> valueDescriptions) Set descriptions for sortable values.Values missing from the map use the default value description from their serializer.
- Parameters:
valueDescriptions- descriptions by sortable value- Returns:
- this builder
- Since:
- 0.1.0
-
setValueDescription
ISortingConfigGuiBuilder<T> setValueDescription(Function<T, Optional<net.minecraft.network.chat.Component>> valueDescriptionFactory) Set descriptions for sortable values.- Parameters:
valueDescriptionFactory- creates an optional description for one sortable value- Returns:
- this builder
- Since:
- 0.1.0
-
setValueIcons
Set icons for sortable values.Values missing from the map have no custom icon.
- Parameters:
valueIcons- icons by sortable value- Returns:
- this builder
- Since:
- 0.1.0
-
setValueIcon
Set icons for sortable values.- Parameters:
valueIconFactory- creates an optional icon for one sortable value- Returns:
- this builder
- Since:
- 0.1.0
-