diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-18 20:06:11 +0100 |
---|---|---|
committer | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-18 20:06:11 +0100 |
commit | e627f2f98cb9a2ec7cddcaac779350abcbae414a (patch) | |
tree | 6101aa8aa5a0152c278e129a26ba7ca26172597c /src/Protocol/Protocol125.cpp | |
parent | added zlib (diff) | |
parent | Merge pull request #440 from mc-server/repeaterfixes (diff) | |
download | cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.gz cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.bz2 cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.lz cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.xz cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.zst cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.zip |
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 9334e6f2d..48f23801c 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -73,7 +73,9 @@ enum PACKET_ENT_STATUS = 0x26, PACKET_ATTACH_ENTITY = 0x27, PACKET_METADATA = 0x28, + PACKET_ENTITY_EFFECT = 0x29, PACKET_SPAWN_EXPERIENCE_ORB = 0x1A, + PACKET_REMOVE_ENTITY_EFFECT = 0x2a, PACKET_EXPERIENCE = 0x2b, PACKET_PRE_CHUNK = 0x32, PACKET_MAP_CHUNK = 0x33, @@ -300,6 +302,21 @@ void cProtocol125::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ) +void cProtocol125::SendEntityEffect(const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) +{ + cCSLock Lock(m_CSPacket); + WriteByte (PACKET_ENTITY_EFFECT); + WriteInt (a_Entity.GetUniqueID()); + WriteByte (a_EffectID); + WriteByte (a_Amplifier); + WriteShort(a_Duration); + Flush(); +} + + + + + void cProtocol125::SendEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) { cCSLock Lock(m_CSPacket); @@ -678,6 +695,19 @@ void cProtocol125::SendPlayerSpawn(const cPlayer & a_Player) +void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID) +{ + cCSLock Lock(m_CSPacket); + WriteByte (PACKET_REMOVE_ENTITY_EFFECT); + WriteInt (a_Entity.GetUniqueID()); + WriteByte (a_EffectID); + Flush(); +} + + + + + void cProtocol125::SendRespawn(void) { cCSLock Lock(m_CSPacket); |