From fcba67b7e7a16d54937b00089b0675495c4590c8 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 4 Nov 2022 14:14:45 +0100 Subject: [PATCH] Make on_lightning_strike available to non-mob entities --- mods/ENVIRONMENT/lightning/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index b0bff57167..12c50ef29e 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -135,7 +135,7 @@ function lightning.strike_func(pos, pos2, objects) -- damage nearby objects, transform mobs for _, obj in pairs(objects) do 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 mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" }) end