1
0

Refactored cBlockHandler::OnUse and dependents

This commit is contained in:
Tycho
2014-01-26 06:20:39 -08:00
parent a2d3eea80b
commit 14e48ccb4b
21 changed files with 308 additions and 261 deletions

View File

@@ -20,6 +20,7 @@
#include "Items/ItemHandler.h"
#include "Blocks/BlockHandler.h"
#include "Blocks/BlockSlab.h"
#include "Blocks/ChunkInterface.h"
#include "Vector3f.h"
#include "Vector3d.h"
@@ -916,7 +917,9 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
// A plugin doesn't agree with using the block, abort
return;
}
BlockHandler->OnUse(World, World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
cChunkInterface *ChunkInterface = new cChunkInterface(World->GetChunkMap());
BlockHandler->OnUse(ChunkInterface, World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
delete ChunkInterface;
PlgMgr->CallHookPlayerUsedBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
return;
}