revert to older on_generated for redsky grass
This commit is contained in:
parent
71278d1042
commit
feedd4a809
@ -43,7 +43,7 @@ local random = math.random
|
|||||||
|
|
||||||
-- Add surface decoration
|
-- Add surface decoration
|
||||||
|
|
||||||
local function generate(vm, minp, maxp)
|
minetest.register_on_generated(function(minp, maxp)
|
||||||
|
|
||||||
if minp.y < YMIN or maxp.y > YMAX then return end
|
if minp.y < YMIN or maxp.y > YMAX then return end
|
||||||
|
|
||||||
@ -69,14 +69,4 @@ local function generate(vm, minp, maxp)
|
|||||||
minetest.swap_node(bpos, {name = crystal[random(#crystal)]})
|
minetest.swap_node(bpos, {name = crystal[random(#crystal)]})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end)
|
||||||
|
|
||||||
if minetest.save_gen_notify ~= nil then -- async env (5.9+)
|
|
||||||
minetest.register_on_generated(function(vm, minp, maxp, blockseed)
|
|
||||||
generate(vm, minp, maxp)
|
|
||||||
end)
|
|
||||||
else -- main thread (5.8 and earlier)
|
|
||||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
|
||||||
generate(minetest.get_mapgen_object("voxelmanip"), minp, maxp)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user