@SuppressWarnings({"rawtypes", "unchecked"})
  private static void registerFarmables() {
    Optional[] bopLeaves = {
      Blocks.leaves1,
      Blocks.leaves2,
      Blocks.leavesColorized,
      Blocks.treeMoss,
      Blocks.willow,
      Blocks.ivy,
      Blocks.moss
    };
    Optional[] bopFruitLeaves = {Blocks.leavesFruit};
    Optional[] bopLogs = {Blocks.logs1, Blocks.logs2, Blocks.logs3, Blocks.logs4, Blocks.bamboo};
    Optional[] bopMiscStandardHarvestables = {
      Blocks.flowers, Blocks.plants, Blocks.foliage, Blocks.mushrooms
    };
    Optional[] bopSaplings = {Blocks.saplings, Blocks.colorizedSaplings};

    for (Optional<? extends Block> leaves : bopLeaves) {
      FarmingRegistry.registerHarvestable(
          new Harvestable(leaves.get().blockID, HarvestType.TreeLeaf));
    }

    for (Optional<? extends Block> log : bopLogs) {
      FarmingRegistry.registerHarvestable(new Harvestable(log.get().blockID, HarvestType.Tree));
    }

    for (Optional<? extends Block> harvestable : bopMiscStandardHarvestables) {
      FarmingRegistry.registerHarvestable(
          new Harvestable(harvestable.get().blockID, HarvestType.Normal));
    }

    for (Optional<? extends Block> sapling : bopSaplings) {
      FarmingRegistry.registerFertilizable(new Fertilizable(sapling.get().blockID));
    }

    for (Optional<? extends Block> leaves : bopFruitLeaves) {
      FarmingRegistry.registerHarvestable(
          new Harvestable(leaves.get().blockID, HarvestType.TreeLeaf));
      FarmingRegistry.registerFruit(new FruitLeaves(leaves.get().blockID));
    }
  }