Modernize property declarations in src/world/sound

This commit is contained in:
Dylan K. Taylor
2022-04-28 14:57:01 +01:00
parent cb76c149e1
commit 2f03af51dd
15 changed files with 25 additions and 109 deletions

View File

@ -34,16 +34,10 @@ use pocketmine\network\mcpe\protocol\types\LevelSoundEvent;
* Played when an entity hits the ground after falling a distance that doesn't cause damage, e.g. due to jumping.
*/
class EntityLandSound implements Sound{
/** @var Entity */
private $entity;
/** @var Block */
private $blockLandedOn;
public function __construct(Entity $entity, Block $blockLandedOn){
$this->entity = $entity;
$this->blockLandedOn = $blockLandedOn;
}
public function __construct(
private Entity $entity,
private Block $blockLandedOn
){}
public function encode(Vector3 $pos) : array{
return [LevelSoundEventPacket::create(