Cuberite
A lightweight, fast and extensible game server for Minecraft
Functions | Variables
BiomeDef.cpp File Reference
#include "Globals.h"
#include "BiomeDef.h"
Include dependency graph for BiomeDef.cpp:

Go to the source code of this file.

Functions

AString BiomeToString (int a_Biome)
 Translates biome enum into biome string. More...
 
int GetSnowStartHeight (EMCSBiome a_Biome)
 Returns the height when a biome when a biome starts snowing. More...
 
bool IsBiomeCold (EMCSBiome a_Biome)
 Returns true if the biome is cold (has snow and snowfall at higher elevations but not at regular heights). More...
 
bool IsBiomeMesa (EMCSBiome a_Biome)
 Returns true if the biome is Mesa or one of its mutations. More...
 
bool IsBiomeMountain (EMCSBiome a_Biome)
 Returns true if the biome is mountainous (mutations of the extreme hills biome) More...
 
bool IsBiomeNoDownfall (EMCSBiome a_Biome)
 Returns true if the biome has no downfall - deserts and savannas. More...
 
bool IsBiomeVeryCold (EMCSBiome a_Biome)
 Returns true if the biome is very cold (has snow on ground everywhere, turns top water to ice, has snowfall instead of rain everywhere). More...
 
EMCSBiome StringToBiome (const AString &a_BiomeString)
 Translates a biome string to biome enum. More...
 

Variables

struct {
   EMCSBiome   m_Biome
 
   const char *   m_String
 
g_BiomeMap []
 

Function Documentation

◆ BiomeToString()

AString BiomeToString ( int  a_Biome)

Translates biome enum into biome string.

Returns empty string on failure (unknown biome).

Definition at line 126 of file BiomeDef.cpp.

◆ GetSnowStartHeight()

int GetSnowStartHeight ( EMCSBiome  a_Biome)

Returns the height when a biome when a biome starts snowing.

Definition at line 275 of file BiomeDef.cpp.

◆ IsBiomeCold()

bool IsBiomeCold ( EMCSBiome  a_Biome)

Returns true if the biome is cold (has snow and snowfall at higher elevations but not at regular heights).

Doesn't report Very Cold biomes, use IsBiomeVeryCold() for those.

Definition at line 196 of file BiomeDef.cpp.

◆ IsBiomeMesa()

bool IsBiomeMesa ( EMCSBiome  a_Biome)

Returns true if the biome is Mesa or one of its mutations.

Definition at line 251 of file BiomeDef.cpp.

◆ IsBiomeMountain()

bool IsBiomeMountain ( EMCSBiome  a_Biome)

Returns true if the biome is mountainous (mutations of the extreme hills biome)

Definition at line 228 of file BiomeDef.cpp.

◆ IsBiomeNoDownfall()

bool IsBiomeNoDownfall ( EMCSBiome  a_Biome)

Returns true if the biome has no downfall - deserts and savannas.

Definition at line 142 of file BiomeDef.cpp.

◆ IsBiomeVeryCold()

bool IsBiomeVeryCold ( EMCSBiome  a_Biome)

Returns true if the biome is very cold (has snow on ground everywhere, turns top water to ice, has snowfall instead of rain everywhere).

Doesn't report mildly cold biomes (where it snows above certain elevation), use IsBiomeCold() for those.

Definition at line 169 of file BiomeDef.cpp.

◆ StringToBiome()

EMCSBiome StringToBiome ( const AString a_BiomeString)

Translates a biome string to biome enum.

Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure.

Definition at line 94 of file BiomeDef.cpp.

Variable Documentation

◆ 

struct { ... } g_BiomeMap[]

◆ m_Biome

EMCSBiome m_Biome

Definition at line 16 of file BiomeDef.cpp.

◆ m_String

const char* m_String

Definition at line 17 of file BiomeDef.cpp.