summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-11-26 18:21:06 +0100
committerAlexander Harkness <bearbin@gmail.com>2013-11-26 18:21:06 +0100
commit0de95a215f960c51bd7180218c1acef2414ce7d0 (patch)
tree80c80002565be1dc2fa537416ca7e6a1fd3e9da0 /src/Protocol/Protocol17x.cpp
parentMerge branch 'master' into foldermove2 (diff)
parentcWorld::SpawnExperienceOrb() now returns the entity ID of the spawned orb. (diff)
downloadcuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.gz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.bz2
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.lz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.xz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.zst
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index ae1df7395..746e1c127 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/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