From c41b943d058ebdf5b5653a2220354b693906bacd Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Wed, 4 Sep 2024 00:33:20 -0400 Subject: [PATCH] Use new 'ConfigLockedStringList' for SortingCategory --- gradle.properties | 2 +- src/main/java/fi/dy/masa/itemscroller/config/Configs.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index 736f2f9b6..e661bb307 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ mod_version = 0.24.999-snap # Required malilib version malilib_version = 0.20.999-snap -malilib_id = 52a9324566 +malilib_id = e537670d92 # Minecraft, Fabric Loader and API and mappings versions minecraft_version_out = 24w35a diff --git a/src/main/java/fi/dy/masa/itemscroller/config/Configs.java b/src/main/java/fi/dy/masa/itemscroller/config/Configs.java index ee3f13d20..af3716968 100644 --- a/src/main/java/fi/dy/masa/itemscroller/config/Configs.java +++ b/src/main/java/fi/dy/masa/itemscroller/config/Configs.java @@ -16,10 +16,7 @@ import fi.dy.masa.malilib.config.IConfigBase; import fi.dy.masa.malilib.config.IConfigHandler; import fi.dy.masa.malilib.config.IConfigValue; -import fi.dy.masa.malilib.config.options.ConfigBoolean; -import fi.dy.masa.malilib.config.options.ConfigInteger; -import fi.dy.masa.malilib.config.options.ConfigOptionList; -import fi.dy.masa.malilib.config.options.ConfigStringList; +import fi.dy.masa.malilib.config.options.*; import fi.dy.masa.malilib.util.FileUtils; import fi.dy.masa.malilib.util.JsonUtils; import fi.dy.masa.itemscroller.Reference; @@ -67,7 +64,7 @@ public static class Generic public static final ConfigStringList SORT_TOP_PRIORITY_INVENTORY = new ConfigStringList("sortTopPriorityInventory", DEFAULT_TOP_SORTING).apply(GENERIC_KEY); public static final ConfigStringList SORT_BOTTOM_PRIORITY_INVENTORY = new ConfigStringList("sortBottomPriorityInventory", DEFAULT_BOTTOM_SORTING).apply(GENERIC_KEY); public static final ConfigOptionList SORT_METHOD_DEFAULT = new ConfigOptionList("sortMethodDefault", SortingMethod.ITEM_NAME).apply(GENERIC_KEY); - public static final ConfigStringList SORT_CATEGORY_ORDER = new ConfigStringList("sortCategoryOrder", SortingCategory.toImmutableList()).apply(GENERIC_KEY); + public static final ConfigLockedStringList SORT_CATEGORY_ORDER = new ConfigLockedStringList("sortCategoryOrder", SortingCategory.toImmutableList()).apply(GENERIC_KEY); public static final ImmutableList OPTIONS = ImmutableList.of( CARPET_CTRL_Q_CRAFTING,