summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-12-15 20:21:43 +0100
committerMattes D <github@xoft.cz>2016-12-16 00:07:22 +0100
commit0e3b3be7662f03b7487408f70548eaca1188da3d (patch)
tree3751d17812c46e5847684d8f968f24c4a4e268d2 /src/Protocol/Protocol_1_9.cpp
parentAPIDump: Load the official undocumented from alternate location. (diff)
downloadcuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.gz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.bz2
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.lz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.xz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.zst
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_9.cpp (renamed from src/Protocol/Protocol19x.cpp)337
1 files changed, 166 insertions, 171 deletions
diff --git a/src/Protocol/Protocol19x.cpp b/src/Protocol/Protocol_1_9.cpp
index 5f3b9ec27..680675ca3 100644
--- a/src/Protocol/Protocol19x.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -1,22 +1,21 @@
-// Protocol19x.cpp
+// Protocol_1_9.cpp
/*
-Implements the 1.9.x protocol classes:
- - cProtocol190
- - release 1.9.0 protocol (#107)
- - cProtocol191
+Implements the 1.9 protocol classes:
+ - cProtocol_1_9_0
+ - release 1.9 protocol (#107)
+ - cProtocol_1_9_1
- release 1.9.1 protocol (#108)
- - cProtocol192
+ - cProtocol_1_9_2
- release 1.9.2 protocol (#109)
- - cProtocol194
+ - cProtocol_1_9_4
- release 1.9.4 protocol (#110)
-(others may be added later in the future for the 1.9 release series)
*/
#include "Globals.h"
#include "json/json.h"
-#include "Protocol19x.h"
+#include "Protocol_1_9.h"
#include "ChunkDataSerializer.h"
#include "PolarSSL++/Sha1Checksum.h"
#include "Packetizer.h"
@@ -109,9 +108,9 @@ extern bool g_ShouldLogCommIn, g_ShouldLogCommOut;
////////////////////////////////////////////////////////////////////////////////
-// cProtocol190:
+// cProtocol_1_9_0:
-cProtocol190::cProtocol190(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
+cProtocol_1_9_0::cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
super(a_Client),
m_ServerAddress(a_ServerAddress),
m_ServerPort(a_ServerPort),
@@ -156,7 +155,7 @@ cProtocol190::cProtocol190(cClientHandle * a_Client, const AString & a_ServerAdd
-void cProtocol190::DataReceived(const char * a_Data, size_t a_Size)
+void cProtocol_1_9_0::DataReceived(const char * a_Data, size_t a_Size)
{
if (m_IsEncrypted)
{
@@ -180,7 +179,7 @@ void cProtocol190::DataReceived(const char * a_Data, size_t a_Size)
-void cProtocol190::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_Vehicle)
+void cProtocol_1_9_0::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_Vehicle)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x40); // Set passangers packet
@@ -193,7 +192,7 @@ void cProtocol190::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_
-void cProtocol190::SendBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType)
+void cProtocol_1_9_0::SendBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType)
{
ASSERT(m_State == 3); // In game mode?
@@ -208,7 +207,7 @@ void cProtocol190::SendBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, cha
-void cProtocol190::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage)
+void cProtocol_1_9_0::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage)
{
ASSERT(m_State == 3); // In game mode?
@@ -222,7 +221,7 @@ void cProtocol190::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_Blo
-void cProtocol190::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
+void cProtocol_1_9_0::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
ASSERT(m_State == 3); // In game mode?
@@ -235,7 +234,7 @@ void cProtocol190::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLO
-void cProtocol190::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes)
+void cProtocol_1_9_0::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes)
{
ASSERT(m_State == 3); // In game mode?
@@ -255,7 +254,7 @@ void cProtocol190::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockV
-void cProtocol190::SendCameraSetTo(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendCameraSetTo(const cEntity & a_Entity)
{
cPacketizer Pkt(*this, 0x36); // Camera Packet (Attach the camera of a player at another entity in spectator mode)
Pkt.WriteVarInt32(a_Entity.GetUniqueID());
@@ -265,35 +264,29 @@ void cProtocol190::SendCameraSetTo(const cEntity & a_Entity)
-void cProtocol190::SendChat(const AString & a_Message, eChatType a_Type)
+void cProtocol_1_9_0::SendChat(const AString & a_Message, eChatType a_Type)
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, 0x0f); // Chat Message packet
- Pkt.WriteString(Printf("{\"text\":\"%s\"}", EscapeString(a_Message).c_str()));
- Pkt.WriteBEInt8(a_Type);
+ SendChatRaw(Printf("{\"text\":\"%s\"}", EscapeString(a_Message).c_str()), a_Type);
}
-void cProtocol190::SendChat(const cCompositeChat & a_Message, eChatType a_Type, bool a_ShouldUseChatPrefixes)
+void cProtocol_1_9_0::SendChat(const cCompositeChat & a_Message, eChatType a_Type, bool a_ShouldUseChatPrefixes)
{
ASSERT(m_State == 3); // In game mode?
-
- // Send the message to the client:
- cPacketizer Pkt(*this, 0x0f); // Chat Message packet
- Pkt.WriteString(a_Message.CreateJsonString(a_ShouldUseChatPrefixes));
- Pkt.WriteBEInt8(a_Type);
+ SendChatRaw(a_Message.CreateJsonString(a_ShouldUseChatPrefixes), a_Type);
}
-void cProtocol190::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
+void cProtocol_1_9_0::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
{
ASSERT(m_State == 3); // In game mode?
@@ -307,7 +300,7 @@ void cProtocol190::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
-void cProtocol190::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
+void cProtocol_1_9_0::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
{
ASSERT(m_State == 3); // In game mode?
@@ -323,8 +316,9 @@ void cProtocol190::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerialize
-void cProtocol190::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player)
+void cProtocol_1_9_0::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player, int a_Count)
{
+ UNUSED(a_Count);
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x49); // Collect Item packet
@@ -336,7 +330,7 @@ void cProtocol190::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a
-void cProtocol190::SendDestroyEntity(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendDestroyEntity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -349,7 +343,7 @@ void cProtocol190::SendDestroyEntity(const cEntity & a_Entity)
-void cProtocol190::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_PreviousVehicle)
+void cProtocol_1_9_0::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_PreviousVehicle)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x40); // Set passangers packet
@@ -361,7 +355,7 @@ void cProtocol190::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_
-void cProtocol190::SendDisconnect(const AString & a_Reason)
+void cProtocol_1_9_0::SendDisconnect(const AString & a_Reason)
{
switch (m_State)
{
@@ -386,7 +380,7 @@ void cProtocol190::SendDisconnect(const AString & a_Reason)
-void cProtocol190::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_9_0::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -398,7 +392,7 @@ void cProtocol190::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
-void cProtocol190::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
+void cProtocol_1_9_0::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
{
ASSERT(m_State == 3); // In game mode?
@@ -414,7 +408,7 @@ void cProtocol190::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, in
-void cProtocol190::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item)
+void cProtocol_1_9_0::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item)
{
ASSERT(m_State == 3); // In game mode?
@@ -433,7 +427,7 @@ void cProtocol190::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum
-void cProtocol190::SendEntityHeadLook(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendEntityHeadLook(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -446,7 +440,7 @@ void cProtocol190::SendEntityHeadLook(const cEntity & a_Entity)
-void cProtocol190::SendEntityLook(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendEntityLook(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -461,7 +455,7 @@ void cProtocol190::SendEntityLook(const cEntity & a_Entity)
-void cProtocol190::SendEntityMetadata(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendEntityMetadata(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -475,7 +469,7 @@ void cProtocol190::SendEntityMetadata(const cEntity & a_Entity)
-void cProtocol190::SendEntityProperties(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendEntityProperties(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -488,7 +482,7 @@ void cProtocol190::SendEntityProperties(const cEntity & a_Entity)
-void cProtocol190::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
+void cProtocol_1_9_0::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -505,7 +499,7 @@ void cProtocol190::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char
-void cProtocol190::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
+void cProtocol_1_9_0::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -524,7 +518,7 @@ void cProtocol190::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX,
-void cProtocol190::SendEntityStatus(const cEntity & a_Entity, char a_Status)
+void cProtocol_1_9_0::SendEntityStatus(const cEntity & a_Entity, char a_Status)
{
ASSERT(m_State == 3); // In game mode?
@@ -537,7 +531,7 @@ void cProtocol190::SendEntityStatus(const cEntity & a_Entity, char a_Status)
-void cProtocol190::SendEntityVelocity(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendEntityVelocity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -553,7 +547,7 @@ void cProtocol190::SendEntityVelocity(const cEntity & a_Entity)
-void cProtocol190::SendExplosion(double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion)
+void cProtocol_1_9_0::SendExplosion(double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion)
{
ASSERT(m_State == 3); // In game mode?
@@ -578,7 +572,7 @@ void cProtocol190::SendExplosion(double a_BlockX, double a_BlockY, double a_Bloc
-void cProtocol190::SendGameMode(eGameMode a_GameMode)
+void cProtocol_1_9_0::SendGameMode(eGameMode a_GameMode)
{
ASSERT(m_State == 3); // In game mode?
@@ -591,7 +585,7 @@ void cProtocol190::SendGameMode(eGameMode a_GameMode)
-void cProtocol190::SendHealth(void)
+void cProtocol_1_9_0::SendHealth(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -606,7 +600,7 @@ void cProtocol190::SendHealth(void)
-void cProtocol190::SendHideTitle(void)
+void cProtocol_1_9_0::SendHideTitle(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -618,7 +612,7 @@ void cProtocol190::SendHideTitle(void)
-void cProtocol190::SendInventorySlot(char a_WindowID, short a_SlotNum, const cItem & a_Item)
+void cProtocol_1_9_0::SendInventorySlot(char a_WindowID, short a_SlotNum, const cItem & a_Item)
{
ASSERT(m_State == 3); // In game mode?
@@ -632,7 +626,7 @@ void cProtocol190::SendInventorySlot(char a_WindowID, short a_SlotNum, const cIt
-void cProtocol190::SendKeepAlive(UInt32 a_PingID)
+void cProtocol_1_9_0::SendKeepAlive(UInt32 a_PingID)
{
// Drop the packet if the protocol is not in the Game state yet (caused a client crash):
if (m_State != 3)
@@ -649,7 +643,7 @@ void cProtocol190::SendKeepAlive(UInt32 a_PingID)
-void cProtocol190::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
+void cProtocol_1_9_0::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
{
// Send the Join Game packet:
{
@@ -683,7 +677,7 @@ void cProtocol190::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
-void cProtocol190::SendLoginSuccess(void)
+void cProtocol_1_9_0::SendLoginSuccess(void)
{
ASSERT(m_State == 2); // State: login?
@@ -706,7 +700,7 @@ void cProtocol190::SendLoginSuccess(void)
-void cProtocol190::SendPaintingSpawn(const cPainting & a_Painting)
+void cProtocol_1_9_0::SendPaintingSpawn(const cPainting & a_Painting)
{
ASSERT(m_State == 3); // In game mode?
double PosX = a_Painting.GetPosX();
@@ -727,7 +721,7 @@ void cProtocol190::SendPaintingSpawn(const cPainting & a_Painting)
-void cProtocol190::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataStartY)
+void cProtocol_1_9_0::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataStartY)
{
ASSERT(m_State == 3); // In game mode?
@@ -759,7 +753,7 @@ void cProtocol190::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataS
-void cProtocol190::SendPickupSpawn(const cPickup & a_Pickup)
+void cProtocol_1_9_0::SendPickupSpawn(const cPickup & a_Pickup)
{
ASSERT(m_State == 3); // In game mode?
@@ -788,7 +782,7 @@ void cProtocol190::SendPickupSpawn(const cPickup & a_Pickup)
-void cProtocol190::SendPlayerAbilities(void)
+void cProtocol_1_9_0::SendPlayerAbilities(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -817,7 +811,7 @@ void cProtocol190::SendPlayerAbilities(void)
-void cProtocol190::SendEntityAnimation(const cEntity & a_Entity, char a_Animation)
+void cProtocol_1_9_0::SendEntityAnimation(const cEntity & a_Entity, char a_Animation)
{
ASSERT(m_State == 3); // In game mode?
@@ -830,7 +824,7 @@ void cProtocol190::SendEntityAnimation(const cEntity & a_Entity, char a_Animatio
-void cProtocol190::SendParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount)
+void cProtocol_1_9_0::SendParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount)
{
ASSERT(m_State == 3); // In game mode?
int ParticleID = GetParticleID(a_ParticleName);
@@ -852,7 +846,7 @@ void cProtocol190::SendParticleEffect(const AString & a_ParticleName, float a_Sr
-void cProtocol190::SendParticleEffect(const AString & a_ParticleName, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, std::array<int, 2> a_Data)
+void cProtocol_1_9_0::SendParticleEffect(const AString & a_ParticleName, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, std::array<int, 2> a_Data)
{
ASSERT(m_State == 3); // In game mode?
int ParticleID = GetParticleID(a_ParticleName);
@@ -896,7 +890,7 @@ void cProtocol190::SendParticleEffect(const AString & a_ParticleName, Vector3f a
-void cProtocol190::SendPlayerListAddPlayer(const cPlayer & a_Player)
+void cProtocol_1_9_0::SendPlayerListAddPlayer(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -933,7 +927,7 @@ void cProtocol190::SendPlayerListAddPlayer(const cPlayer & a_Player)
-void cProtocol190::SendPlayerListRemovePlayer(const cPlayer & a_Player)
+void cProtocol_1_9_0::SendPlayerListRemovePlayer(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -947,7 +941,7 @@ void cProtocol190::SendPlayerListRemovePlayer(const cPlayer & a_Player)
-void cProtocol190::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
+void cProtocol_1_9_0::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -962,7 +956,7 @@ void cProtocol190::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
-void cProtocol190::SendPlayerListUpdatePing(const cPlayer & a_Player)
+void cProtocol_1_9_0::SendPlayerListUpdatePing(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -981,7 +975,7 @@ void cProtocol190::SendPlayerListUpdatePing(const cPlayer & a_Player)
-void cProtocol190::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName)
+void cProtocol_1_9_0::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName)
{
ASSERT(m_State == 3); // In game mode?
@@ -1005,7 +999,7 @@ void cProtocol190::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, con
-void cProtocol190::SendPlayerMaxSpeed(void)
+void cProtocol_1_9_0::SendPlayerMaxSpeed(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1034,7 +1028,7 @@ void cProtocol190::SendPlayerMaxSpeed(void)
-void cProtocol190::SendPlayerMoveLook(void)
+void cProtocol_1_9_0::SendPlayerMoveLook(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1053,7 +1047,7 @@ void cProtocol190::SendPlayerMoveLook(void)
-void cProtocol190::SendPlayerPosition(void)
+void cProtocol_1_9_0::SendPlayerPosition(void)
{
// There is no dedicated packet for this, send the whole thing:
SendPlayerMoveLook();
@@ -1063,7 +1057,7 @@ void cProtocol190::SendPlayerPosition(void)
-void cProtocol190::SendPlayerSpawn(const cPlayer & a_Player)
+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
@@ -1082,7 +1076,7 @@ void cProtocol190::SendPlayerSpawn(const cPlayer & a_Player)
-void cProtocol190::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
+void cProtocol_1_9_0::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
{
ASSERT(m_State == 3); // In game mode?
@@ -1095,7 +1089,7 @@ void cProtocol190::SendPluginMessage(const AString & a_Channel, const AString &
-void cProtocol190::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
+void cProtocol_1_9_0::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
{
ASSERT(m_State == 3); // In game mode?
@@ -1108,7 +1102,7 @@ void cProtocol190::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect
-void cProtocol190::SendResetTitle(void)
+void cProtocol_1_9_0::SendResetTitle(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1120,7 +1114,7 @@ void cProtocol190::SendResetTitle(void)
-void cProtocol190::SendRespawn(eDimension a_Dimension)
+void cProtocol_1_9_0::SendRespawn(eDimension a_Dimension)
{
cPacketizer Pkt(*this, 0x33); // Respawn packet
cPlayer * Player = m_Client->GetPlayer();
@@ -1134,7 +1128,7 @@ void cProtocol190::SendRespawn(eDimension a_Dimension)
-void cProtocol190::SendExperience(void)
+void cProtocol_1_9_0::SendExperience(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1149,7 +1143,7 @@ void cProtocol190::SendExperience(void)
-void cProtocol190::SendExperienceOrb(const cExpOrb & a_ExpOrb)
+void cProtocol_1_9_0::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
ASSERT(m_State == 3); // In game mode?
@@ -1165,7 +1159,7 @@ void cProtocol190::SendExperienceOrb(const cExpOrb & a_ExpOrb)
-void cProtocol190::SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode)
+void cProtocol_1_9_0::SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode)
{
ASSERT(m_State == 3); // In game mode?
@@ -1183,7 +1177,7 @@ void cProtocol190::SendScoreboardObjective(const AString & a_Name, const AString
-void cProtocol190::SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode)
+void cProtocol_1_9_0::SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode)
{
ASSERT(m_State == 3); // In game mode?
@@ -1202,7 +1196,7 @@ void cProtocol190::SendScoreUpdate(const AString & a_Objective, const AString &
-void cProtocol190::SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display)
+void cProtocol_1_9_0::SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display)
{
ASSERT(m_State == 3); // In game mode?
@@ -1215,7 +1209,7 @@ void cProtocol190::SendDisplayObjective(const AString & a_Objective, cScoreboard
-void cProtocol190::SendSetSubTitle(const cCompositeChat & a_SubTitle)
+void cProtocol_1_9_0::SendSetSubTitle(const cCompositeChat & a_SubTitle)
{
SendSetRawSubTitle(a_SubTitle.CreateJsonString(false));
}
@@ -1224,7 +1218,7 @@ void cProtocol190::SendSetSubTitle(const cCompositeChat & a_SubTitle)
-void cProtocol190::SendSetRawSubTitle(const AString & a_SubTitle)
+void cProtocol_1_9_0::SendSetRawSubTitle(const AString & a_SubTitle)
{
ASSERT(m_State == 3); // In game mode?
@@ -1238,7 +1232,7 @@ void cProtocol190::SendSetRawSubTitle(const AString & a_SubTitle)
-void cProtocol190::SendSetTitle(const cCompositeChat & a_Title)
+void cProtocol_1_9_0::SendSetTitle(const cCompositeChat & a_Title)
{
SendSetRawTitle(a_Title.CreateJsonString(false));
}
@@ -1247,7 +1241,7 @@ void cProtocol190::SendSetTitle(const cCompositeChat & a_Title)
-void cProtocol190::SendSetRawTitle(const AString & a_Title)
+void cProtocol_1_9_0::SendSetRawTitle(const AString & a_Title)
{
ASSERT(m_State == 3); // In game mode?
@@ -1261,7 +1255,7 @@ void cProtocol190::SendSetRawTitle(const AString & a_Title)
-void cProtocol190::SendSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch)
+void cProtocol_1_9_0::SendSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch)
{
ASSERT(m_State == 3); // In game mode?
@@ -1279,7 +1273,7 @@ void cProtocol190::SendSoundEffect(const AString & a_SoundName, double a_X, doub
-void cProtocol190::SendSoundParticleEffect(const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data)
+void cProtocol_1_9_0::SendSoundParticleEffect(const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data)
{
ASSERT(m_State == 3); // In game mode?
@@ -1294,7 +1288,7 @@ void cProtocol190::SendSoundParticleEffect(const EffectID a_EffectID, int a_SrcX
-void cProtocol190::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
+void cProtocol_1_9_0::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
{
ASSERT(m_State == 3); // In game mode?
@@ -1319,7 +1313,7 @@ void cProtocol190::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
-void cProtocol190::SendSpawnMob(const cMonster & a_Mob)
+void cProtocol_1_9_0::SendSpawnMob(const cMonster & a_Mob)
{
ASSERT(m_State == 3); // In game mode?
@@ -1346,7 +1340,7 @@ void cProtocol190::SendSpawnMob(const cMonster & a_Mob)
-void cProtocol190::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch)
+void cProtocol_1_9_0::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch)
{
ASSERT(m_State == 3); // In game mode?
double PosX = a_Entity.GetPosX();
@@ -1378,7 +1372,7 @@ void cProtocol190::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
-void cProtocol190::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
+void cProtocol_1_9_0::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
{
ASSERT(m_State == 3); // In game mode?
@@ -1403,7 +1397,7 @@ void cProtocol190::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
-void cProtocol190::SendStatistics(const cStatManager & a_Manager)
+void cProtocol_1_9_0::SendStatistics(const cStatManager & a_Manager)
{
ASSERT(m_State == 3); // In game mode?
@@ -1425,7 +1419,7 @@ void cProtocol190::SendStatistics(const cStatManager & a_Manager)
-void cProtocol190::SendTabCompletionResults(const AStringVector & a_Results)
+void cProtocol_1_9_0::SendTabCompletionResults(const AStringVector & a_Results)
{
ASSERT(m_State == 3); // In game mode?
@@ -1442,7 +1436,7 @@ void cProtocol190::SendTabCompletionResults(const AStringVector & a_Results)
-void cProtocol190::SendTeleportEntity(const cEntity & a_Entity)
+void cProtocol_1_9_0::SendTeleportEntity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -1460,7 +1454,7 @@ void cProtocol190::SendTeleportEntity(const cEntity & a_Entity)
-void cProtocol190::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_9_0::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1476,7 +1470,7 @@ void cProtocol190::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
-void cProtocol190::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks)
+void cProtocol_1_9_0::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks)
{
ASSERT(m_State == 3); // In game mode?
@@ -1492,7 +1486,7 @@ void cProtocol190::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_F
-void cProtocol190::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle)
+void cProtocol_1_9_0::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle)
{
ASSERT(m_State == 3); // In game mode?
if (!a_DoDaylightCycle)
@@ -1510,7 +1504,7 @@ void cProtocol190::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_Do
-void cProtocol190::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
+void cProtocol_1_9_0::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1522,7 +1516,7 @@ void cProtocol190::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
-void cProtocol190::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
+void cProtocol_1_9_0::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
{
ASSERT(m_State == 3); // In game mode?
@@ -1548,7 +1542,7 @@ void cProtocol190::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
-void cProtocol190::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
+void cProtocol_1_9_0::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
{
ASSERT(m_State == 3); // In game mode?
@@ -1569,7 +1563,7 @@ void cProtocol190::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, cons
-void cProtocol190::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_9_0::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1582,7 +1576,7 @@ void cProtocol190::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_Bloc
-void cProtocol190::SendWeather(eWeather a_Weather)
+void cProtocol_1_9_0::SendWeather(eWeather a_Weather)
{
ASSERT(m_State == 3); // In game mode?
@@ -1599,7 +1593,7 @@ void cProtocol190::SendWeather(eWeather a_Weather)
-void cProtocol190::SendWholeInventory(const cWindow & a_Window)
+void cProtocol_1_9_0::SendWholeInventory(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1618,7 +1612,7 @@ void cProtocol190::SendWholeInventory(const cWindow & a_Window)
-void cProtocol190::SendWindowClose(const cWindow & a_Window)
+void cProtocol_1_9_0::SendWindowClose(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1630,7 +1624,7 @@ void cProtocol190::SendWindowClose(const cWindow & a_Window)
-void cProtocol190::SendWindowOpen(const cWindow & a_Window)
+void cProtocol_1_9_0::SendWindowOpen(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1671,7 +1665,7 @@ void cProtocol190::SendWindowOpen(const cWindow & a_Window)
-void cProtocol190::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
+void cProtocol_1_9_0::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
{
ASSERT(m_State == 3); // In game mode?
@@ -1685,7 +1679,7 @@ void cProtocol190::SendWindowProperty(const cWindow & a_Window, short a_Property
-bool cProtocol190::CompressPacket(const AString & a_Packet, AString & a_CompressedData)
+bool cProtocol_1_9_0::CompressPacket(const AString & a_Packet, AString & a_CompressedData)
{
// Compress the data:
char CompressedData[MAX_COMPRESSED_PACKET_LEN];
@@ -1728,7 +1722,7 @@ bool cProtocol190::CompressPacket(const AString & a_Packet, AString & a_Compress
-int cProtocol190::GetParticleID(const AString & a_ParticleName)
+int cProtocol_1_9_0::GetParticleID(const AString & a_ParticleName)
{
static bool IsInitialized = false;
static std::map<AString, int> ParticleMap;
@@ -1794,7 +1788,7 @@ int cProtocol190::GetParticleID(const AString & a_ParticleName)
-void cProtocol190::FixItemFramePositions(int a_ObjectData, double & a_PosX, double & a_PosZ, double & a_Yaw)
+void cProtocol_1_9_0::FixItemFramePositions(int a_ObjectData, double & a_PosX, double & a_PosZ, double & a_Yaw)
{
switch (a_ObjectData)
{
@@ -1829,7 +1823,7 @@ void cProtocol190::FixItemFramePositions(int a_ObjectData, double & a_PosX, doub
-void cProtocol190::AddReceivedData(const char * a_Data, size_t a_Size)
+void cProtocol_1_9_0::AddReceivedData(const char * a_Data, size_t a_Size)
{
// Write the incoming data into the comm log file:
if (g_ShouldLogCommIn && m_CommLogFile.IsOpen())
@@ -2024,7 +2018,7 @@ void cProtocol190::AddReceivedData(const char * a_Data, size_t a_Size)
-bool cProtocol190::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
+bool cProtocol_1_9_0::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
{
switch (m_State)
{
@@ -2116,7 +2110,7 @@ bool cProtocol190::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
-void cProtocol190::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt64, Int64, Timestamp);
@@ -2128,7 +2122,7 @@ void cProtocol190::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
{
cServer * Server = cRoot::Get()->GetServer();
AString ServerDescription = Server->GetDescription();
@@ -2173,7 +2167,7 @@ void cProtocol190::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer)
{
UInt32 EncKeyLength, EncNonceLength;
if (!a_ByteBuffer.ReadVarInt(EncKeyLength))
@@ -2236,7 +2230,7 @@ void cProtocol190::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffe
-void cProtocol190::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
{
AString Username;
if (!a_ByteBuffer.ReadVarUTF8String(Username))
@@ -2273,7 +2267,7 @@ void cProtocol190::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, Int32, Hand);
@@ -2284,7 +2278,7 @@ void cProtocol190::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Status);
@@ -2302,7 +2296,7 @@ void cProtocol190::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
@@ -2322,7 +2316,7 @@ void cProtocol190::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketBoatSteer(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketBoatSteer(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBool, bool, RightPaddle);
HANDLE_READ(a_ByteBuffer, ReadBool, bool, LeftPaddle);
@@ -2345,7 +2339,7 @@ void cProtocol190::HandlePacketBoatSteer(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Message);
m_Client->HandleChat(Message);
@@ -2355,7 +2349,7 @@ void cProtocol190::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Locale);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, ViewDistance);
@@ -2373,7 +2367,7 @@ void cProtocol190::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, ActionID);
switch (ActionID)
@@ -2405,7 +2399,7 @@ void cProtocol190::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandleConfirmTeleport(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandleConfirmTeleport(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt32, UInt32, TeleportID);
// We don't actually validate that this packet is sent or anything yet, but it still needs to be read.
@@ -2415,7 +2409,7 @@ void cProtocol190::HandleConfirmTeleport(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
cItem Item;
@@ -2430,7 +2424,7 @@ void cProtocol190::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffe
-void cProtocol190::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, PlayerID);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Action);
@@ -2450,7 +2444,7 @@ void cProtocol190::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, KeepAliveID);
m_Client->HandleKeepAlive(KeepAliveID);
@@ -2460,7 +2454,7 @@ void cProtocol190::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBool, bool, IsOnGround);
// TODO: m_Client->HandlePlayerOnGround(IsOnGround);
@@ -2470,7 +2464,7 @@ void cProtocol190::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Flags);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, FlyingSpeed);
@@ -2494,7 +2488,7 @@ void cProtocol190::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Yaw);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Pitch);
@@ -2506,7 +2500,7 @@ void cProtocol190::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosX);
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosY);
@@ -2519,7 +2513,7 @@ void cProtocol190::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosX);
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosY);
@@ -2534,7 +2528,7 @@ void cProtocol190::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Channel);
@@ -2565,7 +2559,7 @@ void cProtocol190::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
m_Client->HandleSlotSelected(SlotNum);
@@ -2575,7 +2569,7 @@ void cProtocol190::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketSpectate(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketSpectate(cByteBuffer & a_ByteBuffer)
{
AString playerUUID;
if (!a_ByteBuffer.ReadUUID(playerUUID))
@@ -2590,7 +2584,7 @@ void cProtocol190::HandlePacketSpectate(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Sideways);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Forward);
@@ -2614,7 +2608,7 @@ void cProtocol190::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Text);
HANDLE_READ(a_ByteBuffer, ReadBool, bool, AssumeCommand);
@@ -2632,7 +2626,7 @@ void cProtocol190::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
@@ -2654,7 +2648,7 @@ void cProtocol190::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, EntityID);
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, Type);
@@ -2694,7 +2688,7 @@ void cProtocol190::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketUseItem(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketUseItem(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt64, Hand);
@@ -2706,7 +2700,7 @@ void cProtocol190::HandlePacketUseItem(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Enchantment);
@@ -2718,7 +2712,7 @@ void cProtocol190::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketVehicleMove(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketVehicleMove(cByteBuffer & a_ByteBuffer)
{
// This handles updating the vehicles location server side
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, xPos);
@@ -2744,7 +2738,7 @@ void cProtocol190::HandlePacketVehicleMove(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
@@ -2796,7 +2790,7 @@ void cProtocol190::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_0::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
m_Client->HandleWindowClose(WindowID);
@@ -2806,7 +2800,7 @@ void cProtocol190::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
-void cProtocol190::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel)
+void cProtocol_1_9_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel)
{
if (a_Channel == "MC|AdvCdm")
{
@@ -2871,7 +2865,7 @@ void cProtocol190::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const
-void cProtocol190::SendData(const char * a_Data, size_t a_Size)
+void cProtocol_1_9_0::SendData(const char * a_Data, size_t a_Size)
{
if (m_IsEncrypted)
{
@@ -2895,7 +2889,7 @@ void cProtocol190::SendData(const char * a_Data, size_t a_Size)
-bool cProtocol190::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes)
+bool cProtocol_1_9_0::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes)
{
HANDLE_PACKET_READ(a_ByteBuffer, ReadBEInt16, Int16, ItemType);
if (ItemType == -1)
@@ -2930,7 +2924,7 @@ bool cProtocol190::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a
-void cProtocol190::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
+void cProtocol_1_9_0::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
{
// Parse into NBT:
cParsedNBT NBT(a_Metadata.data(), a_Metadata.size());
@@ -3133,7 +3127,7 @@ void cProtocol190::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
-void cProtocol190::StartEncryption(const Byte * a_Key)
+void cProtocol_1_9_0::StartEncryption(const Byte * a_Key)
{
m_Encryptor.Init(a_Key, a_Key);
m_Decryptor.Init(a_Key, a_Key);
@@ -3155,7 +3149,7 @@ void cProtocol190::StartEncryption(const Byte * a_Key)
-eBlockFace cProtocol190::FaceIntToBlockFace(Int32 a_BlockFace)
+eBlockFace cProtocol_1_9_0::FaceIntToBlockFace(Int32 a_BlockFace)
{
// Normalize the blockface values returned from the protocol
// Anything known gets mapped 1:1, everything else returns BLOCK_FACE_NONE
@@ -3176,9 +3170,9 @@ eBlockFace cProtocol190::FaceIntToBlockFace(Int32 a_BlockFace)
////////////////////////////////////////////////////////////////////////////////
-// cProtocol190::cPacketizer:
+// cProtocol_1_9_0::cPacketizer:
-void cProtocol190::SendPacket(cPacketizer & a_Pkt)
+void cProtocol_1_9_0::SendPacket(cPacketizer & a_Pkt)
{
UInt32 PacketLen = static_cast<UInt32>(m_OutPacketBuffer.GetUsedSpace());
AString PacketData, CompressedPacket;
@@ -3188,7 +3182,7 @@ void cProtocol190::SendPacket(cPacketizer & a_Pkt)
if ((m_State == 3) && (PacketLen >= 256))
{
// Compress the packet payload:
- if (!cProtocol190::CompressPacket(PacketData, CompressedPacket))
+ if (!cProtocol_1_9_0::CompressPacket(PacketData, CompressedPacket))
{
return;
}
@@ -3238,7 +3232,7 @@ void cProtocol190::SendPacket(cPacketizer & a_Pkt)
-void cProtocol190::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
+void cProtocol_1_9_0::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
{
short ItemType = a_Item.m_ItemType;
ASSERT(ItemType >= -1); // Check validity of packets in debug runtime
@@ -3413,7 +3407,7 @@ void cProtocol190::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
-void cProtocol190::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_BlockEntity)
+void cProtocol_1_9_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_BlockEntity)
{
cFastNBTWriter Writer;
@@ -3517,7 +3511,7 @@ void cProtocol190::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_
-void cProtocol190::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity)
+void cProtocol_1_9_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity)
{
// Common metadata:
Int8 Flags = 0;
@@ -3712,7 +3706,7 @@ void cProtocol190::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_En
-void cProtocol190::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
+void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
{
// Living Enitiy Metadata
if (a_Mob.HasCustomName())
@@ -4045,7 +4039,7 @@ void cProtocol190::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
-void cProtocol190::WriteEntityProperties(cPacketizer & a_Pkt, const cEntity & a_Entity)
+void cProtocol_1_9_0::WriteEntityProperties(cPacketizer & a_Pkt, const cEntity & a_Entity)
{
if (!a_Entity.IsMob())
{
@@ -4066,9 +4060,9 @@ void cProtocol190::WriteEntityProperties(cPacketizer & a_Pkt, const cEntity & a_
////////////////////////////////////////////////////////////////////////////////
-// cProtocol191:
+// cProtocol_1_9_1:
-cProtocol191::cProtocol191(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
+cProtocol_1_9_1::cProtocol_1_9_1(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
}
@@ -4077,7 +4071,7 @@ cProtocol191::cProtocol191(cClientHandle * a_Client, const AString &a_ServerAddr
-void cProtocol191::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
+void cProtocol_1_9_1::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
{
// Send the Join Game packet:
{
@@ -4112,7 +4106,7 @@ void cProtocol191::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
-void cProtocol191::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_1::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
{
cServer * Server = cRoot::Get()->GetServer();
AString ServerDescription = Server->GetDescription();
@@ -4158,9 +4152,9 @@ void cProtocol191::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
////////////////////////////////////////////////////////////////////////////////
-// cProtocol192:
+// cProtocol_1_9_2:
-cProtocol192::cProtocol192(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
+cProtocol_1_9_2::cProtocol_1_9_2(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
}
@@ -4169,7 +4163,7 @@ cProtocol192::cProtocol192(cClientHandle * a_Client, const AString &a_ServerAddr
-void cProtocol192::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_2::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
{
cServer * Server = cRoot::Get()->GetServer();
AString ServerDescription = Server->GetDescription();
@@ -4215,9 +4209,9 @@ void cProtocol192::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
////////////////////////////////////////////////////////////////////////////////
-// cProtocol194:
+// cProtocol_1_9_4:
-cProtocol194::cProtocol194(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
+cProtocol_1_9_4::cProtocol_1_9_4(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
}
@@ -4226,7 +4220,7 @@ cProtocol194::cProtocol194(cClientHandle * a_Client, const AString &a_ServerAddr
-void cProtocol194::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_9_4::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
{
cServer * Server = cRoot::Get()->GetServer();
AString ServerDescription = Server->GetDescription();
@@ -4271,8 +4265,9 @@ void cProtocol194::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
-void cProtocol194::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player)
+void cProtocol_1_9_4::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player, int a_Count)
{
+ UNUSED(a_Count);
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x48); // Collect Item packet
@@ -4284,7 +4279,7 @@ void cProtocol194::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a
-void cProtocol194::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
+void cProtocol_1_9_4::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
{
ASSERT(m_State == 3); // In game mode?
@@ -4300,7 +4295,7 @@ void cProtocol194::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerialize
-void cProtocol194::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
+void cProtocol_1_9_4::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
{
ASSERT(m_State == 3); // In game mode?
@@ -4316,7 +4311,7 @@ void cProtocol194::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, in
-void cProtocol194::SendEntityProperties(const cEntity & a_Entity)
+void cProtocol_1_9_4::SendEntityProperties(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -4330,7 +4325,7 @@ void cProtocol194::SendEntityProperties(const cEntity & a_Entity)
-void cProtocol194::SendPlayerMaxSpeed(void)
+void cProtocol_1_9_4::SendPlayerMaxSpeed(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -4359,7 +4354,7 @@ void cProtocol194::SendPlayerMaxSpeed(void)
-void cProtocol194::SendTeleportEntity(const cEntity & a_Entity)
+void cProtocol_1_9_4::SendTeleportEntity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -4377,7 +4372,7 @@ void cProtocol194::SendTeleportEntity(const cEntity & a_Entity)
-void cProtocol194::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
+void cProtocol_1_9_4::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
{
ASSERT(m_State == 3); // In game mode?