mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +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:
@ -31,7 +31,7 @@ use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
*/
|
||||
class EntityAttackNoDamageSound implements Sound{
|
||||
|
||||
public function encode(?Vector3 $pos) : array{
|
||||
public function encode(Vector3 $pos) : array{
|
||||
return [LevelSoundEventPacket::create(
|
||||
LevelSoundEventPacket::SOUND_ATTACK_NODAMAGE,
|
||||
$pos,
|
||||
|
Reference in New Issue
Block a user