#256 Lift up clouds for valleys

This commit is contained in:
kay27 2022-03-17 05:40:28 +04:00
parent cb4bb79224
commit a6e4de2b6b
3 changed files with 22 additions and 2 deletions

View File

@ -325,7 +325,7 @@ minetest.register_on_generated(function(minp, maxp, chunkseed)
-- mcl_mapgen.register_mapgen_lvm(function(vm_context), order_number) -- -- mcl_mapgen.register_mapgen_lvm(function(vm_context), order_number) --
-- -- -- --
for _, v in pairs(queue_chunks_lvm) do for _, v in pairs(queue_chunks_lvm) do
vm_context = v.f(vm_context) v.f(vm_context)
end end
-- -- -- --
-- mcl_mapgen.register_mapgen(function(minp, maxp, chunkseed, vm_context), order_number) -- -- mcl_mapgen.register_mapgen(function(minp, maxp, chunkseed, vm_context), order_number) --

View File

@ -152,3 +152,23 @@ minetest.register_globalstep(function(dtime)
dimtimer = 0 dimtimer = 0
end end
end) end)
function mcl_worlds.get_cloud_parameters()
if mcl_mapgen.name == "valleys" then
return {
height = 384,
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

@ -241,7 +241,7 @@ local function initsky(player)
end end
-- MC-style clouds: Layer 127, thickness 4, fly to the “West” -- 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 end
minetest.register_on_joinplayer(initsky) minetest.register_on_joinplayer(initsky)