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/Protocol125.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/Protocol125.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 73d21161c..edb22fae6 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -95,6 +95,7 @@ enum PACKET_WINDOW_PROPERTY = 0x69, PACKET_CREATIVE_INVENTORY_ACTION = 0x6B, PACKET_UPDATE_SIGN = 0x82, + PACKET_ITEM_DATA = 0x83, PACKET_PLAYER_LIST_ITEM = 0xC9, PACKET_PLAYER_ABILITIES = 0xca, PACKET_PLUGIN_MESSAGE = 0xfa, @@ -576,6 +577,32 @@ void cProtocol125::SendLogin(const cPlayer & a_Player, const cWorld & a_World) +void cProtocol125::SendMapColumn(int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length) +{ + cCSLock Lock(m_CSPacket); + + WriteByte (PACKET_ITEM_DATA); + WriteShort(E_ITEM_MAP); + WriteShort(a_ID); + WriteShort(3 + a_Length); + + WriteByte(0); + WriteByte(a_X); + WriteByte(a_Y); + + for (unsigned int i = 0; i < a_Length; ++i) + { + WriteByte(a_Colors[i]); + } + + Flush(); +} + + + + + + void cProtocol125::SendPickupSpawn(const cPickup & a_Pickup) { cCSLock Lock(m_CSPacket); |