summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-14 18:03:00 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-14 18:03:00 +0100
commit37069288d5801acce0ad34878a78aa0daf004135 (patch)
tree592aa27e4f5e685c4ccf37ab90ebb62f428cb970 /src/Protocol/Protocol125.cpp
parentMerge pull request #429 from worktycho/quickfixs (diff)
downloadcuberite-37069288d5801acce0ad34878a78aa0daf004135.tar
cuberite-37069288d5801acce0ad34878a78aa0daf004135.tar.gz
cuberite-37069288d5801acce0ad34878a78aa0daf004135.tar.bz2
cuberite-37069288d5801acce0ad34878a78aa0daf004135.tar.lz
cuberite-37069288d5801acce0ad34878a78aa0daf004135.tar.xz
cuberite-37069288d5801acce0ad34878a78aa0daf004135.tar.zst
cuberite-37069288d5801acce0ad34878a78aa0daf004135.zip
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r--src/Protocol/Protocol125.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp
index 9334e6f2d..d4c1f0dd5 100644
--- a/src/Protocol/Protocol125.cpp
+++ b/src/Protocol/Protocol125.cpp
@@ -43,6 +43,8 @@ enum
PACKET_HANDSHAKE = 0x02,
PACKET_CHAT = 0x03,
PACKET_UPDATE_TIME = 0x04,
+ PACKET_ENTITY_EFFECT = 0x1D,
+ PACKET_REMOVE_ENTITY_EFFECT = 0x1E,
PACKET_ENTITY_EQUIPMENT = 0x05,
PACKET_USE_ENTITY = 0x07,
PACKET_UPDATE_HEALTH = 0x08,
@@ -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);