From 21ddf1629b9937533cc8ff6945e8fbc5b4f9cef6 Mon Sep 17 00:00:00 2001 From: TomTom <93038247+AverageGithub@users.noreply.github.com> Date: Tue, 28 May 2024 17:57:06 +0200 Subject: [PATCH] Possibly fix tool issues v2 --- .../kotlin/com/artillexstudios/axminions/minions/Minion.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt index bfb4db4..3e6d1c5 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt @@ -668,13 +668,13 @@ class Minion( if (Math.random() > 1f / (toolMeta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return - if (remaining > 1) { + if (remaining > amount) { // We can damage the tool toolMeta.damage += amount tool.itemMeta = toolMeta updateInventories() return - } else if (remaining == 1) { + } else if (remaining <= 1) { // Tool is breaking if (Config.CAN_BREAK_TOOLS()) { if (Config.PULL_FROM_CHEST()) { @@ -731,7 +731,7 @@ class Minion( if (remaining > 1) { // We can damage the tool return true - } else if (remaining == 1) { + } else { // Tool is breaking if (Config.CAN_BREAK_TOOLS()) { if (Config.PULL_FROM_CHEST()) {