summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
index b6cb3a330..1780764cd 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
@@ -179,16 +179,20 @@ object SkyBlockItemModifierUtils {
fun ItemStack.getLivingMetalProgress() = getAttributeInt("lm_evo")
+ fun ItemStack.getSecondsHeld() = getAttributeInt("seconds_held")
+
fun ItemStack.getBottleOfJyrreSeconds() = getAttributeInt("bottle_of_jyrre_seconds")
fun ItemStack.getEdition() = getAttributeInt("edition")
fun ItemStack.getNewYearCake() = getAttributeInt("new_years_cake")
- fun ItemStack.getEnchantments(): Map<String, Int>? = getExtraAttributes()?.takeIf { it.hasKey("enchantments") }?.run {
- val enchantments = this.getCompoundTag("enchantments")
- enchantments.keySet.associateWith { enchantments.getInteger(it) }
- }
+ fun ItemStack.getEnchantments(): Map<String, Int>? = getExtraAttributes()
+ ?.takeIf { it.hasKey("enchantments") }
+ ?.run {
+ val enchantments = this.getCompoundTag("enchantments")
+ enchantments.keySet.associateWith { enchantments.getInteger(it) }
+ }
fun ItemStack.getAppliedPocketSackInASack(): Int? {
val data = cachedData