summaryrefslogtreecommitdiffstats
path: root/src/Entities/ExpBottleEntity.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-25 16:22:08 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-25 16:22:08 +0200
commit9c459cbe50dd7c7c327d712369b523dd018575bf (patch)
tree9dea40b71ffdca0dccf31fa1f005e279d822fa46 /src/Entities/ExpBottleEntity.cpp
parentFix accedental c++11 (diff)
parentMerge pull request #1449 from mc-server/WorldLoader (diff)
downloadcuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.gz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.bz2
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.lz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.xz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.zst
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.zip
Diffstat (limited to 'src/Entities/ExpBottleEntity.cpp')
-rw-r--r--src/Entities/ExpBottleEntity.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Entities/ExpBottleEntity.cpp b/src/Entities/ExpBottleEntity.cpp
index 202dde942..ee142a5a2 100644
--- a/src/Entities/ExpBottleEntity.cpp
+++ b/src/Entities/ExpBottleEntity.cpp
@@ -19,9 +19,26 @@ cExpBottleEntity::cExpBottleEntity(cEntity * a_Creator, double a_X, double a_Y,
void cExpBottleEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
{
+ Break(a_HitPos);
+}
+
+
+
+
+
+void cExpBottleEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
+{
+ Break(a_HitPos);
+}
+
+
+
+
+
+void cExpBottleEntity::Break(const Vector3d &a_HitPos)
+{
// Spawn an experience orb with a reward between 3 and 11.
m_World->BroadcastSoundParticleEffect(2002, POSX_TOINT, POSY_TOINT, POSZ_TOINT, 0);
m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), 3 + m_World->GetTickRandomNumber(8));
-
Destroy();
}