diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 9 |
1 files changed, 8 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 678772499..fa86f5a18 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -18,9 +18,16 @@ object SkyBlockItemModifierUtils { fun ItemStack.getHoeCounter() = getAttributeLong("mined_crops") fun ItemStack.getSilexCount() = getEnchantments()?.get("efficiency")?.let { - it - 5 - if (getInternalName() == "STONK_PICKAXE") 1 else 0 + it - 5 - getBaseSilexCount() }?.takeIf { it > 0 } + private fun ItemStack.getBaseSilexCount() = when (getInternalName()) { + "STONK_PICKAXE" -> 1 + "PROMISING_SPADE" -> 5 + + else -> 0 + } + fun ItemStack.getTransmissionTunerCount() = getAttributeInt("tuned_transmission") fun ItemStack.getManaDisintegrators() = getAttributeInt("mana_disintegrator_count") |