New fields for LevelSoundEventPacket (previously unknown)

This commit is contained in:
Dylan K. Taylor 2016-10-04 22:03:02 +01:00
parent 08f11412a4
commit e35ed7f04a

View File

@ -25,14 +25,13 @@ namespace pocketmine\network\protocol;
class LevelSoundEventPacket extends DataPacket{
const NETWORK_ID = Info::LEVEL_SOUND_EVENT_PACKET;
//TODO: find unknowns
public $unknownByte;
public $sound;
public $x;
public $y;
public $z;
public $unknownVarInt1;
public $unknownVarInt2;
public $volume;
public $pitch;
public $unknownBool;
public function decode(){
@ -41,10 +40,10 @@ class LevelSoundEventPacket extends DataPacket{
public function encode(){
$this->reset();
$this->putByte($this->unknownByte);
$this->putByte($this->sound);
$this->putVector3f($this->x, $this->y, $this->z);
$this->putVarInt($this->unknownVarInt1);
$this->putVarInt($this->unknownVarInt2);
$this->putVarInt($this->volume);
$this->putVarInt($this->pitch);
$this->putByte($this->unknownBool);
}
}