summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/MobHeadEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-15 18:06:40 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-03-18 00:44:59 +0100
commitedf9e39ed76001b2bb95d1fb74cc88fa60a42e83 (patch)
tree4b071841150d83d479b1bd94941cc127d0a2a048 /src/BlockEntities/MobHeadEntity.cpp
parentshared_ptr -> unique_ptr in generators (diff)
downloadcuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar.gz
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar.bz2
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar.lz
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar.xz
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.tar.zst
cuberite-edf9e39ed76001b2bb95d1fb74cc88fa60a42e83.zip
Diffstat (limited to 'src/BlockEntities/MobHeadEntity.cpp')
-rw-r--r--src/BlockEntities/MobHeadEntity.cpp66
1 files changed, 31 insertions, 35 deletions
diff --git a/src/BlockEntities/MobHeadEntity.cpp b/src/BlockEntities/MobHeadEntity.cpp
index eee6cf9c1..14773a0f1 100644
--- a/src/BlockEntities/MobHeadEntity.cpp
+++ b/src/BlockEntities/MobHeadEntity.cpp
@@ -25,41 +25,6 @@ cMobHeadEntity::cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Ve
-cItems cMobHeadEntity::ConvertToPickups() const
-{
- return cItem(E_ITEM_HEAD, 1, static_cast<short>(m_Type));
-}
-
-
-
-
-
-void cMobHeadEntity::CopyFrom(const cBlockEntity & a_Src)
-{
- Super::CopyFrom(a_Src);
- auto & src = static_cast<const cMobHeadEntity &>(a_Src);
- m_OwnerName = src.m_OwnerName;
- m_OwnerTexture = src.m_OwnerTexture;
- m_OwnerTextureSignature = src.m_OwnerTextureSignature;
- m_OwnerUUID = src.m_OwnerUUID;
- m_Rotation = src.m_Rotation;
- m_Type = src.m_Type;
-}
-
-
-
-
-
-bool cMobHeadEntity::UsedBy(cPlayer * a_Player)
-{
- UNUSED(a_Player);
- return true;
-}
-
-
-
-
-
void cMobHeadEntity::SetType(const eMobHeadType & a_Type)
{
if ((!m_OwnerName.empty()) && (a_Type != SKULL_TYPE_PLAYER))
@@ -131,6 +96,31 @@ void cMobHeadEntity::SetOwner(const cUUID & a_OwnerUUID, const AString & a_Owner
+cItems cMobHeadEntity::ConvertToPickups() const
+{
+ return cItem(E_ITEM_HEAD, 1, static_cast<short>(m_Type));
+}
+
+
+
+
+
+void cMobHeadEntity::CopyFrom(const cBlockEntity & a_Src)
+{
+ Super::CopyFrom(a_Src);
+ auto & src = static_cast<const cMobHeadEntity &>(a_Src);
+ m_OwnerName = src.m_OwnerName;
+ m_OwnerTexture = src.m_OwnerTexture;
+ m_OwnerTextureSignature = src.m_OwnerTextureSignature;
+ m_OwnerUUID = src.m_OwnerUUID;
+ m_Rotation = src.m_Rotation;
+ m_Type = src.m_Type;
+}
+
+
+
+
+
void cMobHeadEntity::SendTo(cClientHandle & a_Client)
{
cWorld * World = a_Client.GetPlayer()->GetWorld();
@@ -141,3 +131,9 @@ void cMobHeadEntity::SendTo(cClientHandle & a_Client)
+
+bool cMobHeadEntity::UsedBy(cPlayer * a_Player)
+{
+ UNUSED(a_Player);
+ return false;
+}