26 public const ID = AttributeValueColorType::ARRAY;
28 public function __construct(
32 public function getTypeId() :
int{
36 public function getValue() :
Color{
return $this->value; }
38 public static function read(ByteBufferReader $in) :
self{
39 $r = LE::readUnsignedInt($in);
40 $g = LE::readUnsignedInt($in);
41 $b = LE::readUnsignedInt($in);
42 $a = LE::readUnsignedInt($in);
45 new Color($r, $g, $b, $a)
49 public function write(ByteBufferWriter $out) :
void{
50 LE::writeUnsignedInt($out, $this->value->getR());
51 LE::writeUnsignedInt($out, $this->value->getG());
52 LE::writeUnsignedInt($out, $this->value->getB());
53 LE::writeUnsignedInt($out, $this->value->getA());