mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Entity: Rename fall() to onHitGround(), and make it protected
this had no business being exposed to public API in the first place.
This commit is contained in:
@ -305,7 +305,7 @@ abstract class Living extends Entity{
|
||||
}
|
||||
}
|
||||
|
||||
public function fall() : void{
|
||||
protected function onHitGround() : 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);
|
||||
|
Reference in New Issue
Block a user