Some text from Minecraft Wiki used under Creative Commons Attribution-Share Alike License 3.0
|Data Values||Hex: ? Dec: ?|
An automatic pumpkin farm can be created using pistons. Placing pumpkin seeds, empty dirt, and pistons in a particular fashion can ensure that pumpkins grow in front of pistons, so when activated, the pistons break the pumpkins. The pumpkins will then be forced forward. By placing a water channel directly in front of the pumpkins, you can build a system that will deliver the pumpkins to you by water.
NOTE: If you are creating an automated farm in an enclosed space, such as underground, a pumpkin plant requires a transparent block above it to spawn a pumpkin in an adjacent block. This does not apply to the pumpkin itself, which will grow normally with a block above it.