summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-09 10:05:30 +0100
committermadmaxoft <github@xoft.cz>2014-03-09 15:24:11 +0100
commit5be983e7752091adbf7262f3074b3062ea44ae73 (patch)
tree9bccee2ef0ce473c378be002a6e14209dd754c83 /src
parentAdded Vector3i::Move(). (diff)
downloadcuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar.gz
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar.bz2
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar.lz
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar.xz
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.tar.zst
cuberite-5be983e7752091adbf7262f3074b3062ea44ae73.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 6ab2274a4..d2fcce576 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -276,6 +276,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 (