1
0
Fork 0

Make on_lightning_strike available to non-mob entities

This commit is contained in:
cora 2022-11-04 14:14:45 +01:00
parent 2c4a768685
commit fcba67b7e7
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ function lightning.strike_func(pos, pos2, objects)
-- damage nearby objects, transform mobs -- damage nearby objects, transform mobs
for _, obj in pairs(objects) do for _, obj in pairs(objects) do
local lua = obj:get_luaentity() local lua = obj:get_luaentity()
if lua and lua.is_mob then if lua then
if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ) ~= true then if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ) ~= true then
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" }) mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
end end