Files
cuberite-2a/src/Blocks/BlockEntity.h
T

32 lines
599 B
C++
Raw Normal View History

2013-07-29 12:13:03 +01:00
#pragma once
#include "BlockHandler.h"
2017-07-07 09:31:45 +02:00
#include "ChunkInterface.h"
2013-07-29 12:13:03 +01:00
class cBlockEntityHandler : public cBlockHandler
{
public:
cBlockEntityHandler(BLOCKTYPE a_BlockType)
: cBlockHandler(a_BlockType)
{
}
2016-02-05 23:45:45 +02:00
2017-07-31 21:17:52 +01:00
virtual bool OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
2013-07-29 12:13:03 +01:00
{
2017-07-31 21:17:52 +01:00
return a_ChunkInterface.UseBlockEntity(&a_Player, a_BlockX, a_BlockY, a_BlockZ);
2013-07-29 12:13:03 +01:00
}
2016-02-05 23:45:45 +02:00
2013-07-29 12:13:03 +01:00
virtual bool IsUseable() override
{
return true;
}
};