pocketmine\tile\Furnace::checkFuel PHP Метод

checkFuel() защищенный Метод

protected checkFuel ( Item $fuel )
$fuel pocketmine\item\Item
    protected function checkFuel(Item $fuel)
    {
        $this->server->getPluginManager()->callEvent($ev = new FurnaceBurnEvent($this, $fuel, $fuel->getFuelTime()));
        if ($ev->isCancelled()) {
            return;
        }
        $this->namedtag->MaxTime = new ShortTag("MaxTime", $ev->getBurnTime());
        $this->namedtag->BurnTime = new ShortTag("BurnTime", $ev->getBurnTime());
        $this->namedtag->BurnTicks = new ShortTag("BurnTicks", 0);
        if ($this->getBlock()->getId() === Item::FURNACE) {
            $this->getLevel()->setBlock($this, Block::get(Item::BURNING_FURNACE, $this->getBlock()->getDamage()), true);
        }
        if ($this->namedtag["BurnTime"] > 0 and $ev->isBurning()) {
            $fuel->setCount($fuel->getCount() - 1);
            if ($fuel->getCount() === 0) {
                $fuel = Item::get(Item::AIR, 0, 0);
            }
            $this->inventory->setFuel($fuel);
        }
    }