Spoiler
Code: Select all
diff --git a/realms_map_generators/bf_generic.lua b/realms_map_generators/bf_generic.lua
index add2ba9..b91b522 100644
--- a/realms_map_generators/bf_generic.lua
+++ b/realms_map_generators/bf_generic.lua
@@ -129,10 +129,14 @@ function bf_generic.map_biome_to_surface(parms,biomemap)
--sorted by distance from the center of that vbox. We need to find the first
--one that is in our y range
local i=1
- while compy<voronoi[i].y_min or compy>voronoi[i].y_max and i<#voronoi do i=i+1 end
+ while voronoi[i]
+ and (compy<voronoi[i].y_min or compy>voronoi[i].y_max)
+ and i<#voronoi do
+ i=i+1
+ end
--if it doesnt match anything, you did something very wrong with your biomes
--but we will just pick up the last item in the list
- biome=voronoi[i]
+ biome=voronoi[#voronoi]
--minetest.log("map_biome_to_surface-> "..luautils.pos_to_str_xyz(x,y,z).." compy="..compy.." vx="..vx.." vz="..vz.." biome="..biome.name.." i="..i)
end --if biomemap.typ
And, the decorations are not in the right places (I suspect in the X-Z plane, since it tends to show on slopes).