summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_11.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-09 18:22:37 +0200
committerMattes D <github@xoft.cz>2019-09-10 09:45:28 +0200
commit2c804dd34a58ff9702bd1ab2cab30f6a61503638 (patch)
tree16b3052c65f65231898205d670c52660f79b661f /src/Protocol/Protocol_1_11.cpp
parentChunkGenerator: Changed to use cChunkCoords. (diff)
downloadcuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar.gz
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar.bz2
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar.lz
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar.xz
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.tar.zst
cuberite-2c804dd34a58ff9702bd1ab2cab30f6a61503638.zip
Diffstat (limited to 'src/Protocol/Protocol_1_11.cpp')
-rw-r--r--src/Protocol/Protocol_1_11.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index bbfcd6d94..9c8e0c544 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -5,7 +5,8 @@
Implements the 1.11 protocol classes:
- cProtocol_1_11_0
- release 1.11 protocol (#315)
-(others may be added later in the future for the 1.11 release series)
+ - cProtocol_1_11_1
+ - release 1.11.1 protocol (#316)
*/
#include "Globals.h"
@@ -332,7 +333,7 @@ namespace Metadata
cProtocol_1_11_0::cProtocol_1_11_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
- super(a_Client, a_ServerAddress, a_ServerPort, a_State)
+ Super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
}
@@ -344,7 +345,7 @@ void cProtocol_1_11_0::SendCollectEntity(const cEntity & a_Entity, const cPlayer
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, GetPacketId(sendCollectEntity)); // Collect Item packet
+ cPacketizer Pkt(*this, pktCollectEntity);
Pkt.WriteVarInt32(a_Entity.GetUniqueID());
Pkt.WriteVarInt32(a_Player.GetUniqueID());
Pkt.WriteVarInt32(static_cast<UInt32>(a_Count));
@@ -358,7 +359,7 @@ void cProtocol_1_11_0::SendHideTitle(void)
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, GetPacketId(sendTitle)); // Title packet
+ cPacketizer Pkt(*this, pktTitle);
Pkt.WriteVarInt32(4); // Hide title
}
@@ -370,7 +371,7 @@ void cProtocol_1_11_0::SendResetTitle(void)
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, GetPacketId(sendTitle)); // Title packet
+ cPacketizer Pkt(*this, pktTitle);
Pkt.WriteVarInt32(5); // Reset title
}
@@ -382,7 +383,7 @@ void cProtocol_1_11_0::SendSpawnMob(const cMonster & a_Mob)
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, GetPacketId(sendSpawnMob)); // Spawn Mob packet
+ cPacketizer Pkt(*this, pktSpawnMob);
Pkt.WriteVarInt32(a_Mob.GetUniqueID());
// TODO: Bad way to write a UUID, and it's not a true UUID, but this is functional for now.
Pkt.WriteBEUInt64(0);
@@ -526,7 +527,7 @@ void cProtocol_1_11_0::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, 0x45); // Title packet
+ cPacketizer Pkt(*this, pktTitle);
Pkt.WriteVarInt32(3); // Set title display times
Pkt.WriteBEInt32(a_FadeInTicks);
Pkt.WriteBEInt32(a_DisplayTicks);
@@ -594,7 +595,7 @@ void cProtocol_1_11_0::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
// Serialize the response into a packet:
Json::FastWriter Writer;
- cPacketizer Pkt(*this, 0x00); // Response packet
+ cPacketizer Pkt(*this, pktStatusResponse);
Pkt.WriteString(Writer.write(ResponseValue));
}
@@ -1175,7 +1176,7 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
cProtocol_1_11_1::cProtocol_1_11_1(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
- super(a_Client, a_ServerAddress, a_ServerPort, a_State)
+ Super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
}
@@ -1220,6 +1221,6 @@ void cProtocol_1_11_1::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
// Serialize the response into a packet:
Json::FastWriter Writer;
- cPacketizer Pkt(*this, 0x00); // Response packet
+ cPacketizer Pkt(*this, pktStatusResponse);
Pkt.WriteString(Writer.write(ResponseValue));
}