1
0

Check block type from cBlockEntity

This commit is contained in:
Howaner 2014-06-17 14:45:29 +02:00
parent 7e985f3c7d
commit 8e927e6e2b

View File

@ -34,11 +34,11 @@ public:
{
virtual bool Item(cBlockEntity * a_BlockEntity)
{
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
if (MobHeadEntity == NULL)
if (a_BlockEntity->GetBlockType() != E_BLOCK_HEAD)
{
return false;
}
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
cItems Pickups;
Pickups.Add(E_ITEM_HEAD, 1, (short) MobHeadEntity->GetType());
@ -75,11 +75,11 @@ public:
virtual bool Item(cBlockEntity * a_BlockEntity)
{
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
if (MobHeadEntity == NULL)
if (a_BlockEntity->GetBlockType() != E_BLOCK_HEAD)
{
return false;
}
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
m_IsWither = (MobHeadEntity->GetType() == SKULL_TYPE_WITHER);
return false;
@ -207,11 +207,11 @@ public:
virtual bool Item(cBlockEntity * a_BlockEntity)
{
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
if (MobHeadEntity == NULL)
if (a_BlockEntity->GetBlockType() != E_BLOCK_HEAD)
{
return false;
}
cMobHeadEntity * MobHeadEntity = static_cast<cMobHeadEntity*>(a_BlockEntity);
int Rotation = 0;
if (m_NewBlockMeta == 1)