From 0584d16569103bb5cd15c5e5041efb842d5b8784 Mon Sep 17 00:00:00 2001 From: NO11 Date: Thu, 9 Sep 2021 13:21:33 +0000 Subject: [PATCH] add lightning API support for mobs --- mods/ENVIRONMENT/lightning/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index b234092af..83494462f 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -156,6 +156,10 @@ lightning.register_on_strike(function(pos, pos2, objects) -- damage nearby objects, transform mobs for _, obj in pairs(objects) do local lua = obj:get_luaentity() + if lua and lua._on_strike then + lua._on_strike(lua, pos, pos2, objects) + end + -- remove this when mob API is done if lua and lua.name == "mobs_mc:pig" then mcl_util.replace_mob(obj, "mobs_mc:pigman") elseif lua and lua.name == "mobs_mc:mooshroom" then