From a1ed8380c01dae6adf666497b99acccc58282a54 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 18 Aug 2017 14:19:43 +0200 Subject: [PATCH] Weather overwrites sky in Overworld only --- mods/ENVIRONMENT/weather_pack/skycolor.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/ENVIRONMENT/weather_pack/skycolor.lua b/mods/ENVIRONMENT/weather_pack/skycolor.lua index 6fe3870b1e..0131c2383b 100644 --- a/mods/ENVIRONMENT/weather_pack/skycolor.lua +++ b/mods/ENVIRONMENT/weather_pack/skycolor.lua @@ -74,7 +74,8 @@ skycolor = { players = skycolor.utils.get_players(players) for _, player in ipairs(players) do local pos = player:getpos() - if pos.y >= mcl_vars.mg_bedrock_overworld_max then + local _, dim = mcl_util.y_to_layer(pos.y) + if dim == "overworld" then player:set_sky(color, "plain", nil, true) end end @@ -112,7 +113,8 @@ skycolor = { local players = skycolor.utils.get_players(nil) for _, player in ipairs(players) do local pos = player:getpos() - if pos.y >= mcl_vars.mg_bedrock_overworld_max then + local _, dim = mcl_util.y_to_layer(pos.y) + if dim == "overworld" then player:set_sky(color, "plain", nil, true) end end @@ -125,7 +127,8 @@ skycolor = { local players = skycolor.utils.get_players(players) for _, player in ipairs(players) do local pos = player:getpos() - if pos.y >= mcl_vars.mg_bedrock_overworld_max then + local _, dim = mcl_util.y_to_layer(pos.y) + if dim == "overworld" then player:set_sky(nil, "regular", nil, true) end end