From bddd7e0eee3bf6a74879181f8158509217fcd71b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 26 Oct 2017 23:20:36 +0100 Subject: [PATCH] Fixed no fall damage when falling 3-4 blocks, close #891 --- src/pocketmine/entity/Living.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index 57be1c19c..f58b82ca5 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -321,7 +321,7 @@ abstract class Living extends Entity implements Damageable{ } public function fall(float $fallDistance){ - $damage = floor($fallDistance - 3 - ($this->hasEffect(Effect::JUMP) ? $this->getEffect(Effect::JUMP)->getEffectLevel() : 0)); + $damage = ceil($fallDistance - 3 - ($this->hasEffect(Effect::JUMP) ? $this->getEffect(Effect::JUMP)->getEffectLevel() : 0)); if($damage > 0){ $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_FALL, $damage); $this->attack($ev);