1
0
Fork 0

Log the node a mob spawns on

This commit is contained in:
cora 2022-10-11 00:42:10 +02:00
parent cba176be4a
commit 97f9614818
1 changed files with 2 additions and 2 deletions

View File

@ -632,13 +632,13 @@ if mobs_spawn then
local object local object
if spawn_in_group and ( mob_type ~= "monster" or math.random(5) == 1 ) then if spawn_in_group and ( mob_type ~= "monster" or math.random(5) == 1 ) then
if logging then if logging then
minetest.log("action", "[mcl_mobs] A group of mob " .. mob_def.name .. " spawns at " .. minetest.pos_to_string(spawning_position, 1)) minetest.log("action", "[mcl_mobs] A group of mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
end end
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) 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)
else else
if logging then if logging then
minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns at " .. minetest.pos_to_string(spawning_position, 1)) minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at ".. minetest.pos_to_string(spawning_position, 1))
end end
object = mcl_mobs.spawn(spawning_position, mob_def.name) object = mcl_mobs.spawn(spawning_position, mob_def.name)
end end