1
0
Fork 0

Merge pull request #2811 from cuberite/isblockfence

Added IsBlockFence method to defines.h
This commit is contained in:
Safwat Halaby 2015-12-24 06:19:07 +02:00
commit 7b65ee4096
1 changed files with 24 additions and 0 deletions

View File

@ -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)