Check for light level six to spawn hostile mobs.

master
James Stevenson 2018-12-26 04:58:31 -05:00
parent 9080a82e72
commit 8697b6b2a3
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ minetest.register_node("mobs:spawner", {
local night = tod > 19000 or tod < 06000
local protection = minetest.find_node_near(pos, 13,
{"protector:protect", "protector:protect2"}, true)
if not protection and (biome == "underground" or night) then
if not protection and (biome == "underground" or night) and
minetest.get_node_light(pos) < 6 then
local mobs_to_insert = {
"mobs:dungeon_master",
"mobs:oerkki",