From d5078e7c8625f1cfca46fddad3a3c1c51d5dd5e1 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 25 May 2023 16:18:43 +0200 Subject: Fixed Silex counting on Promising Shovel --- .../at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt') 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") -- cgit