Possibly fix tool issues v2

This commit is contained in:
TomTom 2024-05-28 17:57:06 +02:00
parent 9ba7a44ebd
commit 21ddf1629b

View File

@ -668,13 +668,13 @@ class Minion(
if (Math.random() > 1f / (toolMeta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return if (Math.random() > 1f / (toolMeta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return
if (remaining > 1) { if (remaining > amount) {
// We can damage the tool // We can damage the tool
toolMeta.damage += amount toolMeta.damage += amount
tool.itemMeta = toolMeta tool.itemMeta = toolMeta
updateInventories() updateInventories()
return return
} else if (remaining == 1) { } else if (remaining <= 1) {
// Tool is breaking // Tool is breaking
if (Config.CAN_BREAK_TOOLS()) { if (Config.CAN_BREAK_TOOLS()) {
if (Config.PULL_FROM_CHEST()) { if (Config.PULL_FROM_CHEST()) {
@ -731,7 +731,7 @@ class Minion(
if (remaining > 1) { if (remaining > 1) {
// We can damage the tool // We can damage the tool
return true return true
} else if (remaining == 1) { } else {
// Tool is breaking // Tool is breaking
if (Config.CAN_BREAK_TOOLS()) { if (Config.CAN_BREAK_TOOLS()) {
if (Config.PULL_FROM_CHEST()) { if (Config.PULL_FROM_CHEST()) {