From ce7c4c14499a6baaa46bd18e87dfa3b50400252a Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 4 Jul 2022 11:00:52 +0100 Subject: [PATCH] adjust mob count when using /clear_mobs --- api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index f722253..f528a67 100644 --- a/api.lua +++ b/api.lua @@ -4871,7 +4871,7 @@ function mobs:alias_mob(old_name, new_name) end --- admin command to remove all monsters around players +-- admin command to remove untamed mobs around players minetest.register_chatcommand("clear_mobs", { params = "", description = "Remove untamed mobs from around players.", @@ -4898,7 +4898,7 @@ minetest.register_chatcommand("clear_mobs", { -- only remove mobs redo mobs that are not tamed if ent and ent._cmi_is_mob and ent.tamed ~= true then - obj:remove() + remove_mob(ent, true) count = count + 1 end