diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-02-19 14:45:09 +0100 |
---|---|---|
committer | TheJumper <maximilian.springer@web.de> | 2014-02-23 19:50:50 +0100 |
commit | 1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b (patch) | |
tree | 617bf18a768a493c2cd428297168f57df0901c26 /src/Blocks/BlockMobHead.h | |
parent | Add break to Protocol17x.cpp and use new comment delimiter (diff) | |
download | cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.gz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.bz2 cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.lz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.xz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.zst cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockMobHead.h (renamed from src/Blocks/BlockSkull.h) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Blocks/BlockSkull.h b/src/Blocks/BlockMobHead.h index eea5ac922..6a00c3acd 100644 --- a/src/Blocks/BlockSkull.h +++ b/src/Blocks/BlockMobHead.h @@ -2,17 +2,17 @@ #pragma once #include "BlockEntity.h" -#include "../BlockEntities/SkullEntity.h" +#include "../BlockEntities/MobHeadEntity.h" -class cBlockSkullHandler : +class cBlockMobHeadHandler : public cBlockEntityHandler { public: - cBlockSkullHandler(BLOCKTYPE a_BlockType) + cBlockMobHeadHandler(BLOCKTYPE a_BlockType) : cBlockEntityHandler(a_BlockType) { } @@ -29,13 +29,13 @@ public: BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta ) override { - class cCallback : public cSkullBlockCallback + class cCallback : public cMobHeadBlockCallback { cPlayer * m_Player; NIBBLETYPE m_OldBlockMeta; NIBBLETYPE m_NewBlockMeta; - virtual bool Item (cSkullEntity * a_SkullEntity) + virtual bool Item (cMobHeadEntity * a_MobHeadEntity) { int Rotation = 0; if (m_NewBlockMeta == 1) @@ -43,8 +43,8 @@ public: Rotation = (int) floor(m_Player->GetYaw() * 16.0F / 360.0F + 0.5) & 0xF; } - a_SkullEntity->SetSkullType(static_cast<eSkullType>(m_OldBlockMeta)); - a_SkullEntity->SetRotation(static_cast<eSkullRotation>(Rotation)); + a_MobHeadEntity->SetType(static_cast<eMobHeadType>(m_OldBlockMeta)); + a_MobHeadEntity->SetRotation(static_cast<eMobHeadRotation>(Rotation)); return false; } @@ -59,7 +59,7 @@ public: a_BlockMeta = a_BlockFace; cWorld * World = (cWorld *) &a_WorldInterface; - World->DoWithSkullBlockAt(a_BlockX, a_BlockY, a_BlockZ, Callback); + World->DoWithMobHeadBlockAt(a_BlockX, a_BlockY, a_BlockZ, Callback); a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta); } } ; |