mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Rename LevelSoundEventPacket field and add defaults
This commit is contained in:
parent
4f4bdea104
commit
18ebc64ea0
@ -123,15 +123,15 @@ class LevelSoundEventPacket extends DataPacket{
|
|||||||
public $x;
|
public $x;
|
||||||
public $y;
|
public $y;
|
||||||
public $z;
|
public $z;
|
||||||
public $volume;
|
public $extraData = -1;
|
||||||
public $pitch;
|
public $pitch = 1;
|
||||||
public $unknownBool;
|
public $unknownBool = false;
|
||||||
public $unknownBool2;
|
public $unknownBool2 = false;
|
||||||
|
|
||||||
public function decode(){
|
public function decode(){
|
||||||
$this->sound = $this->getByte();
|
$this->sound = $this->getByte();
|
||||||
$this->getVector3f($this->x, $this->y, $this->z);
|
$this->getVector3f($this->x, $this->y, $this->z);
|
||||||
$this->volume = $this->getVarInt();
|
$this->extraData = $this->getVarInt();
|
||||||
$this->pitch = $this->getVarInt();
|
$this->pitch = $this->getVarInt();
|
||||||
$this->unknownBool = $this->getBool();
|
$this->unknownBool = $this->getBool();
|
||||||
$this->unknownBool2 = $this->getBool();
|
$this->unknownBool2 = $this->getBool();
|
||||||
@ -141,7 +141,7 @@ class LevelSoundEventPacket extends DataPacket{
|
|||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putByte($this->sound);
|
$this->putByte($this->sound);
|
||||||
$this->putVector3f($this->x, $this->y, $this->z);
|
$this->putVector3f($this->x, $this->y, $this->z);
|
||||||
$this->putVarInt($this->volume);
|
$this->putVarInt($this->extraData);
|
||||||
$this->putVarInt($this->pitch);
|
$this->putVarInt($this->pitch);
|
||||||
$this->putBool($this->unknownBool);
|
$this->putBool($this->unknownBool);
|
||||||
$this->putBool($this->unknownBool2);
|
$this->putBool($this->unknownBool2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user