summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-11 16:33:52 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-11 16:33:52 +0200
commitd4641576c0d4731fc771705f9642996aa92a3656 (patch)
treef3616cb8899be2c3081fbe93a714885f7b77db1b /src/Items
parentFixed mutton name in Sheep.cpp (diff)
downloadcuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar.gz
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar.bz2
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar.lz
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar.xz
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.tar.zst
cuberite-d4641576c0d4731fc771705f9642996aa92a3656.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemDoor.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Items/ItemDoor.h b/src/Items/ItemDoor.h
index c1b439024..402cef6c6 100644
--- a/src/Items/ItemDoor.h
+++ b/src/Items/ItemDoor.h
@@ -30,7 +30,21 @@ 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,