mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Living: added calculateFallDamage()
to clean up the way that fall damage is handled for flying players; also, onHitGround() isn't only doing fall damage things these days.
This commit is contained in:
@@ -1200,10 +1200,8 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->sendPosition($from, $from->yaw, $from->pitch, MovePlayerPacket::MODE_RESET);
|
||||
}
|
||||
|
||||
protected function onHitGround() : void{
|
||||
if(!$this->flying){
|
||||
parent::onHitGround();
|
||||
}
|
||||
protected function calculateFallDamage(float $fallDistance) : float{
|
||||
return $this->flying ? 0 : parent::calculateFallDamage($fallDistance);
|
||||
}
|
||||
|
||||
public function jump() : void{
|
||||
|
Reference in New Issue
Block a user