summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-02-19 14:45:09 +0100
committerHowaner <franzi.moos@googlemail.com>2014-02-19 14:45:09 +0100
commitd63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052 (patch)
treee2a6645283f80bd664a4bc8d402f52f13824cd14 /src/Blocks
parentAdd break to Protocol17x.cpp and use new comment delimiter (diff)
downloadcuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar.gz
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar.bz2
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar.lz
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar.xz
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.tar.zst
cuberite-d63ce62f3bbe4b8e89b8c54af4b71d77bcc7e052.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockHandler.cpp4
-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);
}
} ;