mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
randomize spawning list
This commit is contained in:
parent
60f164d46a
commit
8651e3b04e
1 changed files with 1 additions and 0 deletions
|
@ -426,6 +426,7 @@ if mobs_spawn then
|
|||
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
||||
local noise = perlin_noise:get_3d(spawning_position)
|
||||
local current_summary_chance = summary_chance
|
||||
table.shuffle(mob_library_worker_table)
|
||||
while #mob_library_worker_table > 0 do
|
||||
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
||||
local mob_index = 1
|
||||
|
|
Loading…
Reference in a new issue