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 | |
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 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 4 | ||||
-rw-r--r-- | src/Blocks/BlockMobHead.h (renamed from src/Blocks/BlockSkull.h) | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 870de7a7d..09a1244ea 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -34,7 +34,7 @@ #include "BlockGlass.h" #include "BlockGlowstone.h" #include "BlockGravel.h" -#include "BlockSkull.h" +#include "BlockMobHead.h" #include "BlockHopper.h" #include "BlockIce.h" #include "BlockLadder.h" @@ -147,7 +147,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_GRASS: return new cBlockDirtHandler (a_BlockType); case E_BLOCK_GRAVEL: return new cBlockGravelHandler (a_BlockType); case E_BLOCK_HAY_BALE: return new cBlockSidewaysHandler (a_BlockType); - case E_BLOCK_HEAD: return new cBlockSkullHandler (a_BlockType); + case E_BLOCK_HEAD: return new cBlockMobHeadHandler (a_BlockType); case E_BLOCK_HOPPER: return new cBlockHopperHandler (a_BlockType); case E_BLOCK_ICE: return new cBlockIceHandler (a_BlockType); case E_BLOCK_INACTIVE_COMPARATOR: return new cBlockComparatorHandler (a_BlockType); 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); } } ; |