diff options
author | Paramat <paramat@users.noreply.github.com> | 2020-05-20 22:16:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 22:16:14 +0100 |
commit | 42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6 (patch) | |
tree | 5a76856ca96330263cce9fae1985172b671c8324 /src/mapgen/mg_decoration.h | |
parent | c47a680db7f3c2f241cc444a1257607492872412 (diff) | |
download | minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.tar.gz minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.tar.bz2 minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.zip |
Allow more than 255 biomes, document new maximum (#9855)
Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
Diffstat (limited to 'src/mapgen/mg_decoration.h')
-rw-r--r-- | src/mapgen/mg_decoration.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mapgen/mg_decoration.h b/src/mapgen/mg_decoration.h index 1f9eb4510..1ea02a527 100644 --- a/src/mapgen/mg_decoration.h +++ b/src/mapgen/mg_decoration.h @@ -25,6 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "noise.h" #include "nodedef.h" +typedef u16 biome_t; // copy from mg_biome.h to avoid an unnecessary include + class Mapgen; class MMVManip; class PcgRandom; @@ -72,7 +74,7 @@ public: s16 nspawnby; s16 place_offset_y = 0; - std::unordered_set<u8> biomes; + std::unordered_set<biome_t> biomes; protected: void cloneTo(Decoration *def) const; |