diff options
author | mjagdis <mjagdis@eris-associates.co.uk> | 2024-06-30 20:09:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-30 20:09:42 +0200 |
commit | b7de59de89994f026336e690e9ed7449f89836b8 (patch) | |
tree | 4aad3d70c8e76a8a2b20a3eb88471a1d609134fd /src/BlockEntities/BannerEntity.h | |
parent | Send metadata for item frames (#5568) (diff) | |
download | cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar.gz cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar.bz2 cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar.lz cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar.xz cuberite-b7de59de89994f026336e690e9ed7449f89836b8.tar.zst cuberite-b7de59de89994f026336e690e9ed7449f89836b8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/BannerEntity.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/BlockEntities/BannerEntity.h b/src/BlockEntities/BannerEntity.h index b6d27f53b..91ef87e8c 100644 --- a/src/BlockEntities/BannerEntity.h +++ b/src/BlockEntities/BannerEntity.h @@ -25,16 +25,20 @@ class cBannerEntity : public: - cBannerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World); - cBannerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, unsigned char a_BaseColor); + cBannerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, unsigned char a_BaseColor = 1, AString a_CustomName = ""); - unsigned char GetBaseColor() const; - void SetBaseColor(unsigned char a_Color); + unsigned char GetBaseColor() const { return m_BaseColor; } + void SetBaseColor(unsigned char a_Color) { m_BaseColor = a_Color; } + + const AString & GetCustomName() const { return m_CustomName; } + void SetCustomName(const AString & a_CustomName) { m_CustomName = a_CustomName; } private: unsigned char m_BaseColor; + AString m_CustomName; + // cBlockEntity overrides: virtual cItems ConvertToPickups() const override; virtual void CopyFrom(const cBlockEntity & a_Src) override; |