diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index ebc0313c7..756d87d13 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -175,12 +175,16 @@ object SkyBlockItemModifierUtils { fun ItemStack.hasArtOfPeace() = getAttributeBoolean("artOfPeaceApplied") + fun ItemStack.isMuseumDonated() = getAttributeBoolean("donated_museum") + fun ItemStack.getLivingMetalProgress() = getAttributeInt("lm_evo") fun ItemStack.getBottleOfJyrreSeconds() = getAttributeInt("bottle_of_jyrre_seconds") fun ItemStack.getEdition() = getAttributeInt("edition") + fun ItemStack.getNewYearCake() = getAttributeInt("new_years_cake") + fun ItemStack.getEnchantments() = getExtraAttributes()?.takeIf { it.hasKey("enchantments") }?.run { val enchantments = this.getCompoundTag("enchantments") enchantments.keySet.associateWith { enchantments.getInteger(it) } @@ -251,7 +255,7 @@ object SkyBlockItemModifierUtils { getExtraAttributes()?.getLong(label)?.takeUnless { it == 0L } private fun ItemStack.getAttributeBoolean(label: String): Boolean { - return getExtraAttributes()?.hasKey(label) ?: false + return getExtraAttributes()?.getBoolean(label) ?: false } fun ItemStack.getExtraAttributes() = tagCompound?.getCompoundTag("ExtraAttributes") |