summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-11 20:33:26 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-11 20:33:26 +0100
commit80d7c88e007c6dd3af629aad7a01fbf911a00d67 (patch)
treef60467bca973ef34b355b53e2d0dbb5554f71ad7 /src/Defines.h
parentMerge branch 'master' into Werror (diff)
parentMerge pull request #791 from mc-server/PieceGenerator (diff)
downloadcuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar.gz
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar.bz2
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar.lz
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar.xz
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.tar.zst
cuberite-80d7c88e007c6dd3af629aad7a01fbf911a00d67.zip
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 592b9434a..3b7654265 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -277,6 +277,26 @@ inline eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace)
+/** Returns the textual representation of the BlockFace constant. */
+inline AString BlockFaceToString(eBlockFace a_BlockFace)
+{
+ switch (a_BlockFace)
+ {
+ case BLOCK_FACE_XM: return "BLOCK_FACE_XM";
+ case BLOCK_FACE_XP: return "BLOCK_FACE_XP";
+ case BLOCK_FACE_YM: return "BLOCK_FACE_YM";
+ case BLOCK_FACE_YP: return "BLOCK_FACE_YP";
+ case BLOCK_FACE_ZM: return "BLOCK_FACE_ZM";
+ case BLOCK_FACE_ZP: return "BLOCK_FACE_ZP";
+ case BLOCK_FACE_NONE: return "BLOCK_FACE_NONE";
+ }
+ return Printf("Unknown BLOCK_FACE: %d", a_BlockFace);
+}
+
+
+
+
+
inline bool IsValidBlock(int a_BlockType)
{
if (