diff options
Diffstat (limited to 'src/Protocol/Protocol_1_9.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_9.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index 3d4fee425..b9310bea5 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -133,7 +133,11 @@ cProtocol_1_9_0::cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_Ser LOGD("Player at %s connected via BungeeCord", Params[1].c_str()); m_ServerAddress = Params[0]; m_Client->SetIPString(Params[1]); - m_Client->SetUUID(cMojangAPI::MakeUUIDShort(Params[2])); + + cUUID UUID; + UUID.FromString(Params[2]); + m_Client->SetUUID(UUID); + m_Client->SetProperties(Params[3]); } @@ -720,7 +724,7 @@ void cProtocol_1_9_0::SendLoginSuccess(void) { cPacketizer Pkt(*this, 0x02); // Login success packet - Pkt.WriteString(cMojangAPI::MakeUUIDDashed(m_Client->GetUUID())); + Pkt.WriteString(m_Client->GetUUID().ToLongString()); Pkt.WriteString(m_Client->GetUsername()); } } @@ -1094,7 +1098,7 @@ void cProtocol_1_9_0::SendPlayerSpawn(const cPlayer & a_Player) // Called to spawn another player for the client cPacketizer Pkt(*this, 0x05); // Spawn Player packet Pkt.WriteVarInt32(a_Player.GetUniqueID()); - Pkt.WriteUUID(cMojangAPI::MakeUUIDShort(a_Player.GetUUID())); + Pkt.WriteUUID(a_Player.GetUUID()); Pkt.WriteBEDouble(a_Player.GetPosX()); Pkt.WriteBEDouble(a_Player.GetPosY() + 0.001); // The "+ 0.001" is there because otherwise the player falls through the block they were standing on. Pkt.WriteBEDouble(a_Player.GetPosZ()); @@ -1563,6 +1567,7 @@ void cProtocol_1_9_0::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity) case E_BLOCK_BEACON: Action = 3; break; // Update beacon entity case E_BLOCK_HEAD: Action = 4; break; // Update Mobhead entity case E_BLOCK_FLOWER_POT: Action = 5; break; // Update flower pot + case E_BLOCK_BED: Action = 11; break; // Update bed color default: ASSERT(!"Unhandled or unimplemented BlockEntity update request!"); break; } Pkt.WriteBEUInt8(Action); @@ -2624,7 +2629,7 @@ void cProtocol_1_9_0::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer) void cProtocol_1_9_0::HandlePacketSpectate(cByteBuffer & a_ByteBuffer) { - AString playerUUID; + cUUID playerUUID; if (!a_ByteBuffer.ReadUUID(playerUUID)) { return; @@ -3513,7 +3518,7 @@ void cProtocol_1_9_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & // The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity Writer.BeginCompound("Owner"); - Writer.AddString("Id", MobHeadEntity.GetOwnerUUID()); + Writer.AddString("Id", MobHeadEntity.GetOwnerUUID().ToShortString()); Writer.AddString("Name", MobHeadEntity.GetOwnerName()); Writer.BeginCompound("Properties"); Writer.BeginList("textures", TAG_Compound); |