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

@ -59,9 +59,6 @@ class AnvilInventory extends ContainerInventory{
public function onClose(Player $who) : void{
parent::onClose($who);
for($i = 0; $i < 2; ++$i){
$this->getHolder()->getLevel()->dropItem($this->getHolder()->add(0.5, 0.5, 0.5), $this->getItem($i));
$this->clear($i);
}
$this->dropContents($this->holder->getLevel(), $this->holder->add(0.5, 0.5, 0.5));
}
}