pocketmine\block\Carpet::onUpdate PHP Method

onUpdate() public method

public onUpdate ( $type )
    public function onUpdate($type)
    {
        if ($type === Level::BLOCK_UPDATE_NORMAL) {
            if ($this->getSide(0)->getId() === self::AIR) {
                $this->getLevel()->useBreakOn($this);
                return Level::BLOCK_UPDATE_NORMAL;
            }
        }
        return false;
    }