diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-07-07 09:31:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-07 09:31:45 +0200 |
commit | 885d8287125439047ca2318f8e349b8da279e612 (patch) | |
tree | 2f54b688dba0f49b64544d3c1220a16a6936cd6f /src/Blocks/BlockHandler.cpp | |
parent | Changed Lua plugins to only execute files ending in .lua (#3831) (diff) | |
download | cuberite-885d8287125439047ca2318f8e349b8da279e612.tar cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.gz cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.bz2 cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.lz cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.xz cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.zst cuberite-885d8287125439047ca2318f8e349b8da279e612.zip |
Diffstat (limited to 'src/Blocks/BlockHandler.cpp')
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 36b20088c..41e3561d1 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -463,7 +463,6 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac { case E_BLOCK_ACACIA_DOOR: case E_BLOCK_ACTIVE_COMPARATOR: - case E_BLOCK_BED: case E_BLOCK_BEETROOTS: case E_BLOCK_BIRCH_DOOR: case E_BLOCK_BREWING_STAND: @@ -512,9 +511,19 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac ConvertToPickups(Pickups, Meta); break; } + case E_BLOCK_BED: + { + // Need to access the bed entity to get the color for the item damage + ConvertToPickups(a_Digger, Pickups, Meta, a_BlockX, a_BlockY, a_BlockZ); + } default: Pickups.Add(m_BlockType, 1, Meta); break; } } + else if (m_BlockType == E_BLOCK_BED) + { + // Need to access the bed entity to get the color for the item damage + ConvertToPickups(a_Digger, Pickups, Meta, a_BlockX, a_BlockY, a_BlockZ); + } else { ConvertToPickups(Pickups, Meta); |