ItemFrame: fixed a phpstan level 8 error

This commit is contained in:
Dylan K. Taylor
2020-06-27 00:46:53 +01:00
parent 45b4e3cd7a
commit f039a077cd
2 changed files with 1 additions and 6 deletions

View File

@ -142,7 +142,7 @@ class ItemFrame extends Flowable{
return false;
}
if(lcg_value() <= $this->itemDropChance){
$this->pos->getWorldNonNull()->dropItem($this->pos->add(0.5, 0.5, 0.5), $this->getFramedItem());
$this->pos->getWorldNonNull()->dropItem($this->pos->add(0.5, 0.5, 0.5), clone $this->framedItem);
}
$this->setFramedItem(null);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this);