Cleaned up fuel duration handling, fixed some fuel items not working in furnaces

This commit is contained in:
Dylan K. Taylor
2017-08-17 10:22:47 +01:00
parent dc3f13cd30
commit 6efa4343b1
30 changed files with 123 additions and 71 deletions

View File

@ -218,7 +218,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
$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));
if($this->namedtag->BurnTime->getValue() <= 0 and $canSmelt and $fuel->getFuelTime() !== null and $fuel->getCount() > 0){
if($this->namedtag->BurnTime->getValue() <= 0 and $canSmelt and $fuel->getFuelTime() > 0 and $fuel->getCount() > 0){
$this->checkFuel($fuel);
}