Minecraft wiki entry for Pumpkin_and_melon_farming, associated text: This farm uses observer horizontally, it needs a larger area than vertical observer farm. Place 2 stems on farmlands with one air block between the stems. The stems can be melon, pumpkin, or both. Beneath the empty air block, place any type of block that a melon/pumpkin can grow on, and behind that space place an observer block. Have the observer be wired up to a regular piston pointing toward the air block and on top of it. Finally, have a hopper beneath it that collects the melons and put it into a chest. This method, however, loops continuously once set off, as the observer sees the piston arm and triggers repeatedly unless there is a mechanism to stop the signal.