diff options
author | Mattes D <github@xoft.cz> | 2013-11-26 10:48:46 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-11-26 10:48:46 +0100 |
commit | 6041fa1e62cc490c4595e6cd267eb96ac5b6e041 (patch) | |
tree | 00e3c895d8e0143275ba6d1a9a1ff0361714b53e /source/Protocol/Protocol17x.cpp | |
parent | Fixed cFile compilation on Linux. (diff) | |
parent | Added ExpOrb.cpp and ExpOrb.h to MCServer.vcproj. (diff) | |
download | cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar.gz cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar.bz2 cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar.lz cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar.xz cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.tar.zst cuberite-6041fa1e62cc490c4595e6cd267eb96ac5b6e041.zip |
Diffstat (limited to 'source/Protocol/Protocol17x.cpp')
-rw-r--r-- | source/Protocol/Protocol17x.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp index ae1df7395..746e1c127 100644 --- a/source/Protocol/Protocol17x.cpp +++ b/source/Protocol/Protocol17x.cpp @@ -17,6 +17,7 @@ Implements the 1.7.x protocol classes: #include "../World.h" #include "../WorldStorage/FastNBT.h" #include "../StringCompression.h" +#include "../Entities/ExpOrb.h" #include "../Entities/Minecart.h" #include "../Entities/FallingBlock.h" #include "../Entities/Pickup.h" @@ -609,6 +610,20 @@ void cProtocol172::SendExperience (void) +void cProtocol172::SendExperienceOrb(const cExpOrb & a_ExpOrb) +{ + cPacketizer Pkt(*this, 0x11); + Pkt.WriteVarInt(a_ExpOrb.GetUniqueID()); + Pkt.WriteInt((int) a_ExpOrb.GetPosX()); + Pkt.WriteInt((int) a_ExpOrb.GetPosY()); + Pkt.WriteInt((int) a_ExpOrb.GetPosZ()); + Pkt.WriteShort(a_ExpOrb.GetReward()); +} + + + + + void cProtocol172::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) // a_Src coords are Block * 8 { cPacketizer Pkt(*this, 0x29); // Sound Effect packet |