diff options
author | Mattes D <github@xoft.cz> | 2014-03-10 23:13:08 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-10 23:13:08 +0100 |
commit | b72661681c0676b6977e95a1d58eb8e282582b73 (patch) | |
tree | 9d5e7cccb22d13dd15ad015b4765053d528ca58c /src/Defines.h | |
parent | Merge pull request #767 from worktycho/envmatrix (diff) | |
parent | Removed debugging output. (diff) | |
download | cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.gz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.bz2 cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.lz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.xz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.zst cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.zip |
Diffstat (limited to 'src/Defines.h')
-rw-r--r-- | src/Defines.h | 20 |
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 ( |