Minecraft wiki entry for Pumpkin_and_melon_farming, associated text: Each chunk has a 1/32 chance of attempting to spawn pumpkins when the chunk is generated; a random point is chosen and 64 attempts are made to find a random air block with grass beneath in a 15×15×7 region around the point in which to place a pumpkin. Note the random point could be far in the air or far underground, greatly reducing the chances of pumpkins being able to be placed.