From fca0126e4bbc63f8f8218d25be12f9795b70fadc Mon Sep 17 00:00:00 2001 From: Obsidian <108832807+Obsidianninja11@users.noreply.github.com> Date: Thu, 30 May 2024 01:32:56 -0800 Subject: Feature: Jyrre Bottle and Cacao Truffle held time in lore (#1916) Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') 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? = getExtraAttributes()?.takeIf { it.hasKey("enchantments") }?.run { - val enchantments = this.getCompoundTag("enchantments") - enchantments.keySet.associateWith { enchantments.getInteger(it) } - } + fun ItemStack.getEnchantments(): Map? = getExtraAttributes() + ?.takeIf { it.hasKey("enchantments") } + ?.run { + val enchantments = this.getCompoundTag("enchantments") + enchantments.keySet.associateWith { enchantments.getInteger(it) } + } fun ItemStack.getAppliedPocketSackInASack(): Int? { val data = cachedData -- cgit