mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
fix extradata defaults for broadcastLevelSoundEvent
fixes TNT sounds not working, amongst other things
This commit is contained in:
parent
231e491bb9
commit
ec4c61e113
@ -506,7 +506,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
* @param bool $isBabyMob
|
* @param bool $isBabyMob
|
||||||
* @param bool $disableRelativeVolume If true, all players receiving this sound-event will hear the sound at full volume regardless of distance
|
* @param bool $disableRelativeVolume If true, all players receiving this sound-event will hear the sound at full volume regardless of distance
|
||||||
*/
|
*/
|
||||||
public function broadcastLevelSoundEvent(Vector3 $pos, int $soundId, int $extraData = 1, int $entityTypeId = -1, bool $isBabyMob = false, bool $disableRelativeVolume = false){
|
public function broadcastLevelSoundEvent(Vector3 $pos, int $soundId, int $extraData = -1, int $entityTypeId = -1, bool $isBabyMob = false, bool $disableRelativeVolume = false){
|
||||||
$pk = new LevelSoundEventPacket();
|
$pk = new LevelSoundEventPacket();
|
||||||
$pk->sound = $soundId;
|
$pk->sound = $soundId;
|
||||||
$pk->extraData = $extraData;
|
$pk->extraData = $extraData;
|
||||||
|
@ -249,7 +249,7 @@ class LevelSoundEventPacket extends DataPacket{
|
|||||||
/** @var Vector3 */
|
/** @var Vector3 */
|
||||||
public $position;
|
public $position;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $extraData = 0;
|
public $extraData = -1;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $entityType = ":"; //???
|
public $entityType = ":"; //???
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user