More usages of Item->isNull()

This commit is contained in:
Dylan K. Taylor
2017-10-16 12:29:39 +01:00
parent fd847f02ad
commit 3b5eb45ff5
2 changed files with 3 additions and 3 deletions

View File

@ -216,7 +216,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
$raw = $this->inventory->getSmelting();
$product = $this->inventory->getResult();
$smelt = $this->server->getCraftingManager()->matchFurnaceRecipe($raw);
$canSmelt = ($smelt instanceof FurnaceRecipe and $raw->getCount() > 0 and (($smelt->getResult()->equals($product) and $product->getCount() < $product->getMaxStackSize()) or $product->getId() === Item::AIR));
$canSmelt = ($smelt instanceof FurnaceRecipe and $raw->getCount() > 0 and (($smelt->getResult()->equals($product) and $product->getCount() < $product->getMaxStackSize()) or $product->isNull()));
if($this->namedtag->BurnTime->getValue() <= 0 and $canSmelt and $fuel->getFuelTime() > 0 and $fuel->getCount() > 0){
$this->checkFuel($fuel);