summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-02-18 19:50:08 +0100
committerandrew <xdotftw@gmail.com>2014-02-18 19:50:08 +0100
commit393ca0221dfdb6dabadcf293fea86a830453c938 (patch)
tree53a7eaf9eaf4b896e374e9c9ed24e66f1eb2fa64 /src/Protocol/Protocol17x.cpp
parentMap item handler; Fixed several bugs (diff)
downloadcuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar.gz
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar.bz2
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar.lz
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar.xz
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.tar.zst
cuberite-393ca0221dfdb6dabadcf293fea86a830453c938.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 4acc61586..38b4ed786 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -516,6 +516,26 @@ void cProtocol172::SendMapColumn(int a_ID, int a_X, int a_Y, const Byte * a_Colo
+void cProtocol172::SendMapDecorators(int a_ID, const cMapDecoratorList & a_Decorators)
+{
+ cPacketizer Pkt(*this, 0x34);
+ Pkt.WriteVarInt(a_ID);
+ Pkt.WriteShort (1 + (3 * a_Decorators.size()));
+
+ Pkt.WriteByte(1);
+
+ for (cMapDecoratorList::const_iterator it = a_Decorators.begin(); it != a_Decorators.end(); ++it)
+ {
+ Pkt.WriteByte((it->GetType() << 4) | (it->GetRot() & 0xf));
+ Pkt.WriteByte(it->GetPixelX());
+ Pkt.WriteByte(it->GetPixelZ());
+ }
+}
+
+
+
+
+
void cProtocol172::SendMapInfo(int a_ID, unsigned int a_Scale)
{
cPacketizer Pkt(*this, 0x34);