(the full code)
Code: Select all
local biome=""
local bname=minetest.get_biome_name(minetest.get_biome_data(player:get_pos())["biome"])
print(bname)
if string.find(bname, "%_") then
local sbname = string.split(bname, "_")
biome=sbname[1]
print(1)
else
biome=bname
print(2)
end
print(biome)
For example: in the biome "plains", the code returns the biome name "jungle". does anyone know why this is happening.
(If this is just ambiguity about biome limits, could anyone recommend a better way to find the current biome?)