Fix armor runtime error

This commit is contained in:
Lizzy Fleckenstein 2020-11-13 09:44:42 +01:00
parent b9e5a991e2
commit b53ae0df19
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ minetest.register_on_player_hpchange(function(player, hp_change, reason)
-- Damage armor
local use = stack:get_definition().groups["mcl_armor_uses"] or 0
local enchantments = mcl_enchanting.get_enchantments(stack)
if enchantments.unbreaking > 0 then
if enchantments.unbreaking then
use = use / (0.6 + 0.4 / (enchantments.unbreaking + 1))
end
if use > 0 then