2014-01-09 16:21:46 -05:00
|
|
|
|
|
|
|
// BiomeDef.h
|
|
|
|
|
|
|
|
// Defines relevant information and methods related to biomes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
2014-05-03 09:02:51 -04:00
|
|
|
#include "StringUtils.h"
|
2014-01-09 16:21:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
// tolua_begin
|
|
|
|
/** Biome IDs
|
|
|
|
The first batch corresponds to the clientside biomes, used by MineCraft.
|
|
|
|
BiomeIDs over 255 are used by MCServer internally and are translated to MC biomes before sending them to client
|
|
|
|
*/
|
|
|
|
enum EMCSBiome
|
|
|
|
{
|
2014-02-03 15:26:17 -05:00
|
|
|
biInvalidBiome = -1,
|
|
|
|
|
|
|
|
biFirstBiome = 0,
|
2014-01-09 16:21:46 -05:00
|
|
|
biOcean = 0,
|
|
|
|
biPlains = 1,
|
|
|
|
biDesert = 2,
|
|
|
|
biExtremeHills = 3,
|
|
|
|
biForest = 4,
|
|
|
|
biTaiga = 5,
|
|
|
|
biSwampland = 6,
|
|
|
|
biRiver = 7,
|
|
|
|
biHell = 8, // same as Nether
|
|
|
|
biNether = 8,
|
|
|
|
biSky = 9, // same as biEnd
|
|
|
|
biEnd = 9,
|
|
|
|
biFrozenOcean = 10,
|
|
|
|
biFrozenRiver = 11,
|
|
|
|
biIcePlains = 12,
|
|
|
|
biTundra = 12, // same as Ice Plains
|
|
|
|
biIceMountains = 13,
|
|
|
|
biMushroomIsland = 14,
|
|
|
|
biMushroomShore = 15,
|
|
|
|
biBeach = 16,
|
|
|
|
biDesertHills = 17,
|
|
|
|
biForestHills = 18,
|
|
|
|
biTaigaHills = 19,
|
|
|
|
biExtremeHillsEdge = 20,
|
|
|
|
biJungle = 21,
|
|
|
|
biJungleHills = 22,
|
|
|
|
|
|
|
|
// Release 1.7 biomes:
|
|
|
|
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,
|
|
|
|
|
|
|
|
// Automatically capture the maximum consecutive biome value into biMaxBiome:
|
|
|
|
biNumBiomes, // True number of biomes, since they are zero-based
|
|
|
|
biMaxBiome = biNumBiomes - 1, // The maximum biome value
|
|
|
|
|
|
|
|
// Add this number to the biomes to get the variant
|
|
|
|
biVariant = 128,
|
|
|
|
|
|
|
|
// Release 1.7 biome variants:
|
2014-02-03 16:01:12 -05:00
|
|
|
biFirstVariantBiome = 129,
|
2014-01-09 16:21:46 -05:00
|
|
|
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,
|
2014-02-03 15:26:17 -05:00
|
|
|
// Automatically capture the maximum consecutive biome value into biVarientMaxBiome:
|
2014-02-03 16:01:12 -05:00
|
|
|
biNumVariantBiomes, // True number of biomes, since they are zero-based
|
|
|
|
biMaxVariantBiome = biNumVariantBiomes - 1, // The maximum biome value
|
2014-01-09 16:21:46 -05:00
|
|
|
} ;
|
|
|
|
|
2014-04-29 09:36:05 -04:00
|
|
|
/** Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure. */
|
2014-01-09 16:21:46 -05:00
|
|
|
extern EMCSBiome StringToBiome(const AString & a_BiomeString);
|
|
|
|
|
2014-04-29 09:36:05 -04:00
|
|
|
/** Translates biome enum into biome string. Returns empty string on failure (unknown biome). */
|
|
|
|
extern AString BiomeToString(int a_Biome);
|
|
|
|
|
|
|
|
/** Returns true if the biome has no downfall - deserts and savannas */
|
2014-01-09 16:21:46 -05:00
|
|
|
extern bool IsBiomeNoDownfall(EMCSBiome a_Biome);
|
|
|
|
|
2014-10-26 14:58:16 -04:00
|
|
|
/** Returns true if the biome is an ocean biome. */
|
|
|
|
inline bool IsBiomeOcean(int a_Biome)
|
|
|
|
{
|
|
|
|
return ((a_Biome == biOcean) || (a_Biome == biDeepOcean));
|
|
|
|
}
|
|
|
|
|
2014-10-26 13:17:04 -04:00
|
|
|
/** 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. */
|
|
|
|
extern bool IsBiomeVeryCold(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. */
|
|
|
|
extern bool IsBiomeCold(EMCSBiome a_Biome);
|
2014-01-09 16:21:46 -05:00
|
|
|
|
2015-02-25 13:00:52 -05:00
|
|
|
/** Returns the height when a biome when a biome starts snowing.*/
|
2015-02-28 11:27:28 -05:00
|
|
|
extern int GetSnowStartHeight(EMCSBiome a_Biome);
|
2015-02-25 13:00:52 -05:00
|
|
|
|
2014-01-10 11:10:24 -05:00
|
|
|
// tolua_end
|