Entity: remove fallDistance parameter from fall()

This commit is contained in:
Dylan K. Taylor
2021-09-05 13:34:43 +01:00
parent 7e82cafdeb
commit 6ecad153ea
3 changed files with 6 additions and 6 deletions

View File

@ -305,8 +305,8 @@ abstract class Living extends Entity{
}
}
public function fall(float $fallDistance) : void{
$damage = ceil($fallDistance - 3 - (($jumpBoost = $this->effectManager->get(VanillaEffects::JUMP_BOOST())) !== null ? $jumpBoost->getEffectLevel() : 0));
public function fall() : void{
$damage = ceil($this->fallDistance - 3 - (($jumpBoost = $this->effectManager->get(VanillaEffects::JUMP_BOOST())) !== null ? $jumpBoost->getEffectLevel() : 0));
if($damage > 0){
$ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_FALL, $damage);
$this->attack($ev);