Cleaned up muddled varint/varlong mess, added separate methods for entity unique and runtime ids, moved some MCPE-protocol-specific methods out of BinaryStream

This commit is contained in:
Dylan K. Taylor
2017-03-08 19:34:12 +00:00
parent 3a044f0154
commit 295d9bc80b
36 changed files with 177 additions and 110 deletions

View File

@ -52,14 +52,14 @@ class EntityEventPacket extends DataPacket{
public $unknown;
public function decode(){
$this->eid = $this->getEntityId();
$this->eid = $this->getEntityRuntimeId();
$this->event = $this->getByte();
$this->unknown = $this->getVarInt();
}
public function encode(){
$this->reset();
$this->putEntityId($this->eid);
$this->putEntityRuntimeId($this->eid);
$this->putByte($this->event);
$this->putVarInt($this->unknown);
}