diff options
author | madmaxoft <github@xoft.cz> | 2013-09-01 19:05:58 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-09-01 19:05:58 +0200 |
commit | b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947 (patch) | |
tree | b168f14573d4104de5bfe64dad258eae52f7069c /source | |
parent | Added the cBoundingBox class. (diff) | |
download | cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar.gz cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar.bz2 cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar.lz cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar.xz cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.tar.zst cuberite-b12d2edb4e7e2c1815a2219c2aa8eb6d6be69947.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Defines.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source/Defines.h b/source/Defines.h index 6bc1a18f6..331b4dd05 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -43,16 +43,24 @@ extern bool g_BlockIsSolid[256]; -/// Block face constants, used in PlayerDigging and PlayerBlockPlacement packets -enum +/// Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc +enum eBlockFace { - BLOCK_FACE_NONE = -1, // Interacting with no block face - swinging the item in the air - BLOCK_FACE_BOTTOM = 0, // Interacting with the bottom face of the block (YM) - BLOCK_FACE_TOP = 1, // Interacting with the top face of the block (YP) - BLOCK_FACE_NORTH = 2, // Interacting with the northern face of the block (ZP) - BLOCK_FACE_SOUTH = 3, // Interacting with the southern face of the block (ZM) - BLOCK_FACE_WEST = 4, // Interacting with the western face of the block (XP) - BLOCK_FACE_EAST = 5, // Interacting with the eastern face of the block (XM) + BLOCK_FACE_NONE = -1, // Interacting with no block face - swinging the item in the air + BLOCK_FACE_XM = 5, // Interacting with the X- face of the block + BLOCK_FACE_XP = 4, // Interacting with the X+ face of the block + BLOCK_FACE_YM = 0, // Interacting with the Y- face of the block + BLOCK_FACE_YP = 1, // Interacting with the Y+ face of the block + BLOCK_FACE_ZM = 3, // Interacting with the Z- face of the block + BLOCK_FACE_ZP = 2, // Interacting with the Z+ face of the block + + // Synonyms using the (deprecated) world directions: + BLOCK_FACE_BOTTOM = BLOCK_FACE_YM, // Interacting with the bottom face of the block + BLOCK_FACE_TOP = BLOCK_FACE_YP, // Interacting with the top face of the block + BLOCK_FACE_NORTH = BLOCK_FACE_ZP, // Interacting with the northern face of the block + BLOCK_FACE_SOUTH = BLOCK_FACE_ZM, // Interacting with the southern face of the block + BLOCK_FACE_WEST = BLOCK_FACE_XP, // Interacting with the western face of the block + BLOCK_FACE_EAST = BLOCK_FACE_XM, // Interacting with the eastern face of the block } ; |