color = $color; } /** * Returns the default water-bottle splash colour. * * TODO: replace this with a standard surrogate object constant (first we need to implement them!) */ public static function DEFAULT_COLOR() : Color{ return new Color(0x38, 0x5d, 0xc6); } public function getColor() : Color{ return $this->color; } public function encode(Vector3 $pos) : array{ return [LevelEventPacket::create(LevelEventPacket::EVENT_PARTICLE_SPLASH, $this->color->toARGB(), $pos)]; } }