mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Entity: Require declaration of gravity and drag via abstract methods
this guarantees that subclasses will actually declare them. [bc break]
This commit is contained in:
@ -41,9 +41,6 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
|
||||
public static function getNetworkTypeId() : string{ return EntityIds::TNT; }
|
||||
|
||||
protected $gravity = 0.04;
|
||||
protected $drag = 0.02;
|
||||
|
||||
/** @var int */
|
||||
protected $fuse;
|
||||
|
||||
@ -53,6 +50,10 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
|
||||
protected function getInitialSizeInfo() : EntitySizeInfo{ return new EntitySizeInfo(0.98, 0.98); }
|
||||
|
||||
protected function getInitialDragMultiplier() : float{ return 0.02; }
|
||||
|
||||
protected function getInitialGravity() : float{ return 0.04; }
|
||||
|
||||
public function getFuse() : int{
|
||||
return $this->fuse;
|
||||
}
|
||||
|
Reference in New Issue
Block a user