summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol.h
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-02 18:46:57 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-02 18:46:57 +0200
commitaebfbfb8c8d623ded8d409d29983a5e871a475bc (patch)
tree7c2d46d7c4dceb1aa11bdd905739a54f3846a167 /src/Protocol/Protocol.h
parentRevert "Replace ItemCallbacks with lambdas (#3948)" (diff)
downloadcuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar.gz
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar.bz2
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar.lz
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar.xz
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.tar.zst
cuberite-aebfbfb8c8d623ded8d409d29983a5e871a475bc.zip
Diffstat (limited to 'src/Protocol/Protocol.h')
-rw-r--r--src/Protocol/Protocol.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h
index 54c5b7223..9c4ee5e71 100644
--- a/src/Protocol/Protocol.h
+++ b/src/Protocol/Protocol.h
@@ -56,9 +56,84 @@ public:
virtual ~cProtocol() {}
+ /** A list of all outgoing packets */
+ enum eOutgoingPackets
+ {
+ sendAttachEntity = 0,
+ sendBlockAction,
+ sendBlockBreakAnim,
+ sendBlockChange,
+ sendBlockChanges,
+ sendCameraSetTo,
+ sendChatRaw,
+ sendCollectEntity,
+ sendDestroyEntity,
+ sendDifficulty,
+ sendDisconnectDuringLogin,
+ sendDisconnectDuringGame,
+ sendDisplayObjective,
+ sendEditSign,
+ sendEntityAnimation,
+ sendEntityEffect,
+ sendEntityEquipment,
+ sendEntityHeadLook,
+ sendEntityLook,
+ sendEntityMeta,
+ sendEntityProperties,
+ sendEntityRelMove,
+ sendEntityRelMoveLook,
+ sendEntityStatus,
+ sendEntityVelocity,
+ sendExperience,
+ sendExperienceOrb,
+ sendExplosion,
+ sendGameMode,
+ sendHealth,
+ sendInventorySlot,
+ sendJoinGame,
+ sendKeepAlive,
+ sendLeashEntity,
+ sendMapData,
+ sendPaintingSpawn,
+ sendParticleEffect,
+ sendPlayerAbilities,
+ sendPlayerList,
+ sendPlayerMaxSpeed,
+ sendPlayerMoveLook,
+ sendPlayerSpawn,
+ sendPluginMessage,
+ sendRemoveEntityEffect,
+ sendRespawn,
+ sendScoreboardObjective,
+ sendScoreUpdate,
+ sendSpawnObject,
+ sendSoundEffect,
+ sendSoundParticleEffect,
+ sendSpawnGlobalEntity,
+ sendSpawnMob,
+ sendSpawnPosition,
+ sendStatistics,
+ sendTabCompletion,
+ sendTeleportEntity,
+ sendTimeUpdate,
+ sendTitle,
+ sendUnloadChunk,
+ sendUpdateBlockEntity,
+ sendUpdateSign,
+ sendUseBed,
+ sendWeather,
+ sendWindowItems,
+ sendWindowClose,
+ sendWindowOpen,
+ sendWindowProperty
+ };
+
/** Called when client sends some data */
virtual void DataReceived(const char * a_Data, size_t a_Size) = 0;
+ /** Returns the protocol-specific packet ID given the protocol-agnostic packet enum (see PacketID.cpp for implementations) */
+ virtual UInt32 GetPacketId(eOutgoingPackets a_Packet) = 0;
+
// Sending stuff to clients (alphabetically sorted):
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity & a_Vehicle) = 0;
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) = 0;