From a299b5f90493710e1107053830b878017fc7a8b1 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 24 Jun 2014 17:41:37 +0200 Subject: [PATCH] Update Furnace.php --- src/pocketmine/tile/Furnace.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/tile/Furnace.php b/src/pocketmine/tile/Furnace.php index 4143b6946..36d2faa3e 100644 --- a/src/pocketmine/tile/Furnace.php +++ b/src/pocketmine/tile/Furnace.php @@ -41,14 +41,15 @@ class Furnace extends Tile implements InventoryHolder, Container{ $nbt["id"] = Tile::FURNACE; parent::__construct($chunk, $nbt); $this->inventory = new FurnaceInventory($this); - for($i = 0; $i < $this->getSize(); ++$i){ - $this->inventory->setItem($i, $this->getItem($i)); - } if(!isset($this->namedtag->Items) or !($this->namedtag->Items instanceof Enum)){ $this->namedtag->Items = new Enum("Inventory", []); $this->namedtag->Items->setTagType(NBT::TAG_Compound); } + + for($i = 0; $i < $this->getSize(); ++$i){ + $this->inventory->setItem($i, $this->getItem($i)); + } if(!isset($this->namedtag->BurnTime) or $this->namedtag["BurnTime"] < 0){ $this->namedtag->BurnTime = new Short("BurnTime", 0); @@ -221,4 +222,4 @@ class Furnace extends Tile implements InventoryHolder, Container{ return $ret; } -} \ No newline at end of file +}