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:
parent
c5faa64405
commit
863379a4c6
4 changed files with 20 additions and 11 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue