diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 1c9d73a7d..6f8ef0316 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1451,8 +1451,14 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ $this->fall($this->fallDistance); $this->resetFallDistance(); } - }elseif($distanceThisTick < 0){ + }elseif($distanceThisTick < $this->fallDistance){ + //we've fallen some distance (distanceThisTick is negative) + //or we ascended back towards where fall distance was measured from initially (distanceThisTick is positive but less than existing fallDistance) $this->fallDistance -= $distanceThisTick; + }else{ + //we ascended past the apex where fall distance was originally being measured from + //reset it so it will be measured starting from the new, higher position + $this->fallDistance = 0; } }