1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

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.
This commit is contained in:
Paramat 2020-05-20 22:16:14 +01:00 committed by GitHub
parent c47a680db7
commit 42fcfb75e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 45 deletions

View file

@ -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;