1
0
Fork 0

Set black sky in Nether and End

This commit is contained in:
Wuzzy 2017-08-18 14:54:17 +02:00
parent a1ed8380c0
commit edfa125d38
1 changed files with 6 additions and 5 deletions

View File

@ -153,12 +153,13 @@ minetest.register_globalstep(function(dtime)
-- Apply black sky in the Void and deal Void damage -- Apply black sky in the Void and deal Void damage
local void, void_deadly = mcl_util.is_in_void(pos) local void, void_deadly = mcl_util.is_in_void(pos)
if void then local _, dim = mcl_util.y_to_layer(pos.y)
-- Player reached the void, set black sky box -- Set dimension skies.
player:set_sky("#000000", "plain", nil, false)
-- FIXME: Sky handling in MCL2 is held together with lots of duct tape. -- FIXME: Sky handling in MCL2 is held together with lots of duct tape.
-- This only works beause weather_pack currently does not touch the sky for players below the height used for this check. -- This only works beause weather_pack currently does not touch the sky for players below the height used for this check.
-- There should be a real skybox API. -- There should be a real skybox API.
if dim == "void" or dim == "nether" or dim == "end" then
player:set_sky("#000000", "plain", nil, false)
end end
if void_deadly then if void_deadly then
-- Player is deep into the void, deal void damage -- Player is deep into the void, deal void damage