From e806d5f3cea9dcb13bf3896d6e5b6b33d854114f Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Mon, 22 Apr 2024 02:16:46 +0200 Subject: [PATCH] Fixed effects still being handled after mob death --- mods/ITEMS/mcl_potions/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 17323ad7c..875d13c7c 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -1333,7 +1333,7 @@ minetest.register_globalstep(function(dtime) end end - if not EF[name][object] or EF[name][object].timer >= vals.dur then + if not object or not EF[name][object] or EF[name][object].timer >= vals.dur or not object:get_pos() then if effect.on_end then effect.on_end(object) end EF[name][object] = nil if effect.after_end then effect.after_end(object) end