mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
parent
871bd169a8
commit
59a04c971f
@ -803,6 +803,15 @@ abstract class Entity{
|
|||||||
$this->server->broadcastPackets($this->hasSpawned, [SetActorMotionPacket::create($this->id, $this->getMotion())]);
|
$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{
|
public function hasGravity() : bool{
|
||||||
return $this->gravityEnabled;
|
return $this->gravityEnabled;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user