public function addBlock($type, array $params, $paramtype)
    {
        if ($this->debug) {
            echo 'Compiler::' . __FUNCTION__ . "\n";
        }

        $class = current(array_filter([
            'Plugin' . Core::toCamelCase($type),
            Core::NAMESPACE_PLUGINS_BLOCKS . 'Plugin' . Core::toCamelCase($type)
        ], 'class_exists'));
        if (false === $class) {
            $this->getCore()->getLoader()->loadPlugin($type);
        }
        $params = $this->mapParams($params, array($class, 'init'), $paramtype);

        $this->stack[]  = array(
            'type'   => $type,
            'params' => $params,
            'custom' => false,
            'class'  => $class,
            'buffer' => null
        );
        $this->curBlock = &$this->stack[count($this->stack) - 1];

        return call_user_func(array($class, 'preProcessing'), $this, $params, '', '', $type);
    }