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

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

public onUpdate ( $type )
    public function onUpdate($type)
    {
        if ($type === Level::BLOCK_UPDATE_NORMAL) {
            if ($this->getSide(0)->getId() === self::AIR) {
                //Replace with common break method
                $this->getLevel()->setBlock($this, new Air(), true);
                return Level::BLOCK_UPDATE_NORMAL;
            }
        }
        return false;
    }