From 8931ffb7d32564687418a2590f1406945a8e1dcb Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 14 Apr 2021 20:39:35 +0200 Subject: [PATCH] Fix crash with armor enchantments --- mods/ITEMS/mcl_armor/damage.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_armor/damage.lua b/mods/ITEMS/mcl_armor/damage.lua index 35ae0eb30..43d39869d 100644 --- a/mods/ITEMS/mcl_armor/damage.lua +++ b/mods/ITEMS/mcl_armor/damage.lua @@ -43,7 +43,7 @@ function mcl_armor.damage_modifier(obj, hp_change, reason) for _, enchantment in pairs(tbl) do local level = enchantments[enchantment.id] - if level > 0 then + if level and level > 0 then enchantment_protection_factor = enchantment_protection_factor + level * enchantment.factor end end