26 public function __construct(
30 private int $durationMillis
33 public function getText() :
string{
return $this->text; }
35 public function getPosition() :
Vector3{
return $this->position; }
37 public function getColor() :
Color{
return $this->color; }
39 public function getDurationMillis() :
int{
return $this->durationMillis; }
41 public static function read(ByteBufferReader $in) :
self{
42 $text = CommonTypes::getString($in);
43 $position = CommonTypes::getVector3($in);
44 $color = Color::fromARGB(LE::readUnsignedInt($in));
45 $durationMillis = LE::readUnsignedLong($in);
55 public function write(ByteBufferWriter $out) :
void{
56 CommonTypes::putString($out, $this->text);
57 CommonTypes::putVector3($out, $this->position);
58 LE::writeUnsignedInt($out, $this->color->toARGB());
59 LE::writeUnsignedLong($out, $this->durationMillis);