diff --git a/src/block/tile/ContainerTrait.php b/src/block/tile/ContainerTrait.php index 43107cd6a..4c4907a9b 100644 --- a/src/block/tile/ContainerTrait.php +++ b/src/block/tile/ContainerTrait.php @@ -96,8 +96,10 @@ trait ContainerTrait{ $inv = $this->getRealInventory(); $pos = $this->getPosition(); + $world = $pos->getWorld(); + $dropPos = $pos->add(0.5, 0.5, 0.5); foreach($inv->getContents() as $k => $item){ - $pos->getWorld()->dropItem($pos->add(0.5, 0.5, 0.5), $item); + $world->dropItem($dropPos, $item); } $inv->clearAll(); }