From 863379a4c68b9862ea6913c1b1e475d022aba100 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sun, 28 Dec 2014 22:37:27 -0500 Subject: Decoration: Add height_min and height_max parameters Also set default height_min/height_max to -31000 and 31000, respectively, for ore and biomes --- src/mg_decoration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mg_decoration.cpp') diff --git a/src/mg_decoration.cpp b/src/mg_decoration.cpp index 50e8fb05a..dec82a638 100644 --- a/src/mg_decoration.cpp +++ b/src/mg_decoration.cpp @@ -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(); -- cgit v1.2.3