Fixed flower pot accepting any block

This commit is contained in:
Dylan K. Taylor 2022-05-17 20:29:37 +01:00
parent 89cc449808
commit 071067effb
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -138,14 +138,16 @@ class FlowerPot extends Flowable{
$this->setPlant(null);
$this->position->getWorld()->setBlock($this->position, $this);
return true;
}elseif($this->isValidPlant($plant)){
$this->setPlant($plant);
$item->pop();
$this->position->getWorld()->setBlock($this->position, $this);
return true;
}
$this->setPlant($plant);
$item->pop();
$this->position->getWorld()->setBlock($this->position, $this);
return true;
return false;
}
public function getDropsForCompatibleTool(Item $item) : array{