mirror of
https://github.com/Poikilos/mobs.git
synced 2023-10-03 07:28:50 -07:00
Configuration of which monsters spawn has been added.
This commit is contained in:
parent
0fad914f73
commit
40f574bea5
2
api.lua
2
api.lua
@ -470,6 +470,7 @@ end
|
||||
|
||||
mobs.spawning_mobs = {}
|
||||
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, spawn_func)
|
||||
if minetest.setting_getbool(string.gsub(name,":","_").."_spawn") ~= false then
|
||||
mobs.spawning_mobs[name] = true
|
||||
minetest.register_abm({
|
||||
nodenames = nodes,
|
||||
@ -513,6 +514,7 @@ function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_o
|
||||
minetest.env:add_entity(pos, name)
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function mobs:register_arrow(name, def)
|
||||
|
Loading…
x
Reference in New Issue
Block a user