summaryrefslogtreecommitdiffstats
path: root/src/World.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/World.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/World.cpp')
-rw-r--r--src/World.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 96b08a8ec..fb8ee0cb3 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -13,6 +13,7 @@
#include "OSSupport/Timer.h"
// Entities (except mobs):
+#include "Entities/ExpOrb.h"
#include "Entities/Pickup.h"
#include "Entities/Player.h"
#include "Entities/TNTEntity.h"
@@ -1561,6 +1562,17 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
+int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward)
+{
+ cExpOrb * ExpOrb = new cExpOrb(a_X, a_Y, a_Z, a_Reward);
+ ExpOrb->Initialize(this);
+ return ExpOrb->GetUniqueID();
+}
+
+
+
+
+
void cWorld::SpawnPrimedTNT(double a_X, double a_Y, double a_Z, double a_FuseTimeInSec, double a_InitialVelocityCoeff)
{
cTNTEntity * TNT = new cTNTEntity(a_X, a_Y, a_Z, a_FuseTimeInSec);