23    public function __construct(
 
   24        private int $categoryId,
 
   25        private string $categoryName,
 
   29    public function getCategoryId() : 
int{ 
return $this->categoryId; }
 
   31    public function getCategoryName() : 
string{ 
return $this->categoryName; }
 
   33    public function getIcon() : 
ItemStack{ 
return $this->icon; }
 
   35    public static function read(ByteBufferReader $in) : 
self{
 
   36        $categoryId = LE::readSignedInt($in);
 
   37        $categoryName = CommonTypes::getString($in);
 
   38        $icon = CommonTypes::getItemStackWithoutStackId($in);
 
   39        return new self($categoryId, $categoryName, $icon);
 
   42    public function write(ByteBufferWriter $out) : 
void{
 
   43        LE::writeSignedInt($out, $this->categoryId);
 
   44        CommonTypes::putString($out, $this->categoryName);
 
   45        CommonTypes::putItemStackWithoutStackId($out, $this->icon);