1
0
Fork 0

Fix crash with armor enchantments

formspec-v4
Elias Fleckenstein 2021-04-14 20:39:35 +02:00
parent 727d7be6ab
commit 8931ffb7d3
1 changed files with 1 additions and 1 deletions

View File

@ -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