summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDoor.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-30 22:53:32 +0200
committerMattes D <github@xoft.cz>2014-09-30 22:53:32 +0200
commit1d185fe2073f4dd68ae9675e9bdbaa554754b8ea (patch)
treeac0c02f236ecc5904558794dc84c882d9512b0d7 /src/Blocks/BlockDoor.h
parentMerge pull request #1485 from mc-server/PluginMessages (diff)
parentCode improvements (diff)
downloadcuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar.gz
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar.bz2
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar.lz
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar.xz
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.tar.zst
cuberite-1d185fe2073f4dd68ae9675e9bdbaa554754b8ea.zip
Diffstat (limited to 'src/Blocks/BlockDoor.h')
-rw-r--r--src/Blocks/BlockDoor.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index 0ff8bcfc8..92ad8da12 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -173,7 +173,23 @@ public:
/** Returns true if the specified blocktype is any kind of door */
inline static bool IsDoor(BLOCKTYPE a_Block)
{
- return (a_Block == E_BLOCK_WOODEN_DOOR) || (a_Block == E_BLOCK_IRON_DOOR);
+ switch (a_Block)
+ {
+ case E_BLOCK_ACACIA_DOOR:
+ case E_BLOCK_BIRCH_DOOR:
+ case E_BLOCK_DARK_OAK_DOOR:
+ case E_BLOCK_IRON_DOOR:
+ case E_BLOCK_JUNGLE_DOOR:
+ case E_BLOCK_SPRUCE_DOOR:
+ case E_BLOCK_WOODEN_DOOR:
+ {
+ return true;
+ }
+ default:
+ {
+ return false;
+ }
+ }
}