From 67919a68e13a0af126a99ff32d21269c4cd9357d Mon Sep 17 00:00:00 2001 From: Michael Yoo Date: Fri, 7 Jun 2013 09:17:31 +0930 Subject: [PATCH] Added Lave Bucket as Fuel Check --- src/world/Tile.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/world/Tile.php b/src/world/Tile.php index 7a374e58..cf2aa465 100644 --- a/src/world/Tile.php +++ b/src/world/Tile.php @@ -89,18 +89,22 @@ class Tile extends Position{ $product = $this->getSlot(2); $smelt = $raw->getSmeltItem(); $canSmelt = $smelt !== false and $raw->count > 0 and (($product->getID() === $smelt->getID() and $product->getMetadata() === $smelt->getMetadata() and $product->count < $product->getMaxStackSize()) or $product->getID() === AIR); - if($this->data["BurnTime"] <= 0 and $canSmelt and $fuel->getFuelTime() !== false and $fuel->count > 0){ - $this->lastUpdate = microtime(true); - $this->data["MaxTime"] = $this->data["BurnTime"] = floor($fuel->getFuelTime() * 20); - $this->data["BurnTicks"] = 0; - --$fuel->count; - if($fuel->count === 0){ - $fuel = BlockAPI::getItem(AIR, 0, 0); - } - $this->setSlot(1, $fuel, false); - $current = $this->level->getBlock($this); - if($current->getID() === FURNACE){ - $this->level->setBlock($this, BlockAPI::get(BURNING_FURNACE, $current->getMetadata())); + if($this->data["BurnTime"] <= 0 and $canSmelt and $fuel->getFuelTime() !== false and $fuel->count > 0) + { + if(!($fuel->getID === BUCKET and $fuel->getMetaData() !== LAVA)) + { + $this->lastUpdate = microtime(true); + $this->data["MaxTime"] = $this->data["BurnTime"] = floor($fuel->getFuelTime() * 20); + $this->data["BurnTicks"] = 0; + --$fuel->count; + if($fuel->count === 0){ + $fuel = BlockAPI::getItem(AIR, 0, 0); + } + $this->setSlot(1, $fuel, false); + $current = $this->level->getBlock($this); + if($current->getID() === FURNACE){ + $this->level->setBlock($this, BlockAPI::get(BURNING_FURNACE, $current->getMetadata())); + } } } if($this->data["BurnTime"] > 0){