diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 14:41:53 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 14:41:53 +0100 |
| commit | 6cc2646eaaec81581ec4914f3a656578323ead28 (patch) | |
| tree | 7856da64b7ae34c28b0f913baf053156c97228dc /src/main/java/at/hannibal2/skyhanni/features | |
| parent | 5ec63533e3eab6f5a1f62038f387d49f613216da (diff) | |
| download | skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.gz skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.bz2 skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.zip | |
Added skill and collection level as item stack.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 30 |
1 files changed, 29 insertions, 1 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 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 "" } |
