--spawn mob in a square doughnut shaped radius
local timer = 6
--the amount of mobs that the game will try to spawn
-local spawn_goal = 30
+local spawn_goal = 10
+--the amount of mobs that the spawner will cap out at
+local mob_limit = 100
--inner and outer part of square donut radius
local inner = 24
local outer = 80
local spawn = true
local spawn_table = {"pig","chicken","sheep"}
-local snow_spawn_table = {"snowman","creeper","spider",}
+local snow_spawn_table = {"snowman","snoider","sneeper",}
local dark_spawn_table = {"creeper","creeper","creeper","spider","spider","spider","big_slime","medium_slime","small_slime"}
local nether_spawn_table = {"nitro_creeper"}
local aether_spawn_table = {"phyg"}
end
end
end
- minetest.after(global_mob_amount/spawn_goal, function()
+
+ --fine tune mobs
+ local after_timer = global_mob_amount/spawn_goal
+ if after_timer > timer then
+ after_timer = timer
+ end
+
+ minetest.after(after_timer, function()
spawn_mobs()
end)
end
-minetest.register_on_mods_loaded(function()
- minetest.after(0,function()
- spawn_mobs()
+if spawn then
+ minetest.register_on_mods_loaded(function()
+ minetest.after(0,function()
+ spawn_mobs()
+ end)
end)
-end)
\ No newline at end of file
+end