if the block list is empty, don't try to start another batch of actions.

This commit is contained in:
Vanessa Dannenberg 2021-04-06 13:08:43 -04:00
parent 3bc8737e2d
commit 1d2593f022
1 changed files with 2 additions and 0 deletions

View File

@ -512,6 +512,8 @@ biome_lib.queue_run_ratio = 100 - rr
biome_lib.entries_per_step = math.max(-rr, 1)
minetest.register_globalstep(function(dtime)
if not biome_lib.block_log[1] then return end -- the block log is empty
if math.random(100) > biome_lib.queue_run_ratio then return end
for s = 1, biome_lib.entries_per_step do
biome_lib.generate_block()