mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added BaseInventory->dropContents()
This commit is contained in:
@ -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();
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user