From b53ae0df1917a55338489d65a4dd9c8d06787f0d Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Fri, 13 Nov 2020 09:44:42 +0100 Subject: [PATCH] Fix armor runtime error --- mods/ITEMS/mcl_armor/armor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_armor/armor.lua b/mods/ITEMS/mcl_armor/armor.lua index a4b7974d5c..331a18b353 100644 --- a/mods/ITEMS/mcl_armor/armor.lua +++ b/mods/ITEMS/mcl_armor/armor.lua @@ -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