23    public function __construct(
 
   24        private string $materialId,
 
   25        private string $color,
 
   26        private string $itemId
 
   29    public function getMaterialId() : 
string{ 
return $this->materialId; }
 
   31    public function getColor() : 
string{ 
return $this->color; }
 
   33    public function getItemId() : 
string{ 
return $this->itemId; }
 
   35    public static function read(ByteBufferReader $in) : 
self{
 
   36        $materialId = CommonTypes::getString($in);
 
   37        $color = CommonTypes::getString($in);
 
   38        $itemId = CommonTypes::getString($in);
 
   39        return new self($materialId, $color, $itemId);
 
   42    public function write(ByteBufferWriter $out) : 
void{
 
   43        CommonTypes::putString($out, $this->materialId);
 
   44        CommonTypes::putString($out, $this->color);
 
   45        CommonTypes::putString($out, $this->itemId);