From 41f45d8c38191861e6c671931d0839c57efeb70a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 16 Aug 2017 15:40:12 +0200 Subject: [PATCH] Update sky blackening when player's in void --- mods/PLAYER/mcl_playerplus/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 88cae8319d..6517158a21 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -152,14 +152,14 @@ minetest.register_globalstep(function(dtime) end -- Apply black sky in the Void and deal Void damage - if pos.y < mcl_vars.mg_bedrock_overworld_max then + local void, void_deadly = mcl_util.is_in_void(pos) + if void then -- Player reached the void, set black sky box 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 - local void, void_deadly = mcl_util.is_in_void(pos) if void_deadly then -- Player is deep into the void, deal void damage if player:get_hp() > 0 then