mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2025-01-20 20:51:23 +01:00
Fix unbreakable items
This commit is contained in:
parent
afa576f21d
commit
4cc4b95db0
@ -640,6 +640,8 @@ class Minion(
|
|||||||
|
|
||||||
val meta = toolMeta as? Damageable ?: return
|
val meta = toolMeta as? Damageable ?: return
|
||||||
|
|
||||||
|
if (tool?.itemMeta?.isUnbreakable == true) return
|
||||||
|
|
||||||
if (Math.random() > 1f / (meta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return
|
if (Math.random() > 1f / (meta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return
|
||||||
|
|
||||||
if ((tool?.type?.maxDurability ?: return) <= meta.damage + amount) {
|
if ((tool?.type?.maxDurability ?: return) <= meta.damage + amount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user