Sound::encode() position is no longer nullable

making this nullable was based on the invalid assumption that global sounds have no position, but it turns out they _do_ still use the position to make the sound come from the correct direction.
This commit is contained in:
Dylan K. Taylor
2021-10-23 02:01:26 +01:00
parent e50072dc27
commit 701a71a4ee
54 changed files with 54 additions and 54 deletions

View File

@ -44,7 +44,7 @@ class EntityLandSound implements Sound{
$this->blockLandedOn = $blockLandedOn;
}
public function encode(?Vector3 $pos) : array{
public function encode(Vector3 $pos) : array{
return [LevelSoundEventPacket::create(
LevelSoundEventPacket::SOUND_LAND,
$pos,