summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BannerEntity.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/BannerEntity.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 '')
-rw-r--r--src/BlockEntities/BannerEntity.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/BlockEntities/BannerEntity.cpp b/src/BlockEntities/BannerEntity.cpp
index d7fda3cf7..e7be2065e 100644
--- a/src/BlockEntities/BannerEntity.cpp
+++ b/src/BlockEntities/BannerEntity.cpp
@@ -33,21 +33,18 @@ cBannerEntity::cBannerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vect
-void cBannerEntity::CopyFrom(const cBlockEntity & a_Src)
+unsigned char cBannerEntity::GetBaseColor() const
{
- Super::CopyFrom(a_Src);
- auto & src = static_cast<const cBannerEntity &>(a_Src);
- m_BaseColor = src.m_BaseColor;
+ return m_BaseColor;
}
-void cBannerEntity::SendTo(cClientHandle & a_Client)
+void cBannerEntity::SetBaseColor(const unsigned char a_Color)
{
- a_Client.SendBlockChange(m_Pos.x, m_Pos.y, m_Pos.z, m_BlockType, m_BlockMeta);
- a_Client.SendUpdateBlockEntity(*this);
+ m_BaseColor = a_Color;
}
@@ -63,16 +60,29 @@ cItems cBannerEntity::ConvertToPickups() const
-unsigned char cBannerEntity::GetBaseColor() const
+void cBannerEntity::CopyFrom(const cBlockEntity & a_Src)
{
- return m_BaseColor;
+ Super::CopyFrom(a_Src);
+ auto & src = static_cast<const cBannerEntity &>(a_Src);
+ m_BaseColor = src.m_BaseColor;
}
-void cBannerEntity::SetBaseColor(const unsigned char a_Color)
+void cBannerEntity::SendTo(cClientHandle & a_Client)
{
- m_BaseColor = a_Color;
+ a_Client.SendBlockChange(m_Pos.x, m_Pos.y, m_Pos.z, m_BlockType, m_BlockMeta);
+ a_Client.SendUpdateBlockEntity(*this);
+}
+
+
+
+
+
+bool cBannerEntity::UsedBy(cPlayer * a_Player)
+{
+ UNUSED(a_Player);
+ return false;
}