Added BaseInventory->dropContents()

This commit is contained in:
Dylan K. Taylor
2017-10-16 12:18:06 +01:00
parent 18d3a97466
commit fd847f02ad
5 changed files with 21 additions and 17 deletions

View File

@ -218,12 +218,7 @@ class Explosion{
$t->unpair();
}
$dropPos = $t->asVector3()->add(0.5, 0.5, 0.5);
foreach($t->getInventory()->getContents() as $drop){
if(!$drop->isNull()){
$this->level->dropItem($dropPos, $drop);
}
}
$t->getInventory()->dropContents($this->level, $t->add(0.5, 0.5, 0.5));
}
$t->close();

View File

@ -1689,9 +1689,7 @@ class Level implements ChunkManager, Metadatable{
$tile->unpair();
}
foreach($tile->getInventory()->getContents() as $chestItem){
$this->dropItem($target, $chestItem);
}
$tile->getInventory()->dropContents($this, $target);
}
$tile->close();