From 207c86b813520c6a5e34eb3887504c1bc7c89ed1 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Wed, 12 Jun 2024 20:36:19 -0500 Subject: [PATCH] Fix crash and rearrange code --- mods/ENVIRONMENT/mcl_weather/skycolor/water.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor/water.lua b/mods/ENVIRONMENT/mcl_weather/skycolor/water.lua index c1e9a5927..fd6fc12e2 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor/water.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor/water.lua @@ -2,13 +2,13 @@ local DEFAULT_WATER_COLOR = "#3F76E4" local function water_sky(player, sky_data) - local pos = player:get_pos() local water_color = DEFAULT_WATER_COLOR - local checkname = mcl_playerinfo[name].node_head + local checkname = mcl_playerinfo[player:get_player_name()].node_head if minetest.get_item_group(checkname, "water") == 0 then return end - local biome_index = minetest.get_biome_data(player:get_pos()).biome + local pos = player:get_pos() + local biome_index = minetest.get_biome_data(pos).biome local biome_name = minetest.get_biome_name(biome_index) local biome = minetest.registered_biomes[biome_name] if biome then water_color = biome._mcl_waterfogcolor end