diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 1908b6ef7..6959299cb 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -100,7 +100,6 @@ public class InventoryConfig { PET_LEVEL("§bPet Level", 4), MINION_TIER("§bMinion Tier", 5), CRIMSON_ARMOR("§bCrimson Armor", 6), - REMOVED("§7(Removed)", 7), KUUDRA_KEY("§bKuudra Key", 8), SKILL_LEVEL("§bSkill Level", 9), COLLECTION_LEVEL("§bCollection Level", 10), diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 3aa5beaa2..bdac13de2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -48,6 +48,8 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getRanchersSpeed import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern +import com.google.gson.JsonArray +import com.google.gson.JsonElement import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -282,6 +284,19 @@ object ItemDisplayOverlayFeatures { event.transform(11, "inventory.itemNumberAsStackSize") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, ItemNumberEntry::class.java) } + event.transform(29, "inventory.itemNumberAsStackSize") { element -> + fixRemovedConfigElement(element) + } + } + + private fun fixRemovedConfigElement(data: JsonElement): JsonElement { + if (!data.isJsonArray) return data + val newList = JsonArray() + for (element in data.asJsonArray) { + if (element.asString == "REMOVED") continue + newList.add(element) + } + return newList } fun ItemNumberEntry.isSelected() = config.itemNumberAsStackSize.contains(this) |