summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-24 05:19:07 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-24 05:19:07 +0100
commit7b65ee40961b34f775da3d0c66409c1b432e19a1 (patch)
tree775da4f499cd0fbd7aa6ea17a61d187e84fc7287 /src
parentMerge pull request #2808 from cuberite/freebsd32fix (diff)
parentAdded IsBlockFence method to defines (diff)
downloadcuberite-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.h24
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)