diff options
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 09b0f0f99..4aa28d257 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -960,10 +960,9 @@ cItems cChunk::PickupsFromBlock(Vector3i a_RelPos, const cEntity * a_Digger, con cItems Pickups; const auto BlockEntity = GetBlockEntityRel(a_RelPos); - const auto ToolHandler = (a_Tool != nullptr) ? a_Tool->GetHandler() : cItemHandler::GetItemHandler(E_ITEM_EMPTY); - if (ToolHandler->CanHarvestBlock(BlockType)) + if ((a_Tool == nullptr) || a_Tool->GetHandler()->CanHarvestBlock(BlockType)) { - Pickups = cBlockHandler::For(BlockType).ConvertToPickups(BlockMeta, a_Digger, a_Tool); + Pickups = cBlockHandler::For(BlockType).ConvertToPickups(BlockMeta, a_Tool); if (BlockEntity != nullptr) { |