mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-12-01 13:03:43 +01:00
Possibly fix tool issues v2
This commit is contained in:
parent
9ba7a44ebd
commit
21ddf1629b
@ -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()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user