Originally Posted by Lamech
One thing I always use a piston for is automated wheat harvesting. Have a block of water blocked when the piston is extended. When it retracts, the water goes free and collects all the wheat in one location. I'm pretty sure there is a better way to do it with melons that doesn't require replanting though...
Piston next to the plant, facing upwards. Melon spawns on piston (didn't test this, hope it works), piston extends, breaking melon. Collect. (Possibly with water, if you can find a way to let the water stream past the plants, otherwise just walking.) (Or is that what you did already? Again, I'll need more testing, I only had the idea and tested the melon-breaking with the piston.)