From 6cc2646eaaec81581ec4914f3a656578323ead28 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:41:53 +0100 Subject: Added skill and collection level as item stack. --- .../inventory/ItemDisplayOverlayFeatures.kt | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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 a8825354b..2fe34d105 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -6,8 +6,10 @@ 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 import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -104,7 +106,7 @@ class ItemDisplayOverlayFeatures { } } - if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(7)) { + if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(8)) { if (name.contains("Kuudra Key")) { return when (name) { "Kuudra Key" -> "§a1" @@ -116,6 +118,32 @@ class ItemDisplayOverlayFeatures { } } } + + if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9)) { + if (InventoryUtils.openInventoryName() == "Your Skills") { + if (item.getLore().any { it.contains("Click to view!") }) { + item.name?.let { + if (!it.contains("Dungeon")) { + val text = it.split(" ").last() + return "" + text.romanToDecimalIfNeeded() + } + } + } + } + } + + if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10)) { + if (InventoryUtils.openInventoryName().endsWith(" Collections")) { + if (item.getLore().any { it.contains("Click to view!") }) { + item.name?.let { + if (it.startsWith("§e")) { + val text = it.split(" ").last() + return "" + text.romanToDecimalIfNeeded() + } + } + } + } + } return "" } -- cgit