1
0
Fork 0
cuberite-2a/src/Blocks/BlockMobHead.h

46 lines
756 B
C
Raw Normal View History

2014-02-18 20:40:02 +00:00
#pragma once
#include "BlockEntity.h"
2014-02-19 13:45:09 +00:00
#include "../BlockEntities/MobHeadEntity.h"
2014-02-18 20:40:02 +00:00
2014-02-19 13:45:09 +00:00
class cBlockMobHeadHandler :
2014-02-18 20:40:02 +00:00
public cBlockEntityHandler
{
2020-04-13 16:38:06 +00:00
using Super = cBlockEntityHandler;
2014-02-18 20:40:02 +00:00
public:
using Super::Super;
private:
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
2014-05-28 13:54:43 +00:00
{
if ((a_BlockEntity == nullptr) || (a_BlockEntity->GetBlockType() != E_BLOCK_HEAD))
2014-05-28 13:54:43 +00:00
{
return {};
2014-05-28 13:54:43 +00:00
}
auto mobHeadEntity = static_cast<cMobHeadEntity *>(a_BlockEntity);
return cItem(E_ITEM_HEAD, 1, static_cast<short>(mobHeadEntity->GetType()));
2014-02-18 20:40:02 +00:00
}
2015-06-30 14:50:15 +00:00
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
2015-06-30 14:50:15 +00:00
{
UNUSED(a_Meta);
return 0;
}
2014-02-18 20:40:02 +00:00
} ;