diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-27 08:13:40 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-27 08:13:40 +0200 |
commit | e274d0dd8a6eefeb6e84272ffd09ac55b2c08900 (patch) | |
tree | 377f52ed5738810c157e631ec31f626fbe5acef6 /src/Protocol/Protocol_1_12.cpp | |
parent | d (diff) | |
parent | Implement anvil chunk sparsing (diff) | |
download | cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar.gz cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar.bz2 cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar.lz cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar.xz cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.tar.zst cuberite-e274d0dd8a6eefeb6e84272ffd09ac55b2c08900.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_12.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_12.cpp | 72 |
1 files changed, 48 insertions, 24 deletions
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp index 0dba45e15..43ab682eb 100644 --- a/src/Protocol/Protocol_1_12.cpp +++ b/src/Protocol/Protocol_1_12.cpp @@ -1125,6 +1125,30 @@ void cProtocol_1_12::SendEntityMetadata(const cEntity & a_Entity) +void cProtocol_1_12::SendLeashEntity(const cEntity & a_Entity, const cEntity & a_EntityLeashedTo) +{ + ASSERT(m_State == 3); // In game mode? + cPacketizer Pkt(*this, 0x3c); // Set Attach Entity packet + Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); + Pkt.WriteBEUInt32(a_EntityLeashedTo.GetUniqueID()); +} + + + + + +void cProtocol_1_12::SendUnleashEntity(const cEntity & a_Entity) +{ + ASSERT(m_State == 3); // In game mode? + cPacketizer Pkt(*this, 0x3c); // Set Attach Entity packet + Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); + Pkt.WriteBEInt32(-1); // Unleash a_Entity +} + + + + + void cProtocol_1_12::SendEntityVelocity(const cEntity & a_Entity) { ASSERT(m_State == 3); // In game mode? @@ -1252,30 +1276,6 @@ void cProtocol_1_12::SendScoreUpdate(const AString & a_Objective, const AString -void cProtocol_1_12::SendLeashEntity(const cEntity & a_Entity, const cEntity & a_EntityLeashedTo) -{ - ASSERT(m_State == 3); // In game mode? - cPacketizer Pkt(*this, 0x3c); // Set Attach Entity packet - Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); - Pkt.WriteBEUInt32(a_EntityLeashedTo.GetUniqueID()); -} - - - - - -void cProtocol_1_12::SendUnleashEntity(const cEntity & a_Entity) -{ - ASSERT(m_State == 3); // In game mode? - cPacketizer Pkt(*this, 0x3c); // Set Attach Entity packet - Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); - Pkt.WriteBEInt32(-1); // Unleash a_Entity -} - - - - - void cProtocol_1_12::SendLogin(const cPlayer & a_Player, const cWorld & a_World) { // Send the Join Game packet: @@ -1945,6 +1945,30 @@ void cProtocol_1_12_1::SendEntityMetadata(const cEntity & a_Entity) +void cProtocol_1_12_1::SendLeashEntity(const cEntity & a_Entity, const cEntity & a_EntityLeashedTo) +{ + ASSERT(m_State == 3); // In game mode? + cPacketizer Pkt(*this, 0x3d); // Set Attach Entity packet + Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); + Pkt.WriteBEUInt32(a_EntityLeashedTo.GetUniqueID()); +} + + + + + +void cProtocol_1_12_1::SendUnleashEntity(const cEntity & a_Entity) +{ + ASSERT(m_State == 3); // In game mode? + cPacketizer Pkt(*this, 0x3d); // Set Attach Entity packet + Pkt.WriteBEUInt32(a_Entity.GetUniqueID()); + Pkt.WriteBEInt32(-1); // Unleash a_Entity +} + + + + + void cProtocol_1_12_1::SendEntityVelocity(const cEntity & a_Entity) { ASSERT(m_State == 3); // In game mode? |