isActivable = true; $this->hardness = 3; } public function getDrops(Item $item, Player $player){ return array( array(DIRT, 0, 1), ); } public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ if(($player->gamemode & 0x01) === 0){ $item->count--; } TallGrassObject::growGrass($this->level, $this, new Random()); return true; }elseif($item->isHoe()){ if(($player->gamemode & 0x01) === 0){ $item->useOn($this); } $this->level->setBlock($this, new FarmlandBlock()); return true; } return false; } }