So you want to be a farmer? Farming gives players a way to till soil, plant seeds and grow wheat.
Building a Farm
Your first step in farming is crafting a hoe of any type (probably stone). Next, pick a small area of grass and dirt. It's pretty important to setup your farm near natural water (or water placed with a bucket) as you'll see below. Use your hoe on the dirt/grass to till the ground, turning it into farmland blocks.
Hydrating the Soil
When a farmland tile is within 4 tiles of water (even diagonally), and on the same level or one level lower, the farmland tile has a chance of becoming hydrated. You will notice it become noticably darker. Wheat will grow in 1 day/night cycle when planted on hydrated farmland.
You can also place water using a water bucket near farmland to hydrate it. If you put water in the center of a 9x9 grid of farmland, all the tiles will be hydrated.
Harvest crops by left-clicking them with any tool selected. Wheat goes through 8 stages of growth. The beginning stages are green and will have no yield if harvested. Wait until they are somewhat brown, that's fully grown (see image on left of mature wheat). Once harvested, they will drop between 0 and 3 seeds and 1 wheat.
Speeding Things Up
You can use bone meal on crops (make it the active item and right-click the crop) to fertilize them, immediately making them ready for harvest. You can also place torches near crops so that they continue to grow through the night. Lit, grassy areas will attract critters, so make sure you put a fence around your crops and replace the grass with cobblestone to keep your crops safe.
For the optimal growth rate, plant your crops in rows, with no crops on either side.
Mind Your Feet
Stomping on your crops will slowly hurt them, so be mindful of where you are walking. You can, however, sneak over your crops by holding shift as you move. Creatures can also harm crops by walking on them, so keep them out by following the tips in the Speeding Things Up section above. Happy farming!
Recipe / Source
Carrots are a consumable food that can be planted on farms.
Cocoa plants grow on the side of jungle trees. Cocoa beans can be harvested from them.
Melon seeds will grow melons.
Melon slices are acquired by destroying melons, each of them dropping 3-7 slices.
Potatoes are a consumable food that can also be planted on a farm or cooked
Pumpkin seeds will grow a central stem, that grows to max size before spawning a Pumpkin next to it. The seeds can be found in Abandoned Mine Shaft chests.