It's "chunk", not "mapblock"

master
Wuzzy 2019-02-13 19:15:51 +01:00
parent ae2fd8cb4b
commit 734a7b0c1a
1 changed files with 3 additions and 3 deletions

View File

@ -1018,11 +1018,11 @@ end
-- The rail corridor algorithm starts here
minetest.register_on_generated(function(minp, maxp, blockseed)
-- We re-init the randomizer for every mapblock as we start generating in the middle of each mapblock.
-- We can't use the mapgen seed as this would make the algorithm depending on the order the mapblocks generate.
-- We re-init the randomizer for every chunk as we start generating in the middle of each chunk.
-- We can't use the mapgen seed as this would make the algorithm depending on the order the chunk generate.
InitRandomizer(blockseed)
if minp.y < height_max and maxp.y > height_min and pr:next() < probability_railcaves_in_chunk then
-- Keep some distance from the upper/lower mapblock limits
-- Keep some distance from the upper/lower chunk limits
local buffer = 5
-- Do up to 10 tries to start a corridor system