pocketmine\block\DoublePlant::onUpdate PHP Method

onUpdate() public method

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