diff options
author | HiZe_ <superhize@hotmail.com> | 2023-11-29 00:02:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 00:02:41 +0100 |
commit | bee150b333b19d3c80ca6f2fcf3d05a2128def31 (patch) | |
tree | f5723f14b1a1e73c448dcd09723eace9b809a1bd /src/main | |
parent | 57fea067d5a598520e1e5189fe7c8d3de6d60356 (diff) | |
download | skyhanni-bee150b333b19d3c80ca6f2fcf3d05a2128def31.tar.gz skyhanni-bee150b333b19d3c80ca6f2fcf3d05a2128def31.tar.bz2 skyhanni-bee150b333b19d3c80ca6f2fcf3d05a2128def31.zip |
Added Bottle of Jyrre in item Stack Size (#738)
Added bottle of Jyrre time overlay in stack size feature. #738
Diffstat (limited to 'src/main')
3 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index f411bebb7..83c718280 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -71,7 +71,8 @@ public class InventoryConfig { "§bRancher's Boots speed", "§bLarva Hook", "§bDungeon Potion Level", - "§bVacuum (Garden)" + "§bVacuum (Garden)", + "§bBottle Of Jyrre" } ) public List<Integer> itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 11, 12, 14)); 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 d5569c12c..329621b4a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -11,9 +11,11 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull 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.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getBottleOfJyrreSeconds import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import at.hannibal2.skyhanni.utils.StringUtils.removeColor @@ -195,6 +197,13 @@ class ItemDisplayOverlayFeatures { } + if (itemNumberAsStackSize.contains(15)) { + if (item.getInternalNameOrNull() == "NEW_BOTTLE_OF_JYRRE".asInternalName()) { + val seconds = item.getBottleOfJyrreSeconds() ?: 0 + return "§a${(seconds / 3600)}" + } + } + return "" } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 9f65a71f1..4f51ad673 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -179,6 +179,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.getLivingMetalProgress() = getAttributeInt("lm_evo") + fun ItemStack.getBottleOfJyrreSeconds() = getAttributeInt("bottle_of_jyrre_seconds") + fun ItemStack.getEnchantments() = getExtraAttributes()?.takeIf { it.hasKey("enchantments") }?.run { val enchantments = this.getCompoundTag("enchantments") enchantments.keySet.associateWith { enchantments.getInteger(it) } |