Fixes for AnimatePacket and added TextPacket::TYPE_WHISPER constant

This commit is contained in:
Dylan K. Taylor 2016-10-27 14:05:49 +01:00
parent 3d2f9f0e74
commit 137972098f
2 changed files with 3 additions and 2 deletions

View File

@ -31,13 +31,13 @@ class AnimatePacket extends DataPacket{
public $eid; public $eid;
public function decode(){ public function decode(){
$this->action = $this->getByte(); $this->action = $this->getVarInt();
$this->eid = $this->getEntityId(); $this->eid = $this->getEntityId();
} }
public function encode(){ public function encode(){
$this->reset(); $this->reset();
$this->putByte($this->action); $this->putVarInt($this->action);
$this->putEntityId($this->eid); $this->putEntityId($this->eid);
} }

View File

@ -33,6 +33,7 @@ class TextPacket extends DataPacket{
const TYPE_POPUP = 3; const TYPE_POPUP = 3;
const TYPE_TIP = 4; const TYPE_TIP = 4;
const TYPE_SYSTEM = 5; const TYPE_SYSTEM = 5;
const TYPE_WHISPER = 6;
public $type; public $type;
public $source; public $source;