summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-19 20:56:29 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-19 20:56:29 +0200
commitcb90029f720d867ba6398569c1b1dac2ee76e205 (patch)
treed16ea187d087b1e91c5136d349b66aafad02d7d6 /src/World.cpp
parentFixed Code (2) (diff)
parentAPIDump: Added a ChunkStay article. (diff)
downloadcuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar.gz
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar.bz2
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar.lz
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar.xz
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.tar.zst
cuberite-cb90029f720d867ba6398569c1b1dac2ee76e205.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index c23e255f8..800bdde0e 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1691,6 +1691,11 @@ int cWorld::SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NI
int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward)
{
+ if (a_Reward < 1)
+ {
+ return -1;
+ }
+
cExpOrb * ExpOrb = new cExpOrb(a_X, a_Y, a_Z, a_Reward);
ExpOrb->Initialize(this);
return ExpOrb->GetUniqueID();