rather than rearranging the block log to deal with blocks that can't be

populated yet, move those blocks to a separate list, and replay that
list whenever new mapblocks come in.  That way the main block list can
run dry and allow the block populate routines to go idle.

Thanks to Warr1024 for the idea!
This commit is contained in:
Vanessa Dannenberg
2021-04-06 16:07:49 -04:00
parent 212024a9b4
commit e346fd599f
2 changed files with 20 additions and 5 deletions

View File

@ -70,4 +70,10 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
end
end
end
if #biome_lib.block_recheck_list > 0 then
for i = 1, #biome_lib.block_recheck_list do
biome_lib.block_log[#biome_lib.block_log + 1] = table.copy(biome_lib.block_recheck_list[i])
end
end
biome_lib.block_recheck_list = {}
end)