From a91a13bbec46a6465bee22ead8494627f362b22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20C?= Date: Wed, 7 Feb 2024 10:54:31 +0100 Subject: [PATCH] Insert mapgen callback in first position, to ensure it is called first Improves compatibility with mods working on mapgen --- mapgen.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mapgen.lua b/mapgen.lua index 8f8f69e..3872936 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -262,7 +262,9 @@ function mapgen_rivers.make_chunk(minp, maxp, seed) minetest.log("verbose", ("[mapgen_rivers] Done in %5.3f s"):format(t)) end -minetest.register_on_generated(mapgen_rivers.make_chunk) +-- Enforce first position in mapgen callbacks +table.insert(minetest.registered_on_generateds, 1, mapgen_rivers.make_chunk) +--minetest.register_on_generated(mapgen_rivers.make_chunk) minetest.register_on_shutdown(function() local avg = sumtime / ngen