public function decode()
{
$this->windowid = $this->getByte();
$count = $this->getShort();
for ($s = 0; $s < $count and !$this->feof(); ++$s) {
$this->slots[$s] = $this->getSlot();
}
if ($this->windowid === self::SPECIAL_INVENTORY) {
$count = $this->getShort();
for ($s = 0; $s < $count and !$this->feof(); ++$s) {
$this->hotbar[$s] = $this->getInt();
}
}
}