1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Decoration: Add height_min and height_max parameters

Also set default height_min/height_max to -31000 and 31000,
respectively, for ore and biomes
This commit is contained in:
kwolekr 2014-12-28 22:37:27 -05:00
parent c5faa64405
commit 863379a4c6
4 changed files with 20 additions and 11 deletions

View file

@ -140,7 +140,8 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
mg->heightmap[mapindex] :
mg->findGroundLevel(v2s16(x, z), nmin.Y, nmax.Y);
if (y < nmin.Y || y > nmax.Y)
if (y < nmin.Y || y > nmax.Y ||
y < height_min || y > height_max)
continue;
int height = getHeight();