mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 03:06:55 +00:00
Use typed properties in src/entity package
[bc break]
This commit is contained in:
@ -52,20 +52,11 @@ class Arrow extends Projectile{
|
||||
private const TAG_PICKUP = "pickup"; //TAG_Byte
|
||||
public const TAG_CRIT = "crit"; //TAG_Byte
|
||||
|
||||
/** @var float */
|
||||
protected $damage = 2.0;
|
||||
|
||||
/** @var int */
|
||||
protected $pickupMode = self::PICKUP_ANY;
|
||||
|
||||
/** @var float */
|
||||
protected $punchKnockback = 0.0;
|
||||
|
||||
/** @var int */
|
||||
protected $collideTicks = 0;
|
||||
|
||||
/** @var bool */
|
||||
protected $critical = false;
|
||||
protected float $damage = 2.0;
|
||||
protected int $pickupMode = self::PICKUP_ANY;
|
||||
protected float $punchKnockback = 0.0;
|
||||
protected int $collideTicks = 0;
|
||||
protected bool $critical = false;
|
||||
|
||||
public function __construct(Location $location, ?Entity $shootingEntity, bool $critical, ?CompoundTag $nbt = null){
|
||||
parent::__construct($location, $shootingEntity, $nbt);
|
||||
|
@ -51,11 +51,8 @@ use const PHP_INT_MAX;
|
||||
|
||||
abstract class Projectile extends Entity{
|
||||
|
||||
/** @var float */
|
||||
protected $damage = 0.0;
|
||||
|
||||
/** @var Block|null */
|
||||
protected $blockHit;
|
||||
protected float $damage = 0.0;
|
||||
protected ?Block $blockHit = null;
|
||||
|
||||
public function __construct(Location $location, ?Entity $shootingEntity, ?CompoundTag $nbt = null){
|
||||
parent::__construct($location, $nbt);
|
||||
|
@ -52,8 +52,7 @@ class SplashPotion extends Throwable{
|
||||
|
||||
public static function getNetworkTypeId() : string{ return EntityIds::SPLASH_POTION; }
|
||||
|
||||
/** @var bool */
|
||||
protected $linger = false;
|
||||
protected bool $linger = false;
|
||||
protected PotionType $potionType;
|
||||
|
||||
public function __construct(Location $location, ?Entity $shootingEntity, PotionType $potionType, ?CompoundTag $nbt = null){
|
||||
|
Reference in New Issue
Block a user