Minecraft – Selective hopper minecart unloading

minecraft-java-editionminecraft-redstone

I have a 1.14 automatic wheat farm that involves a hopper minecart picking up wheat under a field of villagers. However, I only want to collect the wheat and leave the seeds so that the villagers can collect and replant them. In order to do this, I have one wheat in each slot in the minecart. This system works perfectly and only picks up wheat.

However, now I want to create an automatic unloader. The unloader cannot unload all the items though, as I need all 5 slots filled with some wheat. My plan was to use a detector rail with a comparator and a redstone hopper. This would unload all items down to 22, and then send the minecart on its way. The comparator detection works, but the problem is the detector rail is sending a redstone high to the hopper underneath it, preventing any unloading.

Any suggestions for getting the hopper to unload despite the detector rail above it? Or any alternate design suggestions? Image of a partially working system attached:

Best Answer

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.