diff options
author | Bill Derouin <derouinbill@gmail.com> | 2014-01-07 16:31:06 +0100 |
---|---|---|
committer | Bill Derouin <derouinbill@gmail.com> | 2014-01-07 16:31:06 +0100 |
commit | 913841f50115379ebaaba1cb88c3f1cdfed09320 (patch) | |
tree | 94420b3f5aabe3d3790e1ac68dcb4dfff658d911 /src/Protocol | |
parent | Merge pull request #511 from mc-server/CmakeOutput (diff) | |
download | cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar.gz cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar.bz2 cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar.lz cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar.xz cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.tar.zst cuberite-913841f50115379ebaaba1cb88c3f1cdfed09320.zip |
Diffstat (limited to 'src/Protocol')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 13 | ||||
-rw-r--r-- | src/Protocol/Protocol17x.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index bbbd5e973..c75fc9878 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -383,6 +383,16 @@ void cProtocol172::SendExplosion(double a_BlockX, double a_BlockY, double a_Bloc +void cProtocol172::SendFavicon(void) +{ + cPacketizer Pkt(*this, 0x0); // Favicon packet + Pkt.WriteString(cRoot::Get()->GetServer()->GetFaviconData()); +} + + + + + void cProtocol172::SendGameMode(eGameMode a_GameMode) { cPacketizer Pkt(*this, 0x2b); // Change Game State packet @@ -1116,6 +1126,9 @@ void cProtocol172::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) AppendPrintf(Response, "\"description\":{\"text\":\"%s\"}", cRoot::Get()->GetServer()->GetDescription().c_str() ); + AppendPrintf(Response, "\"favicon\":\"data:image/png;base64,%s\"", + cRoot::Get()->GetServer()->GetFaviconData() + ); Response.append("}"); cPacketizer Pkt(*this, 0x00); // Response packet diff --git a/src/Protocol/Protocol17x.h b/src/Protocol/Protocol17x.h index 23ff2365d..29fc75ee4 100644 --- a/src/Protocol/Protocol17x.h +++ b/src/Protocol/Protocol17x.h @@ -72,6 +72,7 @@ public: virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override; virtual void SendEntityVelocity (const cEntity & a_Entity) override; virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override; + virtual void SendFavicon (void); virtual void SendGameMode (eGameMode a_GameMode) override; virtual void SendHealth (void) override; virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override; |