mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Improve the new function somewhat
This commit is contained in:
parent
8f8385e4a1
commit
406b27852b
1 changed files with 2 additions and 2 deletions
|
@ -1017,13 +1017,13 @@ function mcl_util.check_position_protection(position, player)
|
|||
return false
|
||||
end
|
||||
|
||||
local palette_indexes = {grass_palette_index = 0, foliage_palette_index = 0}
|
||||
function mcl_util.get_palette_indexes_from_pos(pos)
|
||||
local palette_indexes = {grass_palette_index = 0, foliage_palette_index = 0}
|
||||
local biome_data = minetest.get_biome_data(pos)
|
||||
local biome = biome_data.biome
|
||||
local biome_name = minetest.get_biome_name(biome)
|
||||
local reg_biome = minetest.registered_biomes[biome_name]
|
||||
if reg_biome then
|
||||
if reg_biome and reg_biome._mcl_grass_palette_index and reg_biome._mcl_foliage_palette_index then
|
||||
local gpi = reg_biome._mcl_grass_palette_index
|
||||
local fpi = reg_biome._mcl_foliage_palette_index
|
||||
local palette_indexes = {grass_palette_index = gpi, foliage_palette_index = fpi}
|
||||
|
|
Loading…
Reference in a new issue