get Damage From Explosion
fun LivingEntity.getDamageFromExplosion(pos: Vec3, power: Float = 6.0f, explosionRange: Float = power * 2f, damageDistance: Float = explosionRange * explosionRange, exclude: Collection<BlockPos>? = null, include: BlockPos? = null, maxBlastResistance: Float? = null, entityBoundingBox: AABB? = null, damageSource: DamageSource? = null): Float
Mirrors the vanilla entity damage formula for explosions.
Pass damageSource when the original explosion type is known so shield checks and source-sensitive tags stay aligned with vanilla.
See also
Explosion Damage Calculator
#getEntityDamageAmount
Server Explosion
#getSeenPercent