mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +00:00
Fixed flower pot accepting any block
This commit is contained in:
parent
89cc449808
commit
071067effb
@ -139,8 +139,7 @@ class FlowerPot extends Flowable{
|
|||||||
$this->setPlant(null);
|
$this->setPlant(null);
|
||||||
$this->position->getWorld()->setBlock($this->position, $this);
|
$this->position->getWorld()->setBlock($this->position, $this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}elseif($this->isValidPlant($plant)){
|
||||||
|
|
||||||
$this->setPlant($plant);
|
$this->setPlant($plant);
|
||||||
$item->pop();
|
$item->pop();
|
||||||
$this->position->getWorld()->setBlock($this->position, $this);
|
$this->position->getWorld()->setBlock($this->position, $this);
|
||||||
@ -148,6 +147,9 @@ class FlowerPot extends Flowable{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getDropsForCompatibleTool(Item $item) : array{
|
public function getDropsForCompatibleTool(Item $item) : array{
|
||||||
$items = parent::getDropsForCompatibleTool($item);
|
$items = parent::getDropsForCompatibleTool($item);
|
||||||
if($this->plant !== null){
|
if($this->plant !== null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user