diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-25 00:20:11 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-25 00:20:11 +0100 |
| commit | 3ddbc9f399c2f0101392bf52d115ae36aeccb544 (patch) | |
| tree | 1a062067b6488ad292bd739f12c1c892fc725db3 | |
| parent | 5fc17e42b1a30c507a4db5dc06711214cbec908c (diff) | |
| download | SkyHanni-3ddbc9f399c2f0101392bf52d115ae36aeccb544.tar.gz SkyHanni-3ddbc9f399c2f0101392bf52d115ae36aeccb544.tar.bz2 SkyHanni-3ddbc9f399c2f0101392bf52d115ae36aeccb544.zip | |
Fixed bug that collection tier does not show as stacks size in the collection inventory
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 10 |
1 files changed, 6 insertions, 4 deletions
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() + } } } } |
