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

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 21 of file BiomeDef.h.

Function Documentation

AString BiomeToString ( int  a_Biome)

Translates biome enum into biome string.

Returns empty string on failure (unknown biome).

Definition at line 124 of file BiomeDef.cpp.

int GetSnowStartHeight ( EMCSBiome  a_Biome)

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

Definition at line 226 of file BiomeDef.cpp.

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 194 of file BiomeDef.cpp.

bool IsBiomeNoDownfall ( EMCSBiome  a_Biome)

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

Definition at line 140 of file BiomeDef.cpp.

bool IsBiomeOcean ( int  a_Biome)
inline

Returns true if the biome is an ocean biome.

Definition at line 139 of file BiomeDef.h.

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 167 of file BiomeDef.cpp.

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 92 of file BiomeDef.cpp.