bukkit Falling Entity Falling Distance


Entity falling distance is the distance the entity have fallen without reaching a block.

It can be used to calculate different damage from falling, or activating an effect after a big fall.

Retrieving the falling distance

float distanceFell = entity.getFallingDistance();

Setting the falling distance

This can be used to simulate a different falling distance than the real one. Bukkit will calculate the damage using the new falling distance.

entity.setFallingDistance(float distance);