1
0
Fork 0

mapgen/mcl_mapgen_core: move set_node decorations a node callback

During the rewrite in 89e55e9065, a queue system was added to allow
using both VoxelManip-based generation steps, and set_node-based steps,
however some set_node-based steps (underground mushrooms, nether
decorations, and structures) were missed and remained in a VoxelManip
step. The result is that the changes made by the set_node stages were
overwritten after the (now-stale) VoxelManip data was committed later.

(ref. Mineclonia/Mineclonia#26)
This commit is contained in:
E 2021-04-20 00:41:10 -04:00 committed by cora
parent dfed21ee14
commit 87e494f42b
1 changed files with 6 additions and 4 deletions

View File

@ -2179,15 +2179,17 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
lvm_used = true
end
return lvm_used, shadow
end
local function basic_node(minp, maxp, blockseed)
if mg_name ~= "singlenode" then
-- Generate special decorations
generate_underground_mushrooms(minp, maxp, blockseed)
generate_nether_decorations(minp, maxp, blockseed)
generate_structures(minp, maxp, blockseed, biomemap)
generate_structures(minp, maxp, blockseed, minetest.get_mapgen_object("biomemap"))
end
end
return lvm_used, shadow
end
mcl_mapgen_core.register_generator("main", basic, nil, 1, true)
mcl_mapgen_core.register_generator("main", basic, basic_node, 1, true)