mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 00:29:54 +00:00
Update Furnace.php
This commit is contained in:
parent
fd9fdc30cb
commit
a299b5f904
@ -41,14 +41,15 @@ class Furnace extends Tile implements InventoryHolder, Container{
|
|||||||
$nbt["id"] = Tile::FURNACE;
|
$nbt["id"] = Tile::FURNACE;
|
||||||
parent::__construct($chunk, $nbt);
|
parent::__construct($chunk, $nbt);
|
||||||
$this->inventory = new FurnaceInventory($this);
|
$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)){
|
if(!isset($this->namedtag->Items) or !($this->namedtag->Items instanceof Enum)){
|
||||||
$this->namedtag->Items = new Enum("Inventory", []);
|
$this->namedtag->Items = new Enum("Inventory", []);
|
||||||
$this->namedtag->Items->setTagType(NBT::TAG_Compound);
|
$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){
|
if(!isset($this->namedtag->BurnTime) or $this->namedtag["BurnTime"] < 0){
|
||||||
$this->namedtag->BurnTime = new Short("BurnTime", 0);
|
$this->namedtag->BurnTime = new Short("BurnTime", 0);
|
||||||
@ -221,4 +222,4 @@ class Furnace extends Tile implements InventoryHolder, Container{
|
|||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user