summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorchangyong guo <guo1487@163.com>2018-07-23 11:24:00 +0200
committerpeterbell10 <peterbell10@live.co.uk>2018-07-23 11:24:00 +0200
commit01e72ddb6567531b16f92af2564b853878b6ef65 (patch)
treeb91403cec84e0b405448d8fadbc2c39f2270ab47 /src/Entities/Entity.h
parentKeep players in gmNotSet (#4248) (diff)
downloadcuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.gz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.bz2
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.lz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.xz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.zst
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 7ac12c95b..ae150b4e2 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -333,6 +333,10 @@ public:
/** Returns the hitpoints that the currently equipped armor's enchantments would cover */
virtual int GetEnchantmentCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_Damage);
+ /** Returns explosion knock back reduction percent from blast protection level
+ @return knock back reduce percent */
+ virtual float GetEnchantmentBlastKnockbackReduction();
+
/** Returns the knockback amount that the currently equipped items would cause to a_Receiver on a hit */
virtual double GetKnockbackAmountAgainst(const cEntity & a_Receiver);
@@ -545,6 +549,12 @@ public:
/** Returs whether the entity has any mob leashed to */
bool HasAnyMobLeashed() const { return m_LeashedMobs.size() > 0; }
+ /** a lightweight calculation approach to get explosion exposure rate
+ @param a_ExplosionPosition explosion position
+ @param a_ExlosionPower explosion power
+ @return exposure rate */
+ virtual float GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower);
+
protected:
/** Structure storing the portal delay timer and cooldown boolean */
struct sPortalCooldownData
@@ -714,5 +724,4 @@ private:
/** List of leashed mobs to this entity */
cMonsterList m_LeashedMobs;
-
} ; // tolua_export