mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
parent
871bd169a8
commit
59a04c971f
@ -803,6 +803,15 @@ abstract class Entity{
|
||||
$this->server->broadcastPackets($this->hasSpawned, [SetActorMotionPacket::create($this->id, $this->getMotion())]);
|
||||
}
|
||||
|
||||
public function getGravity() : float{
|
||||
return $this->gravity;
|
||||
}
|
||||
|
||||
public function setGravity(float $gravity) : void{
|
||||
Utils::checkFloatNotInfOrNaN("gravity", $gravity);
|
||||
$this->gravity = $gravity;
|
||||
}
|
||||
|
||||
public function hasGravity() : bool{
|
||||
return $this->gravityEnabled;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user