mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Fix crash and rearrange code
This commit is contained in:
parent
cf4b1dbd1d
commit
207c86b813
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue