Weather overwrites sky in Overworld only
parent
cb1dbcb2db
commit
a1ed8380c0
|
@ -74,7 +74,8 @@ skycolor = {
|
||||||
players = skycolor.utils.get_players(players)
|
players = skycolor.utils.get_players(players)
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
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)
|
player:set_sky(color, "plain", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -112,7 +113,8 @@ skycolor = {
|
||||||
local players = skycolor.utils.get_players(nil)
|
local players = skycolor.utils.get_players(nil)
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
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)
|
player:set_sky(color, "plain", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -125,7 +127,8 @@ skycolor = {
|
||||||
local players = skycolor.utils.get_players(players)
|
local players = skycolor.utils.get_players(players)
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
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)
|
player:set_sky(nil, "regular", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue