pocketmine\block\TNT::onUpdate PHP Метод

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

public onUpdate ( $type )
    public function onUpdate($type)
    {
        if ($type == Level::BLOCK_UPDATE_SCHEDULED) {
            $sides = [0, 1, 2, 3, 4, 5];
            foreach ($sides as $side) {
                $block = $this->getSide($side);
                if ($block instanceof RedstoneSource and $block->isActivated($this)) {
                    $this->prime();
                    $this->getLevel()->setBlock($this, new Air(), true);
                    break;
                }
            }
            return Level::BLOCK_UPDATE_SCHEDULED;
        }
        return false;
    }