summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-24 22:38:25 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-24 22:38:25 +0200
commit3a6002de5b13c1cd56d904892e5af6123978225d (patch)
tree5f8b28e6b4d21de5823b8c7988d41f4af653f1f7 /src/Blocks/BlockHandler.cpp
parentMerge pull request #1237 from tonibm19/master (diff)
downloadcuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar.gz
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar.bz2
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar.lz
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar.xz
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.tar.zst
cuberite-3a6002de5b13c1cd56d904892e5af6123978225d.zip
Diffstat (limited to 'src/Blocks/BlockHandler.cpp')
-rw-r--r--src/Blocks/BlockHandler.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 3e16f970a..ddb0186c9 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -418,19 +418,22 @@ void cBlockHandler::ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta)
-void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_DropVerbatim)
+void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop, bool a_DropVerbatim)
{
cItems Pickups;
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
- if (!a_DropVerbatim)
+ if (a_CanDrop)
{
- ConvertToPickups(Pickups, Meta);
- }
- else
- {
- // TODO: Add a proper overridable function for this
- Pickups.Add(m_BlockType, 1, Meta);
+ if (!a_DropVerbatim)
+ {
+ ConvertToPickups(Pickups, Meta);
+ }
+ else
+ {
+ // TODO: Add a proper overridable function for this
+ Pickups.Add(m_BlockType, 1, Meta);
+ }
}
// Allow plugins to modify the pickups: