Added encode and decode methods for more packets

This commit is contained in:
Dylan K. Taylor
2017-05-15 15:56:59 +01:00
parent 162a08b8cb
commit 0a4d62b405
57 changed files with 244 additions and 78 deletions

View File

@ -46,7 +46,11 @@ class UpdateBlockPacket extends DataPacket{
public $flags;
public function decode(){
$this->getBlockPosition($this->x, $this->y, $this->z);
$this->blockId = $this->getUnsignedVarInt();
$aux = $this->getUnsignedVarInt();
$this->blockData = $aux & 0x0f;
$this->flags = $aux >> 4;
}
public function encode(){