Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Enumerations | Functions
BiomeDef.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BiomeHasher
 Hash for EMCSBiome, so that it can be used in std::unordered_map etc. More...
 

Enumerations

enum  EMCSBiome {
  biInvalidBiome = -1, biFirstBiome = 0, biOcean = 0, biPlains = 1,
  biDesert = 2, biExtremeHills = 3, biForest = 4, biTaiga = 5,
  biSwampland = 6, biRiver = 7, biHell = 8, biNether = 8,
  biSky = 9, biEnd = 9, biFrozenOcean = 10, biFrozenRiver = 11,
  biIcePlains = 12, biTundra = 12, biIceMountains = 13, biMushroomIsland = 14,
  biMushroomShore = 15, biBeach = 16, biDesertHills = 17, biForestHills = 18,
  biTaigaHills = 19, biExtremeHillsEdge = 20, biJungle = 21, biJungleHills = 22,
  biJungleEdge = 23, biDeepOcean = 24, biStoneBeach = 25, biColdBeach = 26,
  biBirchForest = 27, biBirchForestHills = 28, biRoofedForest = 29, biColdTaiga = 30,
  biColdTaigaHills = 31, biMegaTaiga = 32, biMegaTaigaHills = 33, biExtremeHillsPlus = 34,
  biSavanna = 35, biSavannaPlateau = 36, biMesa = 37, biMesaPlateauF = 38,
  biMesaPlateau = 39, biNumBiomes, biMaxBiome = biNumBiomes - 1, biVariant = 128,
  biFirstVariantBiome = 129, biSunflowerPlains = 129, biDesertM = 130, biExtremeHillsM = 131,
  biFlowerForest = 132, biTaigaM = 133, biSwamplandM = 134, biIcePlainsSpikes = 140,
  biJungleM = 149, biJungleEdgeM = 151, biBirchForestM = 155, biBirchForestHillsM = 156,
  biRoofedForestM = 157, biColdTaigaM = 158, biMegaSpruceTaiga = 160, biMegaSpruceTaigaHills = 161,
  biExtremeHillsPlusM = 162, biSavannaM = 163, biSavannaPlateauM = 164, biMesaBryce = 165,
  biMesaPlateauFM = 166, biMesaPlateauM = 167, biNumVariantBiomes, biMaxVariantBiome = biNumVariantBiomes - 1
}
 Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft. More...
 

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 IsBiomeOcean (int a_Biome)
 Returns true if the biome is an ocean biome. 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...
 

Enumeration Type Documentation

◆ EMCSBiome

enum EMCSBiome

Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft.

BiomeIDs over 255 are used by Cuberite internally and are translated to MC biomes before sending them to client

Enumerator
biInvalidBiome 
biFirstBiome 
biOcean 
biPlains 
biDesert 
biExtremeHills 
biForest 
biTaiga 
biSwampland 
biRiver 
biHell 
biNether 
biSky 
biEnd 
biFrozenOcean 
biFrozenRiver 
biIcePlains 
biTundra 
biIceMountains 
biMushroomIsland 
biMushroomShore 
biBeach 
biDesertHills 
biForestHills 
biTaigaHills 
biExtremeHillsEdge 
biJungle 
biJungleHills 
biJungleEdge 
biDeepOcean 
biStoneBeach 
biColdBeach 
biBirchForest 
biBirchForestHills 
biRoofedForest 
biColdTaiga 
biColdTaigaHills 
biMegaTaiga 
biMegaTaigaHills 
biExtremeHillsPlus 
biSavanna 
biSavannaPlateau 
biMesa 
biMesaPlateauF 
biMesaPlateau 
biNumBiomes 
biMaxBiome 
biVariant 
biFirstVariantBiome 
biSunflowerPlains 
biDesertM 
biExtremeHillsM 
biFlowerForest 
biTaigaM 
biSwamplandM 
biIcePlainsSpikes 
biJungleM 
biJungleEdgeM 
biBirchForestM 
biBirchForestHillsM 
biRoofedForestM 
biColdTaigaM 
biMegaSpruceTaiga 
biMegaSpruceTaigaHills 
biExtremeHillsPlusM 
biSavannaM 
biSavannaPlateauM 
biMesaBryce 
biMesaPlateauFM 
biMesaPlateauM 
biNumVariantBiomes 
biMaxVariantBiome 

Definition at line 17 of file BiomeDef.h.

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.

◆ IsBiomeOcean()

bool IsBiomeOcean ( int  a_Biome)
inline

Returns true if the biome is an ocean biome.

Definition at line 135 of file BiomeDef.h.

◆ 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.