pocketmine\block\RedstoneTorch::turnOn PHP Метод

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

public turnOn ( $ignore = "" )
    public function turnOn($ignore = "")
    {
        $result = $this->canCalcTurn();
        $this->setLastUpdateTimeNow();
        if ($result === true) {
            $faces = [1 => 4, 2 => 5, 3 => 2, 4 => 3, 5 => 0, 6 => 0, 0 => 0];
            $this->id = self::REDSTONE_TORCH;
            $this->getLevel()->setBlock($this, $this, true);
            $this->activateTorch([$faces[$this->meta]], [$ignore]);
            return true;
        } elseif ($result === Level::BLOCK_UPDATE_SCHEDULED) {
            $this->ignore = $ignore;
            $this->getLevel()->scheduleUpdate($this, 20 * $this->getFrequency());
            return true;
        }
        return false;
    }