LevelSoundEventPacket: found unknown field

wtf mojang
This commit is contained in:
Dylan K. Taylor 2018-04-07 11:33:36 +01:00
parent 7fb237938c
commit e85fc54037
2 changed files with 10 additions and 10 deletions

View File

@ -510,18 +510,18 @@ class Level implements ChunkManager, Metadatable{
* Broadcasts a LevelSoundEvent to players in the area. * Broadcasts a LevelSoundEvent to players in the area.
* *
* @param Vector3 $pos * @param Vector3 $pos
* @param int $soundId * @param int $soundId
* @param int $pitch * @param int $pitch
* @param int $extraData * @param int $extraData
* @param bool $unknown * @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 $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 = new LevelSoundEventPacket();
$pk->sound = $soundId; $pk->sound = $soundId;
$pk->pitch = $pitch; $pk->pitch = $pitch;
$pk->extraData = $extraData; $pk->extraData = $extraData;
$pk->unknownBool = $unknown; $pk->isBabyMob = $isBabyMob;
$pk->disableRelativeVolume = $disableRelativeVolume; $pk->disableRelativeVolume = $disableRelativeVolume;
$pk->position = $pos->asVector3(); $pk->position = $pos->asVector3();
$this->addChunkPacket($pos->getFloorX() >> 4, $pos->getFloorZ() >> 4, $pk); $this->addChunkPacket($pos->getFloorX() >> 4, $pos->getFloorZ() >> 4, $pk);

View File

@ -219,7 +219,7 @@ class LevelSoundEventPacket extends DataPacket{
/** @var int */ /** @var int */
public $pitch = 1; public $pitch = 1;
/** @var bool */ /** @var bool */
public $unknownBool = false; public $isBabyMob = false; //...
/** @var bool */ /** @var bool */
public $disableRelativeVolume = false; public $disableRelativeVolume = false;
@ -228,7 +228,7 @@ class LevelSoundEventPacket extends DataPacket{
$this->position = $this->getVector3(); $this->position = $this->getVector3();
$this->extraData = $this->getVarInt(); $this->extraData = $this->getVarInt();
$this->pitch = $this->getVarInt(); $this->pitch = $this->getVarInt();
$this->unknownBool = $this->getBool(); $this->isBabyMob = $this->getBool();
$this->disableRelativeVolume = $this->getBool(); $this->disableRelativeVolume = $this->getBool();
} }
@ -237,7 +237,7 @@ class LevelSoundEventPacket extends DataPacket{
$this->putVector3($this->position); $this->putVector3($this->position);
$this->putVarInt($this->extraData); $this->putVarInt($this->extraData);
$this->putVarInt($this->pitch); $this->putVarInt($this->pitch);
$this->putBool($this->unknownBool); $this->putBool($this->isBabyMob);
$this->putBool($this->disableRelativeVolume); $this->putBool($this->disableRelativeVolume);
} }