Modernize property declarations in src/world/particle

This commit is contained in:
Dylan K. Taylor
2022-04-28 14:55:53 +01:00
parent 6d7bf1c5d8
commit cb76c149e1
15 changed files with 24 additions and 100 deletions

View File

@ -29,12 +29,7 @@ use pocketmine\network\mcpe\protocol\LevelEventPacket;
use pocketmine\network\mcpe\protocol\types\ParticleIds;
class ItemBreakParticle implements Particle{
/** @var Item */
private $item;
public function __construct(Item $item){
$this->item = $item;
}
public function __construct(private Item $item){}
public function encode(Vector3 $pos) : array{
return [LevelEventPacket::standardParticle(ParticleIds::ITEM_BREAK, ($this->item->getId() << 16) | $this->item->getMeta(), $pos)];