Sound::encode() now always returns an array

This commit is contained in:
Dylan K. Taylor
2020-10-31 15:48:46 +00:00
parent 0cbc5c9a4a
commit 5a320f22b7
49 changed files with 102 additions and 105 deletions

View File

@ -44,13 +44,13 @@ class EntityLandSound implements Sound{
$this->blockLandedOn = $blockLandedOn;
}
public function encode(?Vector3 $pos){
return LevelSoundEventPacket::create(
public function encode(?Vector3 $pos) : array{
return [LevelSoundEventPacket::create(
LevelSoundEventPacket::SOUND_LAND,
$pos,
RuntimeBlockMapping::getInstance()->toRuntimeId($this->blockLandedOn->getFullId()),
$this->entity::getNetworkTypeId()
//TODO: does isBaby have any relevance here?
);
)];
}
}