Generate lily pads also in 2 node deep water in swamps

This commit is contained in:
Wuzzy 2017-09-08 22:04:05 +02:00
parent 0259353b6f
commit f9bc27967d
1 changed files with 36 additions and 24 deletions

View File

@ -2042,31 +2042,43 @@ local function register_decorations()
}) })
-- Lily pad -- Lily pad
minetest.register_decoration({
deco_type = "schematic", local lily_schem = {
schematic = { { name = "mcl_core:water_source" },
size = { x=1, y=3, z=1 }, { name = "mcl_flowers:waterlily" },
data = { }
{ name = "mcl_core:water_source", prob = 0 },
{ name = "mcl_core:water_source" }, -- Spawn them in shallow water at ocean level in swamplands.
{ name = "mcl_flowers:waterlily", param1 = 255 }, -- Tweak lilydepth to change the maximum water depth
local lilydepth = 2
for d=1, lilydepth do
local height = d + 2
local y = 1 - d
table.insert(lily_schem, 1, { name = "air", prob = 0 })
minetest.register_decoration({
deco_type = "schematic",
schematic = {
size = { x=1, y=height, z=1 },
data = lily_schem,
}, },
}, place_on = "mcl_core:dirt",
place_on = "mcl_core:dirt", sidelen = 16,
sidelen = 16, noise_params = {
noise_params = { offset = 0,
offset = 0, scale = 0.3,
scale = 0.3, spread = {x = 100, y = 100, z = 100},
spread = {x = 100, y = 100, z = 100}, seed = 503,
seed = 503, octaves = 6,
octaves = 6, persist = 0.7,
persist = 0.7, },
}, y_min = y,
y_min = 0, y_max = y,
y_max = 0, biomes = { "swampland_shore" },
biomes = { "swampland_shore" }, rotation = "random",
rotation = "random", })
}) end
-- Melon -- Melon
minetest.register_decoration({ minetest.register_decoration({