23 public function __construct(
24 private int $nameIndex,
28 public function getNameIndex() :
int{
return $this->nameIndex; }
30 public function getType() :
int{
return $this->type; }
32 public static function read(ByteBufferReader $in) :
self{
33 $nameIndex = LE::readUnsignedShort($in);
34 $type = LE::readUnsignedShort($in);
36 return new self($nameIndex, $type);
39 public function write(ByteBufferWriter $out) :
void{
40 LE::writeUnsignedShort($out, $this->nameIndex);
41 LE::writeUnsignedShort($out, $this->type);