mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-24 08:10:19 +01:00
add spawn check for collisionbox
This commit is contained in:
parent
9e27f45663
commit
d1f23e8ed8
7
api.lua
7
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user