Rename LevelSoundEventPacket field and add defaults

This commit is contained in:
Dylan K. Taylor 2016-12-28 14:15:56 +00:00
parent 4f4bdea104
commit 18ebc64ea0

View File

@ -123,15 +123,15 @@ class LevelSoundEventPacket extends DataPacket{
public $x;
public $y;
public $z;
public $volume;
public $pitch;
public $unknownBool;
public $unknownBool2;
public $extraData = -1;
public $pitch = 1;
public $unknownBool = false;
public $unknownBool2 = false;
public function decode(){
$this->sound = $this->getByte();
$this->getVector3f($this->x, $this->y, $this->z);
$this->volume = $this->getVarInt();
$this->extraData = $this->getVarInt();
$this->pitch = $this->getVarInt();
$this->unknownBool = $this->getBool();
$this->unknownBool2 = $this->getBool();
@ -141,7 +141,7 @@ class LevelSoundEventPacket extends DataPacket{
$this->reset();
$this->putByte($this->sound);
$this->putVector3f($this->x, $this->y, $this->z);
$this->putVarInt($this->volume);
$this->putVarInt($this->extraData);
$this->putVarInt($this->pitch);
$this->putBool($this->unknownBool);
$this->putBool($this->unknownBool2);