From 7ade843e29265280302f7a8f71803bf408968357 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 22 Aug 2017 17:40:54 +0200 Subject: [PATCH] Generate lily pads --- mods/MAPGEN/mcl_biomes/init.lua | 29 +++++++++++++++++++++++++ mods/MAPGEN/mcl_mapgen_core/init.lua | 32 +++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index ee97273e97..16d2d0c453 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1537,6 +1537,35 @@ local function register_decorations() -- TODO: Make exclusive to sunflower plains register_large_flower("sunflower", {"grassland", "sunflower_plains"}, 2940, -0.005) + -- Lily pad + -- Spawn on Sea level in swamps only + minetest.register_decoration({ + deco_type = "schematic", + schematic = { + size = { x=1, y=3, z=1 }, + data = { + { name = "mcl_core:water_source", prob = 0 }, + { name = "mcl_core:water_source" }, + { name = "mcl_flowers:waterlily", param1 = 255 }, + }, + }, + place_on = "mcl_core:dirt", + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 100, y = 100, z = 100}, + seed = 503, + octaves = 6, + persist = 0.7, + }, + y_min = 0, + y_max = 0, + -- TODO: optimize spawn in real swamps + biomes = { "rainforest_swamp", "swamp" }, + rotation = "random", + }) + -- Melon minetest.register_decoration({ deco_type = "simple", diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index c99073e9e9..2325fdac38 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -651,8 +651,8 @@ local function register_mgv6_decorations() size = { x=1, y=3, z=1 }, data = { { name = "air", prob = 0 }, - { name = "mcl_flowers:double_grass", param1=255, }, - { name = "mcl_flowers:double_grass_top", param1=255, }, + { name = "mcl_flowers:double_grass", param1 = 255, }, + { name = "mcl_flowers:double_grass_top", param1 = 255, }, }, }, replacements = { @@ -738,6 +738,32 @@ local function register_mgv6_decorations() register_large_flower("lilac", 10600, -0.007) register_large_flower("sunflower", 2940, -0.005) + -- Lily pad + minetest.register_decoration({ + deco_type = "schematic", + schematic = { + size = { x=1, y=3, z=1 }, + data = { + { name = "mcl_core:water_source", prob = 0 }, + { name = "mcl_core:water_source" }, + { name = "mcl_flowers:waterlily", param1 = 255 }, + }, + }, + place_on = "mcl_core:dirt", + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 200, y = 200, z = 200}, + seed = 503, + octaves = 6, + persist = 0.7, + }, + y_min = 0, + y_max = 0, + rotation = "random", + }) + -- Pumpkin minetest.register_decoration({ deco_type = "schematic", @@ -745,7 +771,7 @@ local function register_mgv6_decorations() size = { x=1, y=2, z=1 }, data = { { name = "air", prob = 0 }, - { name = "mcl_farming:pumpkin_face", param1=255, }, + { name = "mcl_farming:pumpkin_face" }, }, }, place_on = {"mcl_core:dirt_with_grass"},