Building a Farm in Minecraft
Though farming is not a required task in Minecraft, having a reliable source of renewable resources is useful. Many different items (plants, mostly) can be farmed in Minecraft.
Harvestable items such as wheat, melons, and pumpkins fit the raw definition of Minecraft farming by requiring well-irrigated farmland. Follow these general steps to set up a farm:
Find a well-lit area made of grass or dirt.
If the area isn't well-lit, craft some torches. A flat workspace makes your task easier, though it isn't mandatory.
Craft a gardening hoe and use it.
You can right-click the ground to use the hoe to till farmland.
Locate a water source nearby and then right-click it while holding a bucket. Right-click again while holding the full bucket to dump the water near your crops.
Dig an irrigated hole or canal in your future farm, allowing any nearby farmland to thrive. Dry farmland grows more slowly and wears out after too much time passes without crops being planted on it.
Lock up your farm.
Jumping on farmland destroys it. Keep crops safe from animals by building walls around the crops. Fences and fence gates work well.
After these steps are finished, you're ready to harvest crops!
You can use animal farms to acquire resources such as pork or wool without having to endure a lot of hassle. Animals follow you while you're holding wheat, so lure some into a fenced-in area to start your farm. Chickens are lured by seeds instead.
Right-clicking two animals of the same species while holding wheat (use seeds for chickens) causes them to spawn a baby animal. Thus, you can make use of your animal farm however you want and keep it populated.
A lamb's wool will be the same color as its parents' wool. To farm a specific color of wool, right-click some sheep while holding dye to paint them, and then start a farm with them. Sheep regrow shorn wool by eating grass.
Though mushrooms slowly spread if their climate is dark enough, the spacious, dark areas of a farm can attract monsters. If you don't want to have to perfect the lighting, use bone meal on a planted mushroom so that it grows into a giant mushroom, as shown in the following figure. Giant mushrooms provide a huge profit when you break them and can be used to quickly get lots of mushrooms.