Minecraft wiki entry for Pumpkin_and_melon_farming, associated text: This farm requires a observer directly above a plant and pistons that activate when the plant moves. These outputs are then taken through a hopper minecart into a chest. This is cheap but harder to build due to the orientations of the pistons and and observers. This is a short video explaining the topic. https://www.youtube.com/watch?v=AcX-M7-HyKQ