summaryrefslogtreecommitdiffstats
path: root/src/Entities/ExpBottleEntity.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-09-23 09:12:28 +0200
committerarchshift <admin@archshift.com>2014-09-23 09:28:12 +0200
commit5f6bac20915fda0d0a92c805f6dfbf562bb4beee (patch)
tree12fa79c7fc950383970de908fb73919c51edb146 /src/Entities/ExpBottleEntity.cpp
parentMerge pull request #1447 from cedeel/patch-2 (diff)
downloadcuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar.gz
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar.bz2
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar.lz
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar.xz
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.tar.zst
cuberite-5f6bac20915fda0d0a92c805f6dfbf562bb4beee.zip
Diffstat (limited to '')
-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();
}