From edfa125d3881b75cc84ea3979c5a28ad7b99de18 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 18 Aug 2017 14:54:17 +0200 Subject: [PATCH] Set black sky in Nether and End --- mods/PLAYER/mcl_playerplus/init.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 6517158a2..3f6cc1818 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -153,12 +153,13 @@ minetest.register_globalstep(function(dtime) -- Apply black sky in the Void and deal Void damage local void, void_deadly = mcl_util.is_in_void(pos) - if void then - -- Player reached the void, set black sky box + local _, dim = mcl_util.y_to_layer(pos.y) + -- Set dimension skies. + -- 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. + -- There should be a real skybox API. + if dim == "void" or dim == "nether" or dim == "end" then player:set_sky("#000000", "plain", nil, false) - -- 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. - -- There should be a real skybox API. end if void_deadly then -- Player is deep into the void, deal void damage