From de76503d5c87fd7782b0aa3bbda9bdd997ad7fa8 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 14 Mar 2021 00:30:40 +0000 Subject: Remove DoesDropOnUnsuitable This is only overridden false in Vines and Snow. It is called when a CanBeAt check fails, to determine whether DropBlockAsPickups is called. However, Vines and Snow already drop nothing without the right tool, so this function is superfluous. --- src/Blocks/BlockHandler.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 829905221..316906907 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -494,14 +494,7 @@ void cBlockHandler::OnNeighborChanged(cChunkInterface & a_ChunkInterface, Vector return; } - if (DoesDropOnUnsuitable()) - { - a_ChunkInterface.DropBlockAsPickups(a_BlockPos); - } - else - { - a_ChunkInterface.SetBlock(a_BlockPos, E_BLOCK_AIR, 0); - } + a_ChunkInterface.DropBlockAsPickups(a_BlockPos); } @@ -571,15 +564,6 @@ bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, -bool cBlockHandler::DoesDropOnUnsuitable(void) const -{ - return true; -} - - - - - bool cBlockHandler::IsInsideBlock(const Vector3d a_RelPosition, const NIBBLETYPE a_BlockMeta) const { // Default functionality: Test the height, since we assume full voxels with varying height -- cgit v1.2.3