Fix crash with mapgen v6

This commit is contained in:
FossFanatic 2023-02-14 14:01:14 +00:00
parent 57882ae56a
commit 55478f6953

@ -1018,12 +1018,9 @@ function mcl_util.check_position_protection(position, player)
end
function mcl_util.get_registered_biome_from_pos(pos)
local mg_name = minetest.get_mapgen_setting("mg_name")
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
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