From 85f002a5d7a0af35e450b52e17addd50e6889c52 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 25 Mar 2023 00:20:11 +0100 Subject: Fixed bug that collection tier does not show as stacks size in the collection inventory --- .../skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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 61259d5d8..2625b660c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.cleanName import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils.between import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded @@ -131,15 +132,16 @@ class ItemDisplayOverlayFeatures { } } - // TODO this is broken, fix it! if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10)) { if (InventoryUtils.openInventoryName().endsWith(" Collections")) { val lore = item.getLore() if (lore.any { it.contains("Click to view!") }) { if (CollectionAPI.isCollectionTier0(lore)) return "0" - if (itemName.startsWith("§e")) { - val text = itemName.split(" ").last() - return "" + text.romanToDecimalIfNeeded() + item.name?.let { + if (it.startsWith("§e")) { + val text = it.split(" ").last() + return "" + text.romanToDecimalIfNeeded() + } } } } -- cgit