mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-09 08:39:34 +01:00
Stop thorns enchant from crashing server when dealing damage to mobs
This commit is contained in:
parent
a6ac6f5c76
commit
e0c94ccb8a
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue