0
0
Fork 0

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.
This commit is contained in:
kay27 2022-04-13 23:29:14 +02:00 committed by Gitea
parent 8bf1d2b235
commit dc4ccf91cc
2 changed files with 20 additions and 2 deletions

View File

@ -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

View File

@ -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)