diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-06-17 14:45:29 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-06-17 14:45:29 +0200 |
commit | 8e927e6e2bfb461b26a3413cbde829f98fbcaa28 (patch) | |
tree | 6d826f94ffb404a4b6ab5942fc514192cd71728d /src/Blocks | |
parent | Add more documentation. (diff) | |
download | cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar.gz cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar.bz2 cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar.lz cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar.xz cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.tar.zst cuberite-8e927e6e2bfb461b26a3413cbde829f98fbcaa28.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockMobHead.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h index 34a92c150..68996aa3f 100644 --- a/src/Blocks/BlockMobHead.h +++ b/src/Blocks/BlockMobHead.h @@ -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()); @@ -73,13 +73,13 @@ public: { bool m_IsWither; - virtual bool Item (cBlockEntity * a_BlockEntity) + 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; @@ -205,13 +205,13 @@ public: NIBBLETYPE m_OldBlockMeta; NIBBLETYPE m_NewBlockMeta; - virtual bool Item (cBlockEntity * a_BlockEntity) + 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) |