From 24d66f452bff43e886652d6407412c1e73224545 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Mon, 20 Feb 2023 11:48:42 -0500 Subject: [PATCH] 2 Add extra checks for on_generated when biomes are disabled --- mapgen_after.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mapgen_after.lua b/mapgen_after.lua index 6eb5586..8e3c247 100644 --- a/mapgen_after.lua +++ b/mapgen_after.lua @@ -38,8 +38,13 @@ local deco_ids_baobab = { local deco_id_coral_bones_tree = minetest.get_decoration_id('everness:coral_forest_coral_bones_tree') -minetest.set_gen_notify('decoration', deco_ids_baobab) -minetest.set_gen_notify('decoration', { deco_id_coral_bones_tree }) +if #deco_ids_baobab > 1 then + minetest.set_gen_notify('decoration', deco_ids_baobab) +end + +if deco_id_coral_bones_tree then + minetest.set_gen_notify('decoration', { deco_id_coral_bones_tree }) +end -- Localise data buffer table outside the loop, to be re-used for all -- mapchunks, therefore minimising memory use.