summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 9ceded8b2..3bfcb4039 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2910,22 +2910,20 @@ bool cPlayer::PlaceBlocks(const sSetBlockVector & a_Blocks)
}
} // for blk - a_Blocks[]
- // Set the blocks:
- m_World->SetBlocks(a_Blocks);
-
- // Notify the blockhandlers:
cChunkInterface ChunkInterface(m_World->GetChunkMap());
for (auto blk: a_Blocks)
{
+ // Set the blocks:
+ m_World->PlaceBlock(blk.GetAbsolutePos(), blk.m_BlockType, blk.m_BlockMeta);
+
+ // Notify the blockhandlers:
cBlockHandler * newBlock = BlockHandler(blk.m_BlockType);
newBlock->OnPlacedByPlayer(ChunkInterface, *m_World, *this, blk);
- }
- // Call the "placed" hooks:
- for (auto blk: a_Blocks)
- {
+ // Call the "placed" hooks:
pm->CallHookPlayerPlacedBlock(*this, blk);
}
+
return true;
}