From 9eb86f011b2906d96acf530dd1c713e23d76123b Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Sat, 24 Dec 2022 14:54:48 +0000 Subject: [PATCH] Make the code clearer to read --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index be45e2a9b..e8123b0d1 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -5,7 +5,7 @@ local water_color = "#0b4880" local mg_name = minetest.get_mapgen_setting("mg_name") -function mcl_weather.set_sky_box_clear(player,sky,fog) +function mcl_weather.set_sky_box_clear(player, sky, fog) local pos = player:get_pos() if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end local sc = { @@ -31,7 +31,7 @@ end function mcl_weather.set_sky_color(player, def) local pos = player:get_pos() - if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end + if minetest.get_item_group(minetest.get_node(vector.offset(pos, 0, 1.5, 0)).name, "water") ~= 0 then return end player:set_sky({ type = def.type, sky_color = def.sky_color,