mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Added Lave Bucket as Fuel Check
This commit is contained in:
parent
45ee7ea7ae
commit
67919a68e1
1 changed files with 16 additions and 12 deletions
|
|
@ -89,7 +89,10 @@ class Tile extends Position{
|
||||||
$product = $this->getSlot(2);
|
$product = $this->getSlot(2);
|
||||||
$smelt = $raw->getSmeltItem();
|
$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);
|
$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){
|
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->lastUpdate = microtime(true);
|
||||||
$this->data["MaxTime"] = $this->data["BurnTime"] = floor($fuel->getFuelTime() * 20);
|
$this->data["MaxTime"] = $this->data["BurnTime"] = floor($fuel->getFuelTime() * 20);
|
||||||
$this->data["BurnTicks"] = 0;
|
$this->data["BurnTicks"] = 0;
|
||||||
|
|
@ -103,6 +106,7 @@ class Tile extends Position{
|
||||||
$this->level->setBlock($this, BlockAPI::get(BURNING_FURNACE, $current->getMetadata()));
|
$this->level->setBlock($this, BlockAPI::get(BURNING_FURNACE, $current->getMetadata()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if($this->data["BurnTime"] > 0){
|
if($this->data["BurnTime"] > 0){
|
||||||
$ticks = (microtime(true) - $this->lastUpdate) * 20;
|
$ticks = (microtime(true) - $this->lastUpdate) * 20;
|
||||||
$this->data["BurnTime"] -= $ticks;
|
$this->data["BurnTime"] -= $ticks;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue