add spawn check for collisionbox

This commit is contained in:
tenplus1 2023-11-11 07:33:30 +00:00
parent 9e27f45663
commit d1f23e8ed8
1 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,7 @@ local use_mc2 = minetest.get_modpath("mcl_core")
-- Global
mobs = {
mod = "redo",
version = "20231106",
version = "20231111",
translate = S,
invis = minetest.global_exists("invisibility") and invisibility or {},
node_snow = minetest.registered_aliases["mapgen_snow"]
@ -4023,6 +4023,11 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
local ent = minetest.registered_entities[name]
if not ent or not ent.base_colbox then
print("[MOBS] Error spawning mob: " .. name)
return
end
-- should we check mob area for obstructions ?
if mob_area_spawn ~= true then