mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Add new function
Adds the `get_registered_biome_from_pos` function, which does what the name says.
This commit is contained in:
parent
81dbdaab94
commit
b4e84dadb0
1 changed files with 10 additions and 0 deletions
|
@ -1011,3 +1011,13 @@ function mcl_util.check_position_protection(position, player)
|
|||
|
||||
return false
|
||||
end
|
||||
|
||||
function mcl_util.get_registered_biome_from_pos(pos)
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
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]
|
||||
return reg_biome
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue