option to disable spawn

master
AliasAlreadyTaken 2021-03-30 23:07:31 +02:00
parent 41f37ebd45
commit 8fbb4b0b91
1 changed files with 5 additions and 0 deletions

View File

@ -809,8 +809,13 @@ local find_node_height = 32
local block_protected_spawn = minetest.settings:get_bool("block_protected_spawn") or true
local mob_limit = tonumber(minetest.settings:get("mob_limit") or 6)
mob_core.spawn_enabled = true
function mob_core.spawn(name, nodes, min_light, max_light, min_height,
max_height, min_rad, max_rad, group, optional)
if not mob_core.spawn_enabled then return end
group = group or 1
--are we in the nether??