Crops: fixed consuming bonemeal on fully-grown crop, closes #2704

This commit is contained in:
Dylan K. Taylor 2019-01-29 13:40:29 +00:00
parent fbe8485696
commit 80d48161d3

View File

@ -43,7 +43,7 @@ abstract class Crops extends Flowable{
public function onActivate(Item $item, Player $player = null) : bool{
if($item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
if($this->meta < 7 and $item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
$block = clone $this;
$block->meta += mt_rand(2, 5);
if($block->meta > 7){