summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemDoor.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 19:40:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 19:40:00 +0200
commitd1814d2d67cdaa4fbcbd10a1af290412c29441af (patch)
treeeb132621bef87b82311f70ead69694c4c88690c9 /src/Items/ItemDoor.h
parente.t.c. -> etc. (diff)
parentMerge pull request #1461 from mc-server/RedstoneFix (diff)
downloadcuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.gz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.bz2
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.lz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.xz
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.tar.zst
cuberite-d1814d2d67cdaa4fbcbd10a1af290412c29441af.zip
Diffstat (limited to 'src/Items/ItemDoor.h')
-rw-r--r--src/Items/ItemDoor.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Items/ItemDoor.h b/src/Items/ItemDoor.h
index c1b439024..cd5baf44f 100644
--- a/src/Items/ItemDoor.h
+++ b/src/Items/ItemDoor.h
@@ -30,7 +30,22 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
- a_BlockType = (m_ItemType == E_ITEM_WOODEN_DOOR) ? E_BLOCK_WOODEN_DOOR : E_BLOCK_IRON_DOOR;
+ switch (m_ItemType)
+ {
+ case E_ITEM_WOODEN_DOOR: a_BlockType = E_BLOCK_WOODEN_DOOR; break;
+ case E_ITEM_IRON_DOOR: a_BlockType = E_BLOCK_IRON_DOOR; break;
+ case E_ITEM_SPRUCE_DOOR: a_BlockType = E_BLOCK_SPRUCE_DOOR; break;
+ case E_ITEM_BIRCH_DOOR: a_BlockType = E_BLOCK_BIRCH_DOOR; break;
+ case E_ITEM_JUNGLE_DOOR: a_BlockType = E_BLOCK_JUNGLE_DOOR; break;
+ case E_ITEM_DARK_OAK_DOOR: a_BlockType = E_BLOCK_DARK_OAK_DOOR; break;
+ case E_ITEM_ACACIA_DOOR: a_BlockType = E_BLOCK_ACACIA_DOOR; break;
+ default:
+ {
+ ASSERT(!"Unhandled door type");
+ return false;
+ }
+ }
+
cChunkInterface ChunkInterface(a_World->GetChunkMap());
bool Meta = BlockHandler(a_BlockType)->GetPlacementBlockTypeMeta(
ChunkInterface, a_Player,