From d1f23e8ed848cbe0d7827c19285ff256a78fb6fe Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 11 Nov 2023 07:33:30 +0000 Subject: [PATCH] add spawn check for collisionbox --- api.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 10382a1..5d84a54 100644 --- a/api.lua +++ b/api.lua @@ -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