Selective hopper minecart unloading

My understanding, is you want a way to unload a hopper minecart, and leave it with some wheat in it, so that it will only pick up wheat on it's next trip.

This is a sketch of a solution.

  • Put four pieces of cobble into the hopper minecart.
  • Have your unloading station contain an item sorter accepting only wheat.
  • Once the minecart is completely unloaded of wheat, as it departs, you can force a single wheat into the empty slot, to ensure only wheat gets loaded on the outbound trip.