diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index b9c510390..507f10b19 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -753,3 +753,12 @@ function mcl_util.remove_entity(luaentity) luaentity.object:remove() end +function mcl_util.remove_entity(luaentity) + if luaentity._removed then return end + luaentity._removed = true + + local hook = luaentity._on_remove + if hook then hook(luaentity) end + + luaentity.object:remove() +end