From dc4ccf91cc5a11eceed01c5e4b6525d4ee8069ca Mon Sep 17 00:00:00 2001 From: kay27 Date: Wed, 13 Apr 2022 23:29:14 +0200 Subject: [PATCH] lift clouds to 384 in valleys mapgen Valleys has a much higher average elevation than v7 often leading to "normal" looking terrain being in the clouds. This lifts the clouds up higher. --- mods/CORE/mcl_worlds/init.lua | 19 +++++++++++++++++++ mods/ENVIRONMENT/mcl_weather/skycolor.lua | 3 +-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_worlds/init.lua b/mods/CORE/mcl_worlds/init.lua index 203f69401..4f8914506 100644 --- a/mods/CORE/mcl_worlds/init.lua +++ b/mods/CORE/mcl_worlds/init.lua @@ -153,3 +153,22 @@ minetest.register_globalstep(function(dtime) end end) +function mcl_worlds.get_cloud_parameters() + if minetest.get_mapgen_setting("mg_name") == "valleys" then + return { + height = 384, --valleys has a much higher average elevation thus often "normal" landscape ends up in the clouds + speed = {x=-2, z=0}, + thickness=5, + color="#FFF0FEF", + ambient = "#201060", + } + else + -- MC-style clouds: Layer 127, thickness 4, fly to the “West” + return { + height = mcl_worlds.layer_to_y(127), + speed = {x=-2, z=0}, + thickness = 4, + color = "#FFF0FEF", + } + end +end diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index 6b89c33be..7b6183d44 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -240,8 +240,7 @@ local function initsky(player) mcl_weather.skycolor.force_update = true end - -- MC-style clouds: Layer 127, thickness 4, fly to the “West” - player:set_clouds({height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"}) + player:set_clouds(mcl_worlds:get_cloud_parameters() or {height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"}) end minetest.register_on_joinplayer(initsky)