From 8299e4b67eff48e0f6e101afea2fae8f0e65c421 Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 14 Jun 2017 02:00:51 +0100 Subject: Biomes/decorations/ores: Make relative to 'water_level' setting Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level' argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()' to allow mapgens to vertically shift the registered biomes, decorations and ores per-mapchunk. Will also allow many realm possibilities in future mapgens. --- src/mg_decoration.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mg_decoration.h') diff --git a/src/mg_decoration.h b/src/mg_decoration.h index 968c78612..a7fdb97fe 100644 --- a/src/mg_decoration.h +++ b/src/mg_decoration.h @@ -70,7 +70,8 @@ public: virtual void resolveNodeNames(); bool canPlaceDecoration(MMVManip *vm, v3s16 p); - size_t placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); + size_t placeDeco(Mapgen *mg, u32 blockseed, + v3s16 nmin, v3s16 nmax, s16 deco_zero_level); //size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p) = 0; @@ -145,7 +146,8 @@ public: } } - size_t placeAllDecos(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); + size_t placeAllDecos(Mapgen *mg, u32 blockseed, + v3s16 nmin, v3s16 nmax, s16 deco_zero_level = 0); }; #endif -- cgit v1.2.3