mcl_mapgen_core: Make mcl_structures an optional dependency.

This commit is contained in:
Daniel Cassidy 2022-01-06 00:40:27 +00:00
parent 5cad35dbfe
commit 2bdaa77932
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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