mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Defer pyramid generation by 3 seconds to avoid timing issues
This commit is contained in:
parent
1020b080aa
commit
41b3484102
@ -138,6 +138,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
|
minetest.after(3, function(minp, maxp, seed)
|
||||||
|
|
||||||
if maxp.y < 0 then return end
|
if maxp.y < 0 then return end
|
||||||
math.randomseed(seed)
|
math.randomseed(seed)
|
||||||
local cnt = 0
|
local cnt = 0
|
||||||
@ -178,6 +180,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
if minetest.find_node_near(p2, 25, {"default:water_source"}) ~= nil or minetest.find_node_near(p2, 22, {"default:dirt_with_grass"}) ~= nil or minetest.find_node_near(p2, 52, {"maptools:sandstone_brick"}) ~= nil then return end
|
if minetest.find_node_near(p2, 25, {"default:water_source"}) ~= nil or minetest.find_node_near(p2, 22, {"default:dirt_with_grass"}) ~= nil or minetest.find_node_near(p2, 52, {"maptools:sandstone_brick"}) ~= nil then return end
|
||||||
|
|
||||||
if math.random(0,10) > 7 then return end
|
if math.random(0,10) > 7 then return end
|
||||||
minetest.after(0.8,make,p2)
|
make(p2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end, minp, maxp, seed)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user