From 87e494f42bb01884f659345a542b653f4a63abf2 Mon Sep 17 00:00:00 2001 From: E Date: Tue, 20 Apr 2021 00:41:10 -0400 Subject: [PATCH] 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) --- mods/MAPGEN/mcl_mapgen_core/init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 41bee508b5..87d32b79c4 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -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 - - 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)