Added missing files
This commit is contained in:
parent
0b0aa5554f
commit
42497847ac
19
src/BlockInServerPluginInterface.h
Normal file
19
src/BlockInServerPluginInterface.h
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Blocks/BlockPluginInterface.h"
|
||||
#include "World.h"
|
||||
#include "Root.h"
|
||||
#include "Bindings/PluginManager.h"
|
||||
|
||||
class cBlockInServerPluginInterface : public cBlockPluginInterface
|
||||
{
|
||||
public:
|
||||
cBlockInServerPluginInterface(cWorld & a_World) : m_World(a_World) {}
|
||||
virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) override
|
||||
{
|
||||
return cRoot::Get()->GetPluginManager()->CallHookBlockToPickups(&m_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, a_Pickups);
|
||||
}
|
||||
private:
|
||||
cWorld & m_World;
|
||||
};
|
8
src/Blocks/BlockPluginInterface.h
Normal file
8
src/Blocks/BlockPluginInterface.h
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
class cBlockPluginInterface
|
||||
{
|
||||
public:
|
||||
virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0;
|
||||
};
|
12
src/Blocks/ChunkInterface.cpp
Normal file
12
src/Blocks/ChunkInterface.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
#include "ChunkInterface.h"
|
||||
#include "BlockHandler.h"
|
||||
|
||||
bool cChunkInterface::DigBlock(cWorldInterface & a_WorldInterface, int a_X, int a_Y, int a_Z)
|
||||
{
|
||||
cBlockHandler *Handler = cBlockHandler::GetBlockHandler(GetBlock(a_X, a_Y, a_Z));
|
||||
Handler->OnDestroyed(*this, a_WorldInterface, a_X, a_Y, a_Z);
|
||||
return m_ChunkMap->DigBlock(a_X, a_Y, a_Z);
|
||||
}
|
Loading…
Reference in New Issue
Block a user