#define BIOME_NONE ((biome_t)0)
-// TODO(hmmmm): Decide whether this is obsolete or will be used in the future
enum BiomeType {
BIOMETYPE_NORMAL,
- BIOMETYPE_LIQUID,
- BIOMETYPE_NETHER,
- BIOMETYPE_AETHER,
- BIOMETYPE_FLAT,
};
class Biome : public ObjDef, public NodeResolver {
content_t c_river_water;
content_t c_riverbed;
content_t c_dust;
+ content_t c_cave_liquid;
+ content_t c_dungeon;
+ content_t c_dungeon_alt;
+ content_t c_dungeon_stair;
s16 depth_top;
s16 depth_filler;
s16 depth_water_top;
s16 depth_riverbed;
- s16 y_min;
- s16 y_max;
+ v3s16 min_pos;
+ v3s16 max_pos;
float heat_point;
float humidity_point;
s16 vertical_blend;
// Gets all biomes in current chunk using each corresponding element of
// heightmap as the y position, then stores the results by biome index in
// biomemap (also returned)
- virtual biome_t *getBiomes(s16 *heightmap) = 0;
+ virtual biome_t *getBiomes(s16 *heightmap, v3s16 pmin) = 0;
// Gets a single biome at the specified position, which must be contained
// in the region formed by m_pmin and (m_pmin + m_csize - 1).
virtual Biome *getBiomeAtPoint(v3s16 pos) const = 0;
// Same as above, but uses a raw numeric index correlating to the (x,z) position.
- virtual Biome *getBiomeAtIndex(size_t index, s16 y) const = 0;
+ virtual Biome *getBiomeAtIndex(size_t index, v3s16 pos) const = 0;
// Result of calcBiomes bulk computation.
biome_t *biomemap = nullptr;
Biome *calcBiomeAtPoint(v3s16 pos) const;
void calcBiomeNoise(v3s16 pmin);
- biome_t *getBiomes(s16 *heightmap);
+ biome_t *getBiomes(s16 *heightmap, v3s16 pmin);
Biome *getBiomeAtPoint(v3s16 pos) const;
- Biome *getBiomeAtIndex(size_t index, s16 y) const;
+ Biome *getBiomeAtIndex(size_t index, v3s16 pos) const;
- Biome *calcBiomeFromNoise(float heat, float humidity, s16 y) const;
+ Biome *calcBiomeFromNoise(float heat, float humidity, v3s16 pos) const;
float *heatmap;
float *humidmap;
virtual void clear();
+ // For BiomeGen type 'BiomeGenOriginal'
+ float getHeatAtPosOriginal(v3s16 pos, NoiseParams &np_heat,
+ NoiseParams &np_heat_blend, u64 seed);
+ float getHumidityAtPosOriginal(v3s16 pos, NoiseParams &np_humidity,
+ NoiseParams &np_humidity_blend, u64 seed);
+ Biome *getBiomeFromNoiseOriginal(float heat, float humidity, v3s16 pos);
+
private:
Server *m_server;