Bonemeal is no longer consumed when cancelling plant growth events (#4551)

This commit is contained in:
Colin
2021-11-05 17:15:55 +01:00
committed by GitHub
parent 0989c77037
commit 07b1cff306
4 changed files with 13 additions and 14 deletions

View File

@ -99,9 +99,9 @@ class SweetBerryBush extends Flowable{
if(!$ev->isCancelled()){
$this->position->getWorld()->setBlock($this->position, $ev->getNewState());
$item->pop();
}
$item->pop();
}elseif(($dropAmount = $this->getBerryDropAmount()) > 0){
$this->position->getWorld()->setBlock($this->position, $this->setAge(self::STAGE_BUSH_NO_BERRIES));
$this->position->getWorld()->dropItem($this->position, $this->asItem()->setCount($dropAmount));