diff options
author | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-24 05:19:07 +0100 |
---|---|---|
committer | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-24 05:19:07 +0100 |
commit | 7b65ee40961b34f775da3d0c66409c1b432e19a1 (patch) | |
tree | 775da4f499cd0fbd7aa6ea17a61d187e84fc7287 /src | |
parent | Merge pull request #2808 from cuberite/freebsd32fix (diff) | |
parent | Added IsBlockFence method to defines (diff) | |
download | cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar.gz cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar.bz2 cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar.lz cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar.xz cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.tar.zst cuberite-7b65ee40961b34f775da3d0c66409c1b432e19a1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Defines.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Defines.h b/src/Defines.h index 5ff583516..b0589d8a0 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -477,6 +477,30 @@ inline bool IsBlockTypeOfDirt(BLOCKTYPE a_BlockType) +inline bool IsBlockFence(BLOCKTYPE a_BlockType) +{ + switch (a_BlockType) + { + case E_BLOCK_FENCE: + case E_BLOCK_OAK_FENCE_GATE: + case E_BLOCK_NETHER_BRICK_FENCE: + case E_BLOCK_COBBLESTONE_WALL: + case E_BLOCK_DARK_OAK_FENCE: + case E_BLOCK_SPRUCE_FENCE_GATE: + case E_BLOCK_ACACIA_FENCE: + { + return true; + } + default: + { + return false; + } + } +} + + + + inline void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse = false) // tolua_export { // tolua_export if (!a_bInverse) |