mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-20 01:51:06 +01:00
Generate lily pads also in 2 node deep water in swamps
This commit is contained in:
parent
0259353b6f
commit
f9bc27967d
1 changed files with 36 additions and 24 deletions
|
@ -2042,15 +2042,26 @@ local function register_decorations()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Lily pad
|
-- Lily pad
|
||||||
|
|
||||||
|
local lily_schem = {
|
||||||
|
{ name = "mcl_core:water_source" },
|
||||||
|
{ name = "mcl_flowers:waterlily" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Spawn them in shallow water at ocean level in swamplands.
|
||||||
|
-- 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({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
schematic = {
|
schematic = {
|
||||||
size = { x=1, y=3, z=1 },
|
size = { x=1, y=height, z=1 },
|
||||||
data = {
|
data = lily_schem,
|
||||||
{ name = "mcl_core:water_source", prob = 0 },
|
|
||||||
{ name = "mcl_core:water_source" },
|
|
||||||
{ name = "mcl_flowers:waterlily", param1 = 255 },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
place_on = "mcl_core:dirt",
|
place_on = "mcl_core:dirt",
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
|
@ -2062,11 +2073,12 @@ local function register_decorations()
|
||||||
octaves = 6,
|
octaves = 6,
|
||||||
persist = 0.7,
|
persist = 0.7,
|
||||||
},
|
},
|
||||||
y_min = 0,
|
y_min = y,
|
||||||
y_max = 0,
|
y_max = y,
|
||||||
biomes = { "swampland_shore" },
|
biomes = { "swampland_shore" },
|
||||||
rotation = "random",
|
rotation = "random",
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Melon
|
-- Melon
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
|
Loading…
Reference in a new issue