Added missing parent calls for saveNBT() in Chest and Furnace

This commit is contained in:
Dylan K. Taylor 2017-10-16 18:56:48 +01:00
parent 28a840d161
commit f4ff5d81ea
2 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
}
public function saveNBT() : void{
parent::saveNBT();
$this->namedtag->setTag(new ListTag("Items", [], NBT::TAG_Compound));
for($index = 0; $index < $this->getSize(); ++$index){
$this->setItem($index, $this->inventory->getItem($index));

View File

@ -107,6 +107,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
}
public function saveNBT() : void{
parent::saveNBT();
$this->namedtag->setTag(new ListTag("Items", [], NBT::TAG_Compound));
for($index = 0; $index < $this->getSize(); ++$index){
$this->setItem($index, $this->inventory->getItem($index));