summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDoor.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 20:20:02 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-27 20:20:02 +0200
commit7b7225e50b43c8b4ac70680909892e79168ceaf5 (patch)
tree7c29be86ffc3f9c9644c202054a72bba016398a8 /src/Blocks/BlockDoor.h
parentDropped support for <1.7.x (diff)
parentMerge pull request #1461 from mc-server/RedstoneFix (diff)
downloadcuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar.gz
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar.bz2
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar.lz
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar.xz
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.tar.zst
cuberite-7b7225e50b43c8b4ac70680909892e79168ceaf5.zip
Diffstat (limited to 'src/Blocks/BlockDoor.h')
-rw-r--r--src/Blocks/BlockDoor.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index b2f9e4dcd..0ff8bcfc8 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -55,7 +55,49 @@ public:
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
- a_Pickups.push_back(cItem((m_BlockType == E_BLOCK_WOODEN_DOOR) ? E_ITEM_WOODEN_DOOR : E_ITEM_IRON_DOOR, 1, 0));
+ switch (m_BlockType)
+ {
+ case E_BLOCK_WOODEN_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_WOODEN_DOOR);
+ break;
+ }
+ case E_BLOCK_ACACIA_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_ACACIA_DOOR);
+ break;
+ }
+ case E_BLOCK_BIRCH_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_BIRCH_DOOR);
+ break;
+ }
+ case E_BLOCK_DARK_OAK_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_DARK_OAK_DOOR);
+ break;
+ }
+ case E_BLOCK_JUNGLE_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_JUNGLE_DOOR);
+ break;
+ }
+ case E_BLOCK_SPRUCE_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_SPRUCE_DOOR);
+ break;
+ }
+ case E_BLOCK_IRON_DOOR:
+ {
+ a_Pickups.Add(E_ITEM_IRON_DOOR);
+ break;
+ }
+ default:
+ {
+ ASSERT(!"Unhandled door type!");
+ break;
+ }
+ }
}