diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-21 09:46:28 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-21 09:46:28 +0200 |
commit | 3f9e876d70851ed0333a3fdc57d883f040e92d8b (patch) | |
tree | 789155746561aed3b04818ed4221f40fa42e77fd /source/Protocol/Protocol132.cpp | |
parent | Double chests are now working, and with sound. (FS #69) (diff) | |
download | cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.gz cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.bz2 cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.lz cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.xz cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.zst cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Protocol/Protocol132.cpp | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index 2e5803273..9c0047c16 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -52,19 +52,20 @@ const int MAX_ENC_LEN = 512; // Maximum size of the encrypted message; should b enum
{
- PACKET_KEEP_ALIVE = 0x00,
- PACKET_LOGIN = 0x01,
- PACKET_ENTITY_EQUIPMENT = 0x05,
- PACKET_COMPASS = 0x06,
- PACKET_PLAYER_SPAWN = 0x14,
- PACKET_COLLECT_PICKUP = 0x16,
- PACKET_SPAWN_MOB = 0x18,
- PACKET_DESTROY_ENTITIES = 0x1d,
- PACKET_CHUNK_DATA = 0x33,
- PACKET_BLOCK_CHANGE = 0x35,
- PACKET_BLOCK_ACTION = 0x36,
- PACKET_BLOCK_BREAK_ANIM = 0x37,
- PACKET_SOUND_EFFECT = 0x3e
+ PACKET_KEEP_ALIVE = 0x00,
+ PACKET_LOGIN = 0x01,
+ PACKET_ENTITY_EQUIPMENT = 0x05,
+ PACKET_COMPASS = 0x06,
+ PACKET_PLAYER_SPAWN = 0x14,
+ PACKET_COLLECT_PICKUP = 0x16,
+ PACKET_SPAWN_MOB = 0x18,
+ PACKET_DESTROY_ENTITIES = 0x1d,
+ PACKET_CHUNK_DATA = 0x33,
+ PACKET_BLOCK_CHANGE = 0x35,
+ PACKET_BLOCK_ACTION = 0x36,
+ PACKET_BLOCK_BREAK_ANIM = 0x37,
+ PACKET_SOUND_EFFECT = 0x3e,
+ PACKET_SOUND_PARTICLE_EFFECT = 0x3d
} ;
@@ -378,6 +379,22 @@ void cProtocol132::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int +void cProtocol132::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data)
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte(PACKET_SOUND_PARTICLE_EFFECT);
+ WriteInt (a_EffectID);
+ WriteInt (a_SrcX / 8);
+ WriteByte(a_SrcY / 8);
+ WriteInt (a_SrcZ / 8);
+ WriteInt (a_Data);
+ Flush();
+}
+
+
+
+
+
void cProtocol132::SendBlockBreakAnim(int a_entityID, int a_BlockX, int a_BlockY, int a_BlockZ, char stage)
{
cCSLock Lock(m_CSPacket);
|