summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-12-16 00:28:12 +0100
committerGitHub <noreply@github.com>2016-12-16 00:28:12 +0100
commit71e14ee358e59314498e9b46484eff7e34ae6442 (patch)
tree56ca5369d83504ac063dbc3139f72dc2cdf42610 /src/Protocol/Protocol_1_8.cpp
parentAPIDump: Load the official undocumented from alternate location. (diff)
parentCompositeChat: Use shorter JSON format. (diff)
downloadcuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.gz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.bz2
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.lz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.xz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.zst
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_8.cpp (renamed from src/Protocol/Protocol18x.cpp)288
1 files changed, 141 insertions, 147 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol_1_8.cpp
index 0679219a9..bbeb3ae8b 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -1,16 +1,15 @@
-// Protocol18x.cpp
+// Protocol_1_8.cpp
/*
-Implements the 1.8.x protocol classes:
- - cProtocol180
- - release 1.8.0 protocol (#47)
-(others may be added later in the future for the 1.8 release series)
+Implements the 1.8 protocol classes:
+ - cProtocol_1_8_0
+ - release 1.8 protocol (#47)
*/
#include "Globals.h"
#include "json/json.h"
-#include "Protocol18x.h"
+#include "Protocol_1_8.h"
#include "ChunkDataSerializer.h"
#include "PolarSSL++/Sha1Checksum.h"
#include "Packetizer.h"
@@ -99,9 +98,9 @@ extern bool g_ShouldLogCommIn, g_ShouldLogCommOut;
////////////////////////////////////////////////////////////////////////////////
-// cProtocol180:
+// cProtocol_1_8_0:
-cProtocol180::cProtocol180(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
+cProtocol_1_8_0::cProtocol_1_8_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),
@@ -146,7 +145,7 @@ cProtocol180::cProtocol180(cClientHandle * a_Client, const AString & a_ServerAdd
-void cProtocol180::DataReceived(const char * a_Data, size_t a_Size)
+void cProtocol_1_8_0::DataReceived(const char * a_Data, size_t a_Size)
{
if (m_IsEncrypted)
{
@@ -170,7 +169,7 @@ void cProtocol180::DataReceived(const char * a_Data, size_t a_Size)
-void cProtocol180::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_Vehicle)
+void cProtocol_1_8_0::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_Vehicle)
{
ASSERT(m_State == 3); // In game mode?
@@ -184,7 +183,7 @@ void cProtocol180::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_
-void cProtocol180::SendBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType)
+void cProtocol_1_8_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?
@@ -199,7 +198,7 @@ void cProtocol180::SendBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, cha
-void cProtocol180::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage)
+void cProtocol_1_8_0::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage)
{
ASSERT(m_State == 3); // In game mode?
@@ -213,7 +212,7 @@ void cProtocol180::SendBlockBreakAnim(UInt32 a_EntityID, int a_BlockX, int a_Blo
-void cProtocol180::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
+void cProtocol_1_8_0::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
ASSERT(m_State == 3); // In game mode?
@@ -226,7 +225,7 @@ void cProtocol180::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLO
-void cProtocol180::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes)
+void cProtocol_1_8_0::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes)
{
ASSERT(m_State == 3); // In game mode?
@@ -246,7 +245,7 @@ void cProtocol180::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockV
-void cProtocol180::SendCameraSetTo(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendCameraSetTo(const cEntity & a_Entity)
{
cPacketizer Pkt(*this, 0x43); // Camera Packet (Attach the camera of a player at another entity in spectator mode)
Pkt.WriteVarInt32(a_Entity.GetUniqueID());
@@ -256,35 +255,29 @@ void cProtocol180::SendCameraSetTo(const cEntity & a_Entity)
-void cProtocol180::SendChat(const AString & a_Message, eChatType a_Type)
+void cProtocol_1_8_0::SendChat(const AString & a_Message, eChatType a_Type)
{
ASSERT(m_State == 3); // In game mode?
- cPacketizer Pkt(*this, 0x02); // 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 cProtocol180::SendChat(const cCompositeChat & a_Message, eChatType a_Type, bool a_ShouldUseChatPrefixes)
+void cProtocol_1_8_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, 0x02);
- Pkt.WriteString(a_Message.CreateJsonString(a_ShouldUseChatPrefixes));
- Pkt.WriteBEInt8(a_Type);
+ SendChatRaw(a_Message.CreateJsonString(a_ShouldUseChatPrefixes), a_Type);
}
-void cProtocol180::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
+void cProtocol_1_8_0::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
{
ASSERT(m_State == 3); // In game mode?
@@ -298,7 +291,7 @@ void cProtocol180::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
-void cProtocol180::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
+void cProtocol_1_8_0::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
{
ASSERT(m_State == 3); // In game mode?
@@ -314,8 +307,9 @@ void cProtocol180::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerialize
-void cProtocol180::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player)
+void cProtocol_1_8_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, 0x0d); // Collect Item packet
@@ -327,7 +321,7 @@ void cProtocol180::SendCollectEntity(const cEntity & a_Entity, const cPlayer & a
-void cProtocol180::SendDestroyEntity(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendDestroyEntity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -340,7 +334,7 @@ void cProtocol180::SendDestroyEntity(const cEntity & a_Entity)
-void cProtocol180::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_PreviousVehicle)
+void cProtocol_1_8_0::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_PreviousVehicle)
{
ASSERT(m_State == 3); // In game mode?
@@ -354,7 +348,7 @@ void cProtocol180::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_
-void cProtocol180::SendDisconnect(const AString & a_Reason)
+void cProtocol_1_8_0::SendDisconnect(const AString & a_Reason)
{
switch (m_State)
{
@@ -379,7 +373,7 @@ void cProtocol180::SendDisconnect(const AString & a_Reason)
-void cProtocol180::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_8_0::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -391,7 +385,7 @@ void cProtocol180::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
-void cProtocol180::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
+void cProtocol_1_8_0::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration)
{
ASSERT(m_State == 3); // In game mode?
@@ -407,7 +401,7 @@ void cProtocol180::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, in
-void cProtocol180::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item)
+void cProtocol_1_8_0::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item)
{
ASSERT(m_State == 3); // In game mode?
@@ -421,7 +415,7 @@ void cProtocol180::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum
-void cProtocol180::SendEntityHeadLook(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendEntityHeadLook(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -434,7 +428,7 @@ void cProtocol180::SendEntityHeadLook(const cEntity & a_Entity)
-void cProtocol180::SendEntityLook(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendEntityLook(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -449,7 +443,7 @@ void cProtocol180::SendEntityLook(const cEntity & a_Entity)
-void cProtocol180::SendEntityMetadata(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendEntityMetadata(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -463,7 +457,7 @@ void cProtocol180::SendEntityMetadata(const cEntity & a_Entity)
-void cProtocol180::SendEntityProperties(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendEntityProperties(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -476,7 +470,7 @@ void cProtocol180::SendEntityProperties(const cEntity & a_Entity)
-void cProtocol180::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
+void cProtocol_1_8_0::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -492,7 +486,7 @@ void cProtocol180::SendEntityRelMove(const cEntity & a_Entity, char a_RelX, char
-void cProtocol180::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
+void cProtocol_1_8_0::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -510,7 +504,7 @@ void cProtocol180::SendEntityRelMoveLook(const cEntity & a_Entity, char a_RelX,
-void cProtocol180::SendEntityStatus(const cEntity & a_Entity, char a_Status)
+void cProtocol_1_8_0::SendEntityStatus(const cEntity & a_Entity, char a_Status)
{
ASSERT(m_State == 3); // In game mode?
@@ -523,7 +517,7 @@ void cProtocol180::SendEntityStatus(const cEntity & a_Entity, char a_Status)
-void cProtocol180::SendEntityVelocity(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendEntityVelocity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -539,7 +533,7 @@ void cProtocol180::SendEntityVelocity(const cEntity & a_Entity)
-void cProtocol180::SendExplosion(double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion)
+void cProtocol_1_8_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?
@@ -564,7 +558,7 @@ void cProtocol180::SendExplosion(double a_BlockX, double a_BlockY, double a_Bloc
-void cProtocol180::SendGameMode(eGameMode a_GameMode)
+void cProtocol_1_8_0::SendGameMode(eGameMode a_GameMode)
{
ASSERT(m_State == 3); // In game mode?
@@ -577,7 +571,7 @@ void cProtocol180::SendGameMode(eGameMode a_GameMode)
-void cProtocol180::SendHealth(void)
+void cProtocol_1_8_0::SendHealth(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -592,7 +586,7 @@ void cProtocol180::SendHealth(void)
-void cProtocol180::SendHideTitle(void)
+void cProtocol_1_8_0::SendHideTitle(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -604,7 +598,7 @@ void cProtocol180::SendHideTitle(void)
-void cProtocol180::SendInventorySlot(char a_WindowID, short a_SlotNum, const cItem & a_Item)
+void cProtocol_1_8_0::SendInventorySlot(char a_WindowID, short a_SlotNum, const cItem & a_Item)
{
ASSERT(m_State == 3); // In game mode?
@@ -618,7 +612,7 @@ void cProtocol180::SendInventorySlot(char a_WindowID, short a_SlotNum, const cIt
-void cProtocol180::SendKeepAlive(UInt32 a_PingID)
+void cProtocol_1_8_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)
@@ -635,7 +629,7 @@ void cProtocol180::SendKeepAlive(UInt32 a_PingID)
-void cProtocol180::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
+void cProtocol_1_8_0::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
{
// Send the Join Game packet:
{
@@ -669,7 +663,7 @@ void cProtocol180::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
-void cProtocol180::SendLoginSuccess(void)
+void cProtocol_1_8_0::SendLoginSuccess(void)
{
ASSERT(m_State == 2); // State: login?
@@ -692,7 +686,7 @@ void cProtocol180::SendLoginSuccess(void)
-void cProtocol180::SendPaintingSpawn(const cPainting & a_Painting)
+void cProtocol_1_8_0::SendPaintingSpawn(const cPainting & a_Painting)
{
ASSERT(m_State == 3); // In game mode?
double PosX = a_Painting.GetPosX();
@@ -710,7 +704,7 @@ void cProtocol180::SendPaintingSpawn(const cPainting & a_Painting)
-void cProtocol180::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataStartY)
+void cProtocol_1_8_0::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataStartY)
{
ASSERT(m_State == 3); // In game mode?
@@ -741,7 +735,7 @@ void cProtocol180::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataS
-void cProtocol180::SendPickupSpawn(const cPickup & a_Pickup)
+void cProtocol_1_8_0::SendPickupSpawn(const cPickup & a_Pickup)
{
ASSERT(m_State == 3); // In game mode?
@@ -770,7 +764,7 @@ void cProtocol180::SendPickupSpawn(const cPickup & a_Pickup)
-void cProtocol180::SendPlayerAbilities(void)
+void cProtocol_1_8_0::SendPlayerAbilities(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -799,7 +793,7 @@ void cProtocol180::SendPlayerAbilities(void)
-void cProtocol180::SendEntityAnimation(const cEntity & a_Entity, char a_Animation)
+void cProtocol_1_8_0::SendEntityAnimation(const cEntity & a_Entity, char a_Animation)
{
ASSERT(m_State == 3); // In game mode?
@@ -812,7 +806,7 @@ void cProtocol180::SendEntityAnimation(const cEntity & a_Entity, char a_Animatio
-void cProtocol180::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_8_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);
@@ -834,7 +828,7 @@ void cProtocol180::SendParticleEffect(const AString & a_ParticleName, float a_Sr
-void cProtocol180::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_8_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);
@@ -878,7 +872,7 @@ void cProtocol180::SendParticleEffect(const AString & a_ParticleName, Vector3f a
-void cProtocol180::SendPlayerListAddPlayer(const cPlayer & a_Player)
+void cProtocol_1_8_0::SendPlayerListAddPlayer(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -915,7 +909,7 @@ void cProtocol180::SendPlayerListAddPlayer(const cPlayer & a_Player)
-void cProtocol180::SendPlayerListRemovePlayer(const cPlayer & a_Player)
+void cProtocol_1_8_0::SendPlayerListRemovePlayer(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -929,7 +923,7 @@ void cProtocol180::SendPlayerListRemovePlayer(const cPlayer & a_Player)
-void cProtocol180::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
+void cProtocol_1_8_0::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -944,7 +938,7 @@ void cProtocol180::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
-void cProtocol180::SendPlayerListUpdatePing(const cPlayer & a_Player)
+void cProtocol_1_8_0::SendPlayerListUpdatePing(const cPlayer & a_Player)
{
ASSERT(m_State == 3); // In game mode?
@@ -963,7 +957,7 @@ void cProtocol180::SendPlayerListUpdatePing(const cPlayer & a_Player)
-void cProtocol180::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName)
+void cProtocol_1_8_0::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName)
{
ASSERT(m_State == 3); // In game mode?
@@ -987,7 +981,7 @@ void cProtocol180::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, con
-void cProtocol180::SendPlayerMaxSpeed(void)
+void cProtocol_1_8_0::SendPlayerMaxSpeed(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1016,7 +1010,7 @@ void cProtocol180::SendPlayerMaxSpeed(void)
-void cProtocol180::SendPlayerMoveLook(void)
+void cProtocol_1_8_0::SendPlayerMoveLook(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1034,7 +1028,7 @@ void cProtocol180::SendPlayerMoveLook(void)
-void cProtocol180::SendPlayerPosition(void)
+void cProtocol_1_8_0::SendPlayerPosition(void)
{
// There is no dedicated packet for this, send the whole thing:
SendPlayerMoveLook();
@@ -1044,7 +1038,7 @@ void cProtocol180::SendPlayerPosition(void)
-void cProtocol180::SendPlayerSpawn(const cPlayer & a_Player)
+void cProtocol_1_8_0::SendPlayerSpawn(const cPlayer & a_Player)
{
// Called to spawn another player for the client
cPacketizer Pkt(*this, 0x0c); // Spawn Player packet
@@ -1068,7 +1062,7 @@ void cProtocol180::SendPlayerSpawn(const cPlayer & a_Player)
-void cProtocol180::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
+void cProtocol_1_8_0::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
{
ASSERT(m_State == 3); // In game mode?
@@ -1081,7 +1075,7 @@ void cProtocol180::SendPluginMessage(const AString & a_Channel, const AString &
-void cProtocol180::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
+void cProtocol_1_8_0::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
{
ASSERT(m_State == 3); // In game mode?
@@ -1094,7 +1088,7 @@ void cProtocol180::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect
-void cProtocol180::SendResetTitle(void)
+void cProtocol_1_8_0::SendResetTitle(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1106,7 +1100,7 @@ void cProtocol180::SendResetTitle(void)
-void cProtocol180::SendRespawn(eDimension a_Dimension)
+void cProtocol_1_8_0::SendRespawn(eDimension a_Dimension)
{
cPacketizer Pkt(*this, 0x07); // Respawn packet
@@ -1121,7 +1115,7 @@ void cProtocol180::SendRespawn(eDimension a_Dimension)
-void cProtocol180::SendExperience(void)
+void cProtocol_1_8_0::SendExperience(void)
{
ASSERT(m_State == 3); // In game mode?
@@ -1136,7 +1130,7 @@ void cProtocol180::SendExperience(void)
-void cProtocol180::SendExperienceOrb(const cExpOrb & a_ExpOrb)
+void cProtocol_1_8_0::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
ASSERT(m_State == 3); // In game mode?
@@ -1152,7 +1146,7 @@ void cProtocol180::SendExperienceOrb(const cExpOrb & a_ExpOrb)
-void cProtocol180::SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode)
+void cProtocol_1_8_0::SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode)
{
ASSERT(m_State == 3); // In game mode?
@@ -1170,7 +1164,7 @@ void cProtocol180::SendScoreboardObjective(const AString & a_Name, const AString
-void cProtocol180::SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode)
+void cProtocol_1_8_0::SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode)
{
ASSERT(m_State == 3); // In game mode?
@@ -1189,7 +1183,7 @@ void cProtocol180::SendScoreUpdate(const AString & a_Objective, const AString &
-void cProtocol180::SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display)
+void cProtocol_1_8_0::SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display)
{
ASSERT(m_State == 3); // In game mode?
@@ -1202,7 +1196,7 @@ void cProtocol180::SendDisplayObjective(const AString & a_Objective, cScoreboard
-void cProtocol180::SendSetSubTitle(const cCompositeChat & a_SubTitle)
+void cProtocol_1_8_0::SendSetSubTitle(const cCompositeChat & a_SubTitle)
{
SendSetRawSubTitle(a_SubTitle.CreateJsonString(false));
}
@@ -1211,7 +1205,7 @@ void cProtocol180::SendSetSubTitle(const cCompositeChat & a_SubTitle)
-void cProtocol180::SendSetRawSubTitle(const AString & a_SubTitle)
+void cProtocol_1_8_0::SendSetRawSubTitle(const AString & a_SubTitle)
{
ASSERT(m_State == 3); // In game mode?
@@ -1225,7 +1219,7 @@ void cProtocol180::SendSetRawSubTitle(const AString & a_SubTitle)
-void cProtocol180::SendSetTitle(const cCompositeChat & a_Title)
+void cProtocol_1_8_0::SendSetTitle(const cCompositeChat & a_Title)
{
SendSetRawTitle(a_Title.CreateJsonString(false));
}
@@ -1234,7 +1228,7 @@ void cProtocol180::SendSetTitle(const cCompositeChat & a_Title)
-void cProtocol180::SendSetRawTitle(const AString & a_Title)
+void cProtocol_1_8_0::SendSetRawTitle(const AString & a_Title)
{
ASSERT(m_State == 3); // In game mode?
@@ -1248,7 +1242,7 @@ void cProtocol180::SendSetRawTitle(const AString & a_Title)
-void cProtocol180::SendSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch)
+void cProtocol_1_8_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?
@@ -1265,7 +1259,7 @@ void cProtocol180::SendSoundEffect(const AString & a_SoundName, double a_X, doub
-void cProtocol180::SendSoundParticleEffect(const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data)
+void cProtocol_1_8_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?
@@ -1280,7 +1274,7 @@ void cProtocol180::SendSoundParticleEffect(const EffectID a_EffectID, int a_SrcX
-void cProtocol180::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
+void cProtocol_1_8_0::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
{
ASSERT(m_State == 3); // In game mode?
@@ -1302,7 +1296,7 @@ void cProtocol180::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
-void cProtocol180::SendSpawnMob(const cMonster & a_Mob)
+void cProtocol_1_8_0::SendSpawnMob(const cMonster & a_Mob)
{
ASSERT(m_State == 3); // In game mode?
@@ -1326,7 +1320,7 @@ void cProtocol180::SendSpawnMob(const cMonster & a_Mob)
-void cProtocol180::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch)
+void cProtocol_1_8_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();
@@ -1358,7 +1352,7 @@ void cProtocol180::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
-void cProtocol180::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
+void cProtocol_1_8_0::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
{
ASSERT(m_State == 3); // In game mode?
@@ -1383,7 +1377,7 @@ void cProtocol180::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
-void cProtocol180::SendStatistics(const cStatManager & a_Manager)
+void cProtocol_1_8_0::SendStatistics(const cStatManager & a_Manager)
{
ASSERT(m_State == 3); // In game mode?
@@ -1405,7 +1399,7 @@ void cProtocol180::SendStatistics(const cStatManager & a_Manager)
-void cProtocol180::SendTabCompletionResults(const AStringVector & a_Results)
+void cProtocol_1_8_0::SendTabCompletionResults(const AStringVector & a_Results)
{
ASSERT(m_State == 3); // In game mode?
@@ -1422,7 +1416,7 @@ void cProtocol180::SendTabCompletionResults(const AStringVector & a_Results)
-void cProtocol180::SendTeleportEntity(const cEntity & a_Entity)
+void cProtocol_1_8_0::SendTeleportEntity(const cEntity & a_Entity)
{
ASSERT(m_State == 3); // In game mode?
@@ -1440,7 +1434,7 @@ void cProtocol180::SendTeleportEntity(const cEntity & a_Entity)
-void cProtocol180::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_8_0::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1456,7 +1450,7 @@ void cProtocol180::SendThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ)
-void cProtocol180::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks)
+void cProtocol_1_8_0::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks)
{
ASSERT(m_State == 3); // In game mode?
@@ -1472,7 +1466,7 @@ void cProtocol180::SendTitleTimes(int a_FadeInTicks, int a_DisplayTicks, int a_F
-void cProtocol180::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle)
+void cProtocol_1_8_0::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle)
{
ASSERT(m_State == 3); // In game mode?
if (!a_DoDaylightCycle)
@@ -1490,7 +1484,7 @@ void cProtocol180::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_Do
-void cProtocol180::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
+void cProtocol_1_8_0::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1505,7 +1499,7 @@ void cProtocol180::SendUnloadChunk(int a_ChunkX, int a_ChunkZ)
-void cProtocol180::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
+void cProtocol_1_8_0::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
{
ASSERT(m_State == 3); // In game mode?
@@ -1531,7 +1525,7 @@ void cProtocol180::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
-void cProtocol180::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_8_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?
@@ -1552,7 +1546,7 @@ void cProtocol180::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, cons
-void cProtocol180::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_8_0::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_State == 3); // In game mode?
@@ -1565,7 +1559,7 @@ void cProtocol180::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_Bloc
-void cProtocol180::SendWeather(eWeather a_Weather)
+void cProtocol_1_8_0::SendWeather(eWeather a_Weather)
{
ASSERT(m_State == 3); // In game mode?
@@ -1582,7 +1576,7 @@ void cProtocol180::SendWeather(eWeather a_Weather)
-void cProtocol180::SendWholeInventory(const cWindow & a_Window)
+void cProtocol_1_8_0::SendWholeInventory(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1601,7 +1595,7 @@ void cProtocol180::SendWholeInventory(const cWindow & a_Window)
-void cProtocol180::SendWindowClose(const cWindow & a_Window)
+void cProtocol_1_8_0::SendWindowClose(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1613,7 +1607,7 @@ void cProtocol180::SendWindowClose(const cWindow & a_Window)
-void cProtocol180::SendWindowOpen(const cWindow & a_Window)
+void cProtocol_1_8_0::SendWindowOpen(const cWindow & a_Window)
{
ASSERT(m_State == 3); // In game mode?
@@ -1654,7 +1648,7 @@ void cProtocol180::SendWindowOpen(const cWindow & a_Window)
-void cProtocol180::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
+void cProtocol_1_8_0::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
{
ASSERT(m_State == 3); // In game mode?
@@ -1668,7 +1662,7 @@ void cProtocol180::SendWindowProperty(const cWindow & a_Window, short a_Property
-bool cProtocol180::CompressPacket(const AString & a_Packet, AString & a_CompressedData)
+bool cProtocol_1_8_0::CompressPacket(const AString & a_Packet, AString & a_CompressedData)
{
// Compress the data:
char CompressedData[MAX_COMPRESSED_PACKET_LEN];
@@ -1711,7 +1705,7 @@ bool cProtocol180::CompressPacket(const AString & a_Packet, AString & a_Compress
-int cProtocol180::GetParticleID(const AString & a_ParticleName)
+int cProtocol_1_8_0::GetParticleID(const AString & a_ParticleName)
{
static bool IsInitialized = false;
static std::map<AString, int> ParticleMap;
@@ -1777,7 +1771,7 @@ int cProtocol180::GetParticleID(const AString & a_ParticleName)
-void cProtocol180::FixItemFramePositions(int a_ObjectData, double & a_PosX, double & a_PosZ, double & a_Yaw)
+void cProtocol_1_8_0::FixItemFramePositions(int a_ObjectData, double & a_PosX, double & a_PosZ, double & a_Yaw)
{
switch (a_ObjectData)
{
@@ -1812,7 +1806,7 @@ void cProtocol180::FixItemFramePositions(int a_ObjectData, double & a_PosX, doub
-void cProtocol180::AddReceivedData(const char * a_Data, size_t a_Size)
+void cProtocol_1_8_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())
@@ -2007,7 +2001,7 @@ void cProtocol180::AddReceivedData(const char * a_Data, size_t a_Size)
-bool cProtocol180::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
+bool cProtocol_1_8_0::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
{
switch (m_State)
{
@@ -2094,7 +2088,7 @@ bool cProtocol180::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
-void cProtocol180::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt64, Int64, Timestamp);
@@ -2106,7 +2100,7 @@ void cProtocol180::HandlePacketStatusPing(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
{
cServer * Server = cRoot::Get()->GetServer();
AString ServerDescription = Server->GetDescription();
@@ -2151,7 +2145,7 @@ void cProtocol180::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer)
{
UInt32 EncKeyLength, EncNonceLength;
if (!a_ByteBuffer.ReadVarInt(EncKeyLength))
@@ -2214,7 +2208,7 @@ void cProtocol180::HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffe
-void cProtocol180::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
{
AString Username;
if (!a_ByteBuffer.ReadVarUTF8String(Username))
@@ -2251,7 +2245,7 @@ void cProtocol180::HandlePacketLoginStart(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
{
m_Client->HandleAnimation(0); // Packet exists solely for arm-swing notification
}
@@ -2260,7 +2254,7 @@ void cProtocol180::HandlePacketAnimation(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Status);
@@ -2278,7 +2272,7 @@ void cProtocol180::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
@@ -2301,7 +2295,7 @@ void cProtocol180::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Message);
m_Client->HandleChat(Message);
@@ -2311,7 +2305,7 @@ void cProtocol180::HandlePacketChatMessage(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Locale);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, ViewDistance);
@@ -2328,7 +2322,7 @@ void cProtocol180::HandlePacketClientSettings(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, ActionID);
switch (ActionID)
@@ -2360,7 +2354,7 @@ void cProtocol180::HandlePacketClientStatus(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
cItem Item;
@@ -2375,7 +2369,7 @@ void cProtocol180::HandlePacketCreativeInventoryAction(cByteBuffer & a_ByteBuffe
-void cProtocol180::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, PlayerID);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Action);
@@ -2395,7 +2389,7 @@ void cProtocol180::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, KeepAliveID);
m_Client->HandleKeepAlive(KeepAliveID);
@@ -2405,7 +2399,7 @@ void cProtocol180::HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBool, bool, IsOnGround);
// TODO: m_Client->HandlePlayerOnGround(IsOnGround);
@@ -2415,7 +2409,7 @@ void cProtocol180::HandlePacketPlayer(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Flags);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, FlyingSpeed);
@@ -2439,7 +2433,7 @@ void cProtocol180::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Yaw);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Pitch);
@@ -2451,7 +2445,7 @@ void cProtocol180::HandlePacketPlayerLook(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosX);
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosY);
@@ -2464,7 +2458,7 @@ void cProtocol180::HandlePacketPlayerPos(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosX);
HANDLE_READ(a_ByteBuffer, ReadBEDouble, double, PosY);
@@ -2479,7 +2473,7 @@ void cProtocol180::HandlePacketPlayerPosLook(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Channel);
@@ -2510,7 +2504,7 @@ void cProtocol180::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
m_Client->HandleSlotSelected(SlotNum);
@@ -2520,7 +2514,7 @@ void cProtocol180::HandlePacketSlotSelect(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketSpectate(cByteBuffer &a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketSpectate(cByteBuffer &a_ByteBuffer)
{
AString playerUUID;
if (!a_ByteBuffer.ReadUUID(playerUUID))
@@ -2535,7 +2529,7 @@ void cProtocol180::HandlePacketSpectate(cByteBuffer &a_ByteBuffer)
-void cProtocol180::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Sideways);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, Forward);
@@ -2559,7 +2553,7 @@ void cProtocol180::HandlePacketSteerVehicle(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Text);
HANDLE_READ(a_ByteBuffer, ReadBool, bool, HasPosition);
@@ -2576,7 +2570,7 @@ void cProtocol180::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
@@ -2603,7 +2597,7 @@ void cProtocol180::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, EntityID);
HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, Type);
@@ -2641,7 +2635,7 @@ void cProtocol180::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Enchantment);
@@ -2653,7 +2647,7 @@ void cProtocol180::HandlePacketEnchantItem(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
HANDLE_READ(a_ByteBuffer, ReadBEInt16, Int16, SlotNum);
@@ -2705,7 +2699,7 @@ void cProtocol180::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
+void cProtocol_1_8_0::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, WindowID);
m_Client->HandleWindowClose(WindowID);
@@ -2715,7 +2709,7 @@ void cProtocol180::HandlePacketWindowClose(cByteBuffer & a_ByteBuffer)
-void cProtocol180::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel)
+void cProtocol_1_8_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel)
{
if (a_Channel == "MC|AdvCdm")
{
@@ -2780,7 +2774,7 @@ void cProtocol180::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const
-void cProtocol180::SendData(const char * a_Data, size_t a_Size)
+void cProtocol_1_8_0::SendData(const char * a_Data, size_t a_Size)
{
if (m_IsEncrypted)
{
@@ -2804,7 +2798,7 @@ void cProtocol180::SendData(const char * a_Data, size_t a_Size)
-bool cProtocol180::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes)
+bool cProtocol_1_8_0::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes)
{
HANDLE_PACKET_READ(a_ByteBuffer, ReadBEInt16, Int16, ItemType);
if (ItemType == -1)
@@ -2839,7 +2833,7 @@ bool cProtocol180::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a
-void cProtocol180::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
+void cProtocol_1_8_0::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
{
// Parse into NBT:
cParsedNBT NBT(a_Metadata.data(), a_Metadata.size());
@@ -2914,7 +2908,7 @@ void cProtocol180::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
-void cProtocol180::StartEncryption(const Byte * a_Key)
+void cProtocol_1_8_0::StartEncryption(const Byte * a_Key)
{
m_Encryptor.Init(a_Key, a_Key);
m_Decryptor.Init(a_Key, a_Key);
@@ -2936,7 +2930,7 @@ void cProtocol180::StartEncryption(const Byte * a_Key)
-eBlockFace cProtocol180::FaceIntToBlockFace(Int8 a_BlockFace)
+eBlockFace cProtocol_1_8_0::FaceIntToBlockFace(Int8 a_BlockFace)
{
// Normalize the blockface values returned from the protocol
// Anything known gets mapped 1:1, everything else returns BLOCK_FACE_NONE
@@ -2957,9 +2951,9 @@ eBlockFace cProtocol180::FaceIntToBlockFace(Int8 a_BlockFace)
////////////////////////////////////////////////////////////////////////////////
-// cProtocol180::cPacketizer:
+// cProtocol_1_8_0::cPacketizer:
-void cProtocol180::SendPacket(cPacketizer & a_Pkt)
+void cProtocol_1_8_0::SendPacket(cPacketizer & a_Pkt)
{
UInt32 PacketLen = static_cast<UInt32>(m_OutPacketBuffer.GetUsedSpace());
AString PacketData, CompressedPacket;
@@ -2969,7 +2963,7 @@ void cProtocol180::SendPacket(cPacketizer & a_Pkt)
if ((m_State == 3) && (PacketLen >= 256))
{
// Compress the packet payload:
- if (!cProtocol180::CompressPacket(PacketData, CompressedPacket))
+ if (!cProtocol_1_8_0::CompressPacket(PacketData, CompressedPacket))
{
return;
}
@@ -3019,7 +3013,7 @@ void cProtocol180::SendPacket(cPacketizer & a_Pkt)
-void cProtocol180::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
+void cProtocol_1_8_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
@@ -3107,7 +3101,7 @@ void cProtocol180::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
-void cProtocol180::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_BlockEntity)
+void cProtocol_1_8_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_BlockEntity)
{
cFastNBTWriter Writer;
@@ -3211,7 +3205,7 @@ void cProtocol180::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity & a_
-void cProtocol180::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity)
+void cProtocol_1_8_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity)
{
// Common metadata:
Byte Flags = 0;
@@ -3341,7 +3335,7 @@ void cProtocol180::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_En
-void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
+void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
{
// Living Enitiy Metadata
if (a_Mob.HasCustomName())
@@ -3609,7 +3603,7 @@ void cProtocol180::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
-void cProtocol180::WriteEntityProperties(cPacketizer & a_Pkt, const cEntity & a_Entity)
+void cProtocol_1_8_0::WriteEntityProperties(cPacketizer & a_Pkt, const cEntity & a_Entity)
{
if (!a_Entity.IsMob())
{