summaryrefslogtreecommitdiffstats
path: root/src/BiomeDef.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-20 15:37:41 +0200
committerMattes D <github@xoft.cz>2015-06-20 15:37:41 +0200
commite06dd8f20ec3e6817e5638d5101cb8dc776846b4 (patch)
tree7400062806953c5fc1d8abd3ab9eaa74800d4872 /src/BiomeDef.h
parentMerge pull request #2255 from cuberite/LoadablePieces (diff)
downloadcuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar.gz
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar.bz2
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar.lz
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar.xz
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.tar.zst
cuberite-e06dd8f20ec3e6817e5638d5101cb8dc776846b4.zip
Diffstat (limited to 'src/BiomeDef.h')
-rw-r--r--src/BiomeDef.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/BiomeDef.h b/src/BiomeDef.h
index cda12556a..32d3a5cfd 100644
--- a/src/BiomeDef.h
+++ b/src/BiomeDef.h
@@ -104,6 +104,28 @@ enum EMCSBiome
biMaxVariantBiome = biNumVariantBiomes - 1, // The maximum biome value
} ;
+// tolua_end
+
+
+
+
+
+/** Hash for EMCSBiome, so that it can be used in std::unordered_map etc. */
+struct BiomeHasher
+{
+public:
+ std::size_t operator() (const EMCSBiome a_Biome) const
+ {
+ return static_cast<std::size_t>(a_Biome);
+ }
+};
+
+
+
+
+
+// tolua_begin
+
/** Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure. */
extern EMCSBiome StringToBiome(const AString & a_BiomeString);