summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormathiascode <mathiascode@users.noreply.github.com>2017-08-25 16:55:41 +0200
committerLukas Pioch <lukas@zgow.de>2017-08-26 20:56:10 +0200
commit3ebcf0fd5cb8fa655a27e5bbae379142397ead20 (patch)
treeb7589f305471870d3909df985b285ba75a801311
parentFix mobs not burning in daylight when on snow (#3961) (diff)
downloadcuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar.gz
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar.bz2
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar.lz
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar.xz
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.tar.zst
cuberite-3ebcf0fd5cb8fa655a27e5bbae379142397ead20.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_12.cpp72
-rw-r--r--src/Protocol/Protocol_1_12.h2
2 files changed, 50 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?
diff --git a/src/Protocol/Protocol_1_12.h b/src/Protocol/Protocol_1_12.h
index e1fc12149..17d7d4e86 100644
--- a/src/Protocol/Protocol_1_12.h
+++ b/src/Protocol/Protocol_1_12.h
@@ -101,6 +101,8 @@ public:
virtual void SendCameraSetTo(const cEntity & a_Entity) override;
virtual void SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
virtual void SendEntityMetadata(const cEntity & a_Entity) override;
+ virtual void SendLeashEntity(const cEntity & a_Entity, const cEntity & a_EntityLeashedTo) override;
+ virtual void SendUnleashEntity(const cEntity & a_Entity) override;
virtual void SendEntityVelocity(const cEntity & a_Entity) override;
virtual void SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
virtual void SendExperience(void) override;