mcl_mapgen_core: Make mcl_farming an optional dependency.

mcl_farming was previously an undeclared dependency of mcl_mapgen_core.
Now it is both optional and declared.
This commit is contained in:
Daniel Cassidy 2022-01-06 02:33:04 +00:00
parent 1d03a3d150
commit 554f22b802
2 changed files with 42 additions and 40 deletions

View File

@ -843,46 +843,48 @@ local function register_mgv6_decorations()
}) })
end end
-- Pumpkin if minetest.get_modpath("mcl_farming") then
minetest.register_decoration({ -- Pumpkin
deco_type = "simple", minetest.register_decoration({
decoration = "mcl_farming:pumpkin_face", deco_type = "simple",
param2 = 0, decoration = "mcl_farming:pumpkin_face",
param2_max = 3, param2 = 0,
place_on = {"group:grass_block_no_snow"}, param2_max = 3,
sidelen = 16, place_on = {"group:grass_block_no_snow"},
noise_params = { sidelen = 16,
offset = -0.008, noise_params = {
scale = 0.00666, offset = -0.008,
spread = {x = 250, y = 250, z = 250}, scale = 0.00666,
seed = 666, spread = {x = 250, y = 250, z = 250},
octaves = 6, seed = 666,
persist = 0.666 octaves = 6,
}, persist = 0.666
y_min = 1, },
y_max = mcl_vars.overworld_max, y_min = 1,
}) y_max = mcl_vars.overworld_max,
})
-- Melon -- Melon
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"group:grass_block_no_snow"}, place_on = {"group:grass_block_no_snow"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = 0.002, offset = 0.002,
scale = 0.006, scale = 0.006,
spread = {x = 250, y = 250, z = 250}, spread = {x = 250, y = 250, z = 250},
seed = 333, seed = 333,
octaves = 3, octaves = 3,
persist = 0.6 persist = 0.6
}, },
-- Small trick to make sure melon spawn in jungles -- Small trick to make sure melon spawn in jungles
spawn_by = spawn_by_in_jungle, spawn_by = spawn_by_in_jungle,
num_spawn_by = 1, num_spawn_by = 1,
y_min = 1, y_min = 1,
y_max = 40, y_max = 40,
decoration = "mcl_farming:melon", decoration = "mcl_farming:melon",
}) })
end
-- Tall grass -- Tall grass
if minetest.get_modpath("mcl_flowers") then if minetest.get_modpath("mcl_flowers") then

View File

@ -2,4 +2,4 @@ name = mcl_mapgen_core
author = Wuzzy author = Wuzzy
description = The core of the MCL2 mapgen description = The core of the MCL2 mapgen
depends = mcl_init, mcl_core, biomeinfo, mcl_worlds 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 optional_depends = mclx_core, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures, mcl_flowers, mcl_farming