pocketmine\block\WoodenButton::activate PHP Метод

activate() публичный Метод

public activate ( array $ignore = [] )
$ignore array
    public function activate(array $ignore = [])
    {
        parent::activate($ignore = []);
        $faces = [0 => 1, 1 => 0, 2 => 3, 3 => 2, 4 => 5, 5 => 4];
        $side = $this->meta;
        if ($this->isActivated()) {
            $side ^= 0x8;
        }
        $block = $this->getSide($faces[$side])->getSide(Vector3::SIDE_UP);
        if (!$this->equals($block)) {
            $this->activateBlock($block);
        }
        if ($side != 1) {
            $block = $this->getSide($faces[$side], 2);
            $this->activateBlock($block);
        }
        $this->checkTorchOn($this->getSide($faces[$side]), [$this->getOppositeSide($faces[$side])]);
    }