diff options
author | andrew <xdotftw@gmail.com> | 2014-02-13 16:13:09 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-02-13 16:13:09 +0100 |
commit | 92e85cc96030285bba74837759925866c1be7235 (patch) | |
tree | af478bb840eefb7164860cddee745acf5e598bd9 /src/Protocol/Protocol17x.cpp | |
parent | Updated COMPILING instructions for out-of-source build. (diff) | |
download | cuberite-92e85cc96030285bba74837759925866c1be7235.tar cuberite-92e85cc96030285bba74837759925866c1be7235.tar.gz cuberite-92e85cc96030285bba74837759925866c1be7235.tar.bz2 cuberite-92e85cc96030285bba74837759925866c1be7235.tar.lz cuberite-92e85cc96030285bba74837759925866c1be7235.tar.xz cuberite-92e85cc96030285bba74837759925866c1be7235.tar.zst cuberite-92e85cc96030285bba74837759925866c1be7235.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 7eaf106cf..4acc61586 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -496,6 +496,41 @@ void cProtocol172::SendLogin(const cPlayer & a_Player, const cWorld & a_World) +void cProtocol172::SendMapColumn(int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length) +{ + cPacketizer Pkt(*this, 0x34); + Pkt.WriteVarInt(a_ID); + Pkt.WriteShort (3 + a_Length); + + Pkt.WriteByte(0); + Pkt.WriteByte(a_X); + Pkt.WriteByte(a_Y); + + for (unsigned int i = 0; i < a_Length; ++i) + { + Pkt.WriteByte(a_Colors[i]); + } +} + + + + + +void cProtocol172::SendMapInfo(int a_ID, unsigned int a_Scale) +{ + cPacketizer Pkt(*this, 0x34); + Pkt.WriteVarInt(a_ID); + Pkt.WriteShort (2); + + Pkt.WriteByte(2); + Pkt.WriteByte(a_Scale); +} + + + + + + void cProtocol172::SendPickupSpawn(const cPickup & a_Pickup) { { |