Skip to content

Commit 064b18f

Browse files
committed
Added falldamage ktdoc
1 parent 2f3ae68 commit 064b18f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

common/src/main/kotlin/com/lambda/util/combat/DamageUtils.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ object DamageUtils {
9191
return source.scale(world, player, player.fallDamage(distance, multiplier))
9292
}
9393

94+
/**
95+
* Calculates the fall damage for the given entity
96+
*
97+
* @param distance The fall distance
98+
* @param multiplier The fall damage multiplier
99+
* @return The calculated fall damage
100+
*/
94101
fun LivingEntity.fallDamage(distance: Double, multiplier: Double): Double {
95102
if (type.isIn(FALL_DAMAGE_IMMUNE)) return 0.0
96103

0 commit comments

Comments
 (0)