From 90419424aeddb895f1677add8b87dd605acf058e Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 9 Sep 2022 22:41:04 +0200 Subject: [PATCH] Use api spawn command for natural spawn --- mods/ENTITIES/mcl_mobs/spawning.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index c429cf109..ff86061db 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -481,7 +481,7 @@ local function spawn_group(p,mob,spawn_on,group_max,group_min) if mob.type_of_spawning == "water" then sp = get_water_spawn(sp) end - o = minetest.add_entity(sp,mob.name) + o = mcl_mobs.spawn(sp,mob.name) if o then dbg_spawn_succ = dbg_spawn_succ + 1 end end end @@ -560,7 +560,7 @@ if mobs_spawn then object = spawn_group(spawning_position,mob_def,{minetest.get_node(vector.offset(spawning_position,0,-1,0)).name},spawn_in_group,spawn_in_group_min) minetest.log("action", "A group of mob " .. mob_def.name .. " spawns at " .. minetest.pos_to_string(spawning_position, 1)) else - object = minetest.add_entity(spawning_position, mob_def.name) + object = mcl_mobs.spawn(spawning_position, mob_def.name) minetest.log("action", "Mob " .. mob_def.name .. " spawns at " .. minetest.pos_to_string(spawning_position, 1)) end