diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-29 23:02:39 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-29 23:02:39 +0200 |
commit | f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5 (patch) | |
tree | c57d967bab26888ae83692ab09cbbc7fabbae6f5 /source/Protocol125.h | |
parent | Added a check if torch is placed on the bottom face, temporarily fix the assert. (diff) | |
download | cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar.gz cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar.bz2 cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar.lz cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar.xz cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.tar.zst cuberite-f1d62b77cd1f9eb31cf508ee5eb54e09b9ca10e5.zip |
Diffstat (limited to 'source/Protocol125.h')
-rw-r--r-- | source/Protocol125.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/source/Protocol125.h b/source/Protocol125.h index de1be4fd7..c1b10bd52 100644 --- a/source/Protocol125.h +++ b/source/Protocol125.h @@ -16,13 +16,6 @@ -// fwd:
-class cPacket;
-
-
-
-
-
class cProtocol125 :
public cProtocol
{
@@ -46,6 +39,8 @@ public: virtual void SendEntLook (const cEntity & a_Entity) override;
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
+ virtual void SendEntRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
+ virtual void SendEntRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
virtual void SendGameMode (eGameMode a_GameMode) override;
virtual void SendHandshake (const AString & a_ConnectionHash) override;
virtual void SendHealth (void) override;
@@ -60,8 +55,6 @@ public: virtual void SendPlayerMoveLook (void) override;
virtual void SendPlayerPosition (void) override;
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
- virtual void SendRelEntMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
- virtual void SendRelEntMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
virtual void SendRespawn (void) override;
virtual void SendSpawnMob (const cMonster & a_Mob) override;
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
@@ -78,10 +71,10 @@ public: protected:
/// Results of packet-parsing:
enum {
- PACKET_OK = 1,
- PACKET_ERROR = -1,
- PACKET_UNKNOWN = -2,
- PACKET_INCOMPLETE = -3,
+ PARSE_OK = 1,
+ PARSE_ERROR = -1,
+ PARSE_UNKNOWN = -2,
+ PARSE_INCOMPLETE = -3,
} ;
cByteBuffer m_ReceivedData; //< Buffer for the received data
@@ -99,17 +92,17 @@ protected: virtual int ParseCreativeInventoryAction(void);
virtual int ParseDisconnect (void);
virtual int ParseEntityAction (void);
- virtual int ParseFlying (void);
virtual int ParseHandshake (void);
- virtual int ParseSlotSelected (void);
virtual int ParseKeepAlive (void);
virtual int ParseLogin (void);
virtual int ParsePing (void);
virtual int ParsePlayerAbilities (void);
virtual int ParsePlayerLook (void);
virtual int ParsePlayerMoveLook (void);
+ virtual int ParsePlayerOnGround (void);
virtual int ParsePlayerPosition (void);
virtual int ParseRespawn (void);
+ virtual int ParseSlotSelected (void);
virtual int ParseUpdateSign (void);
virtual int ParseUseEntity (void);
virtual int ParseWindowClick (void);
@@ -125,6 +118,9 @@ protected: /// Writes one item, "slot" as the protocol wiki calls it
virtual void WriteItem(const cItem & a_Item);
+ /// Parses one item, "slot" as the protocol wiki calls it, from m_ReceivedData; returns the usual ParsePacket() codes
+ virtual int ParseItem(cItem & a_Item);
+
/// Returns the entity metadata representation
AString GetEntityMetaData(const cEntity & a_Entity);
|