Added compound tag checking for Item->equals()

This commit is contained in:
Shoghi Cervantes
2015-08-06 20:25:22 +02:00
parent a65109ff34
commit 091d0b3ff9
7 changed files with 29 additions and 22 deletions

View File

@ -212,7 +212,7 @@ class Furnace extends Tile implements InventoryHolder, Container{
$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, true) 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->getId() === Item::AIR));
if($this->namedtag["BurnTime"] <= 0 and $canSmelt and $fuel->getFuelTime() !== null and $fuel->getCount() > 0){
$this->checkFuel($fuel);