From e0c94ccb8a75ef23ad154fe1b25715b908e0a397 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Wed, 28 Apr 2021 21:58:28 -0400 Subject: [PATCH] Stop thorns enchant from crashing server when dealing damage to mobs --- 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 c5023deb5..3732de8e6 100644 --- a/mods/ITEMS/mcl_armor/damage.lua +++ b/mods/ITEMS/mcl_armor/damage.lua @@ -81,7 +81,7 @@ mcl_damage.register_modifier(function(obj, damage, reason) local thorns_damage = thorns_damage_regular + thorns_damage_irregular if thorns_damage > 0 and reason.type ~= "thorns" and reason.source ~= obj then - mcl_util.deal_damage(reason.source, {type = "thorns", direct = obj}) + mcl_util.deal_damage(reason.source, thorns_damage) local thorns_item = thorns_pieces[math.random(#thorns_pieces)] mcl_util.use_item_durability(thorns_item.itemstack, 2)