mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
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:
@ -36,7 +36,7 @@ class RecordSound implements Sound{
|
||||
$this->recordType = $recordType;
|
||||
}
|
||||
|
||||
public function encode(?Vector3 $pos) : array{
|
||||
public function encode(Vector3 $pos) : array{
|
||||
return [LevelSoundEventPacket::nonActorSound($this->recordType->getSoundId(), $pos, false)];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user