aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-25 00:20:11 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-25 00:20:11 +0100
commit85f002a5d7a0af35e450b52e17addd50e6889c52 (patch)
tree1a062067b6488ad292bd739f12c1c892fc725db3
parentc243e0fdce709c61caf04356c94bc04fac37a0d6 (diff)
downloadskyhanni-85f002a5d7a0af35e450b52e17addd50e6889c52.tar.gz
skyhanni-85f002a5d7a0af35e450b52e17addd50e6889c52.tar.bz2
skyhanni-85f002a5d7a0af35e450b52e17addd50e6889c52.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.kt10
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()
+ }
}
}
}