From 2bdaa779320c04b55f46e301229796c0711b5af4 Mon Sep 17 00:00:00 2001 From: Daniel Cassidy Date: Thu, 6 Jan 2022 00:40:27 +0000 Subject: [PATCH] mcl_mapgen_core: Make mcl_structures an optional dependency. --- mods/MAPGEN/mcl_mapgen_core/init.lua | 8 +++++++- mods/MAPGEN/mcl_mapgen_core/mod.conf | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 81c0993da..624d4a6a8 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -1268,11 +1268,17 @@ local function generate_end_exit_portal(pos) else minetest.log("error", "[mcl_mapgen_core] ERROR! Ender dragon doesn't want to spawn") end - mcl_structures.call_struct(pos, "end_exit_portal") + if mcl_structures ~= nil then + mcl_structures.call_struct(pos, "end_exit_portal") + end end -- TODO: Try to use more efficient structure generating code local function generate_structures(minp, maxp, blockseed, biomemap) + if mcl_structures == nil then + return + end + local chunk_has_desert_well = false local chunk_has_desert_temple = false local chunk_has_igloo = false diff --git a/mods/MAPGEN/mcl_mapgen_core/mod.conf b/mods/MAPGEN/mcl_mapgen_core/mod.conf index dbd1dcd94..5ef4d4a03 100644 --- a/mods/MAPGEN/mcl_mapgen_core/mod.conf +++ b/mods/MAPGEN/mcl_mapgen_core/mod.conf @@ -1,5 +1,5 @@ name = mcl_mapgen_core author = Wuzzy description = The core of the MCL2 mapgen -depends = mcl_init, mcl_core, biomeinfo, mcl_worlds, mcl_structures -optional_depends = mclx_core, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs +depends = mcl_init, mcl_core, biomeinfo, mcl_worlds +optional_depends = mclx_core, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures