isActivable = true; $this->hardness = 3; } public function getDrops(Item $item){ return array( array(Item::DIRT, 0, 1), ); } public function onActivate(Item $item, Player $player = null){ if($item->getID() === Item::DYE and $item->getDamage() === 0x0F){ $item->count--; TallGrass::growGrass($this->getLevel(), $this, new Random(mt_rand()), 8, 2); return true; }elseif($item->isHoe()){ $item->useOn($this); $this->getLevel()->setBlock($this, new Farmland()); return true; } return false; } }