mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Add extra check to guarantee no nil values
This commit is contained in:
parent
693d40b6c4
commit
8060b02cbd
1 changed files with 1 additions and 1 deletions
|
@ -1023,7 +1023,7 @@ function mcl_util.get_palette_indexes_from_pos(pos)
|
||||||
local biome = biome_data.biome
|
local biome = biome_data.biome
|
||||||
local biome_name = minetest.get_biome_name(biome)
|
local biome_name = minetest.get_biome_name(biome)
|
||||||
local reg_biome = minetest.registered_biomes[biome_name]
|
local reg_biome = minetest.registered_biomes[biome_name]
|
||||||
if reg_biome and reg_biome._mcl_grass_palette_index and reg_biome._mcl_foliage_palette_index then
|
if reg_biome and reg_biome._mcl_grass_palette_index and reg_biome._mcl_foliage_palette_index and reg_biome._mcl_water_palette_index then
|
||||||
local gpi = reg_biome._mcl_grass_palette_index
|
local gpi = reg_biome._mcl_grass_palette_index
|
||||||
local fpi = reg_biome._mcl_foliage_palette_index
|
local fpi = reg_biome._mcl_foliage_palette_index
|
||||||
local wpi = reg_biome._mcl_water_palette_index
|
local wpi = reg_biome._mcl_water_palette_index
|
||||||
|
|
Loading…
Reference in a new issue