1
0

OnBroken/OnPlaced are for entity actions

* Call OnPlaced/OnBroken in PlaceBlock/DigBlock
- Remove unused Placing/Breaking handlers
* Have the blockhandler's Check handle neighbour updating, instead of QueueTickBlockNeighbors
This commit is contained in:
Tiger Wang
2020-07-29 19:30:38 +01:00
parent adb86a75da
commit 6bdd130aab
16 changed files with 93 additions and 261 deletions

View File

@@ -1373,7 +1373,6 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
cChunkInterface ChunkInterface(World->GetChunkMap());
auto blockHandler = BlockHandler(a_OldBlock);
Vector3i absPos(a_BlockX, a_BlockY, a_BlockZ);
blockHandler->OnPlayerBreakingBlock(ChunkInterface, *World, *m_Player, absPos);
if (m_Player->IsGameModeSurvival())
{
World->DropBlockAsPickups(absPos, m_Player, &m_Player->GetEquippedItem());