forked from MineClone5/MineClone5
mcl_mapgen_core: Make mcl_mushrooms an optional dependency.
mcl_mushrooms was previously an undeclared dependency of mcl_mapgen_core. Now it is both optional and declared.
This commit is contained in:
parent
554f22b802
commit
a0708abb9c
|
@ -1053,6 +1053,7 @@ local function register_mgv6_decorations()
|
|||
})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_mushrooms") then
|
||||
local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
|
||||
local mseeds = { 7133, 8244 }
|
||||
for m=1, #mushrooms do
|
||||
|
@ -1076,6 +1077,7 @@ local function register_mgv6_decorations()
|
|||
num_spawn_by = 1,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Dead bushes
|
||||
minetest.register_decoration({
|
||||
|
@ -1752,6 +1754,10 @@ end
|
|||
-- Generate mushrooms in caves manually.
|
||||
-- Minetest's API does not support decorations in caves yet. :-(
|
||||
local function generate_underground_mushrooms(minp, maxp, seed)
|
||||
if not minetest.get_modpath("mcl_mushrooms") then
|
||||
return
|
||||
end
|
||||
|
||||
local pr_shroom = PseudoRandom(seed-24359)
|
||||
-- Generate rare underground mushrooms
|
||||
-- TODO: Make them appear in groups, use Perlin noise
|
||||
|
@ -1828,6 +1834,7 @@ local function generate_nether_decorations(minp, maxp, seed)
|
|||
|
||||
-- Mushrooms on netherrack
|
||||
-- Note: Spawned *after* the fire because of light level checks
|
||||
if minetest.get_modpath("mcl_mushrooms") then
|
||||
special_deco(rack, function(bpos)
|
||||
local l = minetest.get_node_light(bpos, 0.5)
|
||||
if bpos.y > mcl_vars.mg_lava_nether_max + 6 and l and l <= 12 and pr_nether:next(1,1000) <= 4 then
|
||||
|
@ -1839,6 +1846,7 @@ local function generate_nether_decorations(minp, maxp, seed)
|
|||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- Nether wart on soul sand
|
||||
-- TODO: Spawn in Nether fortresses
|
||||
|
|
|
@ -2,4 +2,4 @@ name = mcl_mapgen_core
|
|||
author = Wuzzy
|
||||
description = The core of the MCL2 mapgen
|
||||
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, mcl_flowers, mcl_farming
|
||||
optional_depends = mclx_core, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures, mcl_flowers, mcl_farming, mcl_mushrooms
|
||||
|
|
Loading…
Reference in New Issue