mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
LevelSoundEventPacket: found unknown field
wtf mojang
This commit is contained in:
parent
7fb237938c
commit
e85fc54037
@ -510,18 +510,18 @@ class Level implements ChunkManager, Metadatable{
|
||||
* Broadcasts a LevelSoundEvent to players in the area.
|
||||
*
|
||||
* @param Vector3 $pos
|
||||
* @param int $soundId
|
||||
* @param int $pitch
|
||||
* @param int $extraData
|
||||
* @param bool $unknown
|
||||
* @param bool $disableRelativeVolume If true, all players receiving this sound-event will hear the sound at full volume regardless of distance
|
||||
* @param int $soundId
|
||||
* @param int $pitch
|
||||
* @param int $extraData
|
||||
* @param bool $isBabyMob
|
||||
* @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 $pitch = 1, int $extraData = -1, bool $unknown = false, bool $disableRelativeVolume = false){
|
||||
public function broadcastLevelSoundEvent(Vector3 $pos, int $soundId, int $pitch = 1, int $extraData = -1, bool $isBabyMob = false, bool $disableRelativeVolume = false){
|
||||
$pk = new LevelSoundEventPacket();
|
||||
$pk->sound = $soundId;
|
||||
$pk->pitch = $pitch;
|
||||
$pk->extraData = $extraData;
|
||||
$pk->unknownBool = $unknown;
|
||||
$pk->isBabyMob = $isBabyMob;
|
||||
$pk->disableRelativeVolume = $disableRelativeVolume;
|
||||
$pk->position = $pos->asVector3();
|
||||
$this->addChunkPacket($pos->getFloorX() >> 4, $pos->getFloorZ() >> 4, $pk);
|
||||
|
@ -219,7 +219,7 @@ class LevelSoundEventPacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $pitch = 1;
|
||||
/** @var bool */
|
||||
public $unknownBool = false;
|
||||
public $isBabyMob = false; //...
|
||||
/** @var bool */
|
||||
public $disableRelativeVolume = false;
|
||||
|
||||
@ -228,7 +228,7 @@ class LevelSoundEventPacket extends DataPacket{
|
||||
$this->position = $this->getVector3();
|
||||
$this->extraData = $this->getVarInt();
|
||||
$this->pitch = $this->getVarInt();
|
||||
$this->unknownBool = $this->getBool();
|
||||
$this->isBabyMob = $this->getBool();
|
||||
$this->disableRelativeVolume = $this->getBool();
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ class LevelSoundEventPacket extends DataPacket{
|
||||
$this->putVector3($this->position);
|
||||
$this->putVarInt($this->extraData);
|
||||
$this->putVarInt($this->pitch);
|
||||
$this->putBool($this->unknownBool);
|
||||
$this->putBool($this->isBabyMob);
|
||||
$this->putBool($this->disableRelativeVolume);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user