summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-14 18:24:44 +0200
committermadmaxoft <github@xoft.cz>2014-04-14 18:24:44 +0200
commit449afa850e78874c5a5669bcda82da83f25d0b90 (patch)
tree95aa17518cdbe6c33bbf82a80332bc4328fd62fc
parentChunkStay must be disabled while being deleted. (diff)
downloadcuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar.gz
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar.bz2
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar.lz
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar.xz
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.tar.zst
cuberite-449afa850e78874c5a5669bcda82da83f25d0b90.zip
-rw-r--r--Tools/ProtoProxy/Connection.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index d9b8e3dd1..8dc82157a 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -2202,6 +2202,28 @@ bool cConnection::HandleServerSpawnNamedEntity(void)
HANDLE_SERVER_PACKET_READ(ReadVarInt, UInt32, EntityID);
HANDLE_SERVER_PACKET_READ(ReadVarUTF8String, AString, EntityUUID);
HANDLE_SERVER_PACKET_READ(ReadVarUTF8String, AString, EntityName);
+ HANDLE_SERVER_PACKET_READ(ReadVarInt, UInt32, DataCount);
+ struct sData
+ {
+ AString m_Name;
+ AString m_Value;
+ AString m_Signature;
+ sData(const AString & a_Name, const AString & a_Value, const AString & a_Signature) :
+ m_Name(a_Name),
+ m_Value(a_Value),
+ m_Signature(a_Signature)
+ {
+ }
+ };
+ typedef std::vector<sData> sDataVec;
+ sDataVec Data;
+ for (UInt32 i = 0; i < DataCount; i++)
+ {
+ HANDLE_SERVER_PACKET_READ(ReadVarUTF8String, AString, Name)
+ HANDLE_SERVER_PACKET_READ(ReadVarUTF8String, AString, Value)
+ HANDLE_SERVER_PACKET_READ(ReadVarUTF8String, AString, Signature)
+ Data.push_back(sData(Name, Value, Signature));
+ }
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosX);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosY);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosZ);
@@ -2219,6 +2241,13 @@ bool cConnection::HandleServerSpawnNamedEntity(void)
Log(" EntityID = %u (0x%x)", EntityID, EntityID);
Log(" UUID = \"%s\"", EntityUUID.c_str());
Log(" Name = \"%s\"", EntityName.c_str());
+ Log(" NumData = %u", DataCount);
+ for (sDataVec::const_iterator itr = Data.begin(), end = Data.end(); itr != end; ++itr)
+ {
+ Log(" Name = \"%s\", Value = \"%s\", Signature = \"%s\"",
+ itr->m_Name.c_str(), itr->m_Value.c_str(), itr->m_Signature.c_str()
+ );
+ } // for itr - Data[]
Log(" Pos = %s", PrintableAbsIntTriplet(PosX, PosY, PosZ).c_str());
Log(" Rotation = <yaw %d, pitch %d>", Yaw, Pitch);
Log(" CurrentItem = %d", CurrentItem);