Breeding



Breeding is a game mechanic that allows animals of the same species to breed with each other to make new animals. Each type of "domestic" animal has a food item used to lead and breed it. (There are a couple of special cases, described under "Mechanics" below.) Animals will follow a player holding its food (once it notices the player), and will continue following the player until it is out of range, the player stops holding the item, or it begins the breeding process. If two nearby animals of the same species are fed, they will spawn a single baby animal of their type. Any animal may only breed once per item given (two parents must be fed to breed), and will be unable to breed for some time afterwards. Note that animals are uninterested in food lying on the ground.

Using wheat or other items (carrots, and seeds) to breed animals that give food (cows, mooshrooms, pigs, chickens) is a way of getting more efficient food than bread or carrots.

Mechanics
The specific items for each breedable animal are as follows:

One item per parent is needed to breed a single baby. Each animal which is fed its food will enter "love mode", preparing to breed with another animal that is in "love mode". Animals that are "in love mode" emit hearts constantly and will path find towards animals up to eight blocks away of the same species that are also "in love mode." The two animals will "kiss" for about two and a half seconds, and then a baby animal of the same species spawns either in between the parents or on the same blocks as the parent that was spawned first, which ends love mode for the parents. Once the parents breed they also drop a small amount of experience. They will not be able to enter love mode again for 5 minutes. However, they can still be herded with the appropriate material, as can the baby.

After the baby animal has spawned, it will follow its parents for 20 minutes before growing to full size. The growth of baby animals can be slowly accelerated using the animal's breeding item. Each use takes 10% off the remaining time to grow up, with the exception of horses where different breeding items speed up the growth by different amounts.

When sheep are born, they will usually be the color of one of their parents, chosen at random. However if the parents have 'compatible' colors (meaning that their corresponding dye items could be combined into a third dye), the lamb will be a mix of the parents' colors (see Wool Dyes). This holds true even if one or both of the parents have just been sheared before breeding and have not yet grown their coats back. This is a handy way to obtain wool of a color for which you do not have a dye.

Villagers
Villagers do not have a food item; they will breed of their own accord (and in their own time) depending on the available houses, or at least "registered doors". (See the NPC Village page for full details.) When they breed, they will produce a smaller Villager but unlike most baby animals, these don't have big heads, similar to cats. Baby Villagers will run around the village and will "play" tag. In the new 1.8 update, Villagers need Trading or food from farms to breed. A baby villager killed by a zombie may produce a Baby Zombie Villager, depending on difficulty.

Breeding formula
A player may want to know how many mobs he/she will need in their farm to reach a certain goal, for example: to make a full-powered enchanting table with bookshelves (45 leather needed) or for full leather armor (24 leather), in case you have cow farm. So there is a formula to calculate how many mobs you will need to have at your farm, by the starting number and if you wait until all the mobs become mature (this does not apply to villagers):

where Xn is the number of mobs at generation n.

Alternatively, if you start with X mobs and want to reach a population of at least Y, it can be achieved in  generations.

Ranching


Animals in an open setting may be difficult to breed. It may be easier to construct fences for animals to stay. Even a medium-size pasture can result in animals neglecting to notice one another in love mode. Animals will spawn in the same square as their parent. It should be noted, however, that if they are in the same square as a fence, glass pane, or other item that takes up only part of a square, offspring may spawn in or on the other side of the block.

Pigs, chickens, cows, sheep and mooshrooms can all provide food when killed. This food will be cooked if they are on fire at the time of death. (But if they are killed by the fire itself, rather than the player, they may not drop experience orbs. Additionally, the player gains no experience for cooking the meat in this manner, as he or she normally does when cooking in a furnace.)


 * Cows additionally drop leather. Both cows and mooshrooms can be milked with a bucket, and mooshrooms can be 'milked' for mushroom stew using a bowl. mooshrooms can also be sheared for 3-5 red mushrooms, although this will turn them into normal Cows.
 * Chickens additionally drop feathers. Eggs can be harvested from chicken farms, and can be used in addition to chicken breeding to speed population growth, as they have a 1/8th chance of producing (at least one) baby chicken when thrown.
 * Sheep drop one wool when killed, but it is more productive to shear them as they drop 1-3 wool. One dye can be used to color their wool before shearing or breeding, which is more efficient than dying the single wool after shearing. Dyed sheep produce offspring of their current color; if the two sheep are different colors, the color of the baby sheep will be a mix of its parent's colors. Ex: blue + white= light blue sheep

Sometimes when farming animals, it may be difficult to keep all animals in the farm, yet still allow you to get in and out of the farm. There are several ways to handle this:
 * Dig holes. Dig a hole outside of the farm, at least 3 blocks deep (two for the tunnel, one for the ceiling).  Place ladders as needed.  Tunnel under the fence, and dig up under the farm. Place more ladders.  Since pigs, cows, and sheep are more than one block wide, they will not fit in the hole resulting in them running in circles trying to get in the hole. However, baby animals and Chickens can fit in a one block hole, so you may want to place a trapdoor at the top. The trapdoor can be placed in the top block of the hole; in older versions, making it level with the farm requires putting an extra block inside the farm to attach it to (don't put it within two blocks of the fence).  Of course, the tunnel can also lead to somewhere more distant....
 * A better way utilizing holes is to dig down one block, dig out the surrounding blocks and change them to fence or (mossy) cobblestone walls. Add carpet(s) on the wall and you can go out while the animals can't.
 * You can also extend your fence to form a "mob-lock"—a small area with two fence gates, one leading into the pen, one outside. This area should be large enough for at least two of the animals in question.  For cows and sheep, making both sides a double gate will make moving animals in and out much easier.  Animals that escape into the lock can be pushed or led back into the pen, or simply considered volunteers for slaughter.
 * A flashier version of this is to use two fence gates with a pressure plate between them. You open one gate and as you pass over the pressure plate, it opens the other gate. The "off" signal made by the pressure plate returning up will close both gates. The whole event is quick enough to thwart any possible pathing out by the animals. Be warned though, keeping the animals away from the entrance is a good practice, otherwise just one getting onto the pressure plate could trigger a "stampede".
 * Another method is to place two blocks in place of a fence and put a trap door on the bottom part of the higher block. Animal AIs cannot make paths that use trapdoors and they cannot open them. This is easier than most other methods and takes up little space (2×2×1).
 * You can forego fences and other blocks and simply dig a pit at least 2 blocks deep, providing access with a ladder. Almost all mobs will very rarely climb a ladder, even if the pit is very crowded. This also makes it easy to guide the mobs in, either by pushing them or leading them in with food.
 * By far, the simplest and least space-consuming method is to use a single post of nether brick fence between regular posts. This will create a single pillar that you can walk around but larger animals cannot pass as nether brick fence does not connect up with regular wooden fence. (1×1×1). Of course, unlike a gate this isn't easily switchable, which may be an issue when bringing animals into your farm.
 * Build a stile. Construct a pen as normal but replace one section of fence with a solid block topped by a slab. On the inner side of the block add a section of ladder; against the outer, a section of stairs. Now mobs can freely follow you into the pen but cannot leave as the stile is 1 1/2 blocks high, the same as fencing, and mobs rarely climb ladders. Note that stiles also work well for large enclosures, such as around your base or a village, with the stairs facing inwards and the ladder outwards. They are faster to use than gates and cannot accidentally be left open.
 * A very easy method is to place a piece of carpet above one of the fence posts. This will allow players up by jumping but not most mobs. This is very similar to the one utilizing holes.
 * Another simple way is to put up a block of dirt inside and outside the fence with at least one block open in between, and using it to jump over, but of course this should only be used when the animals are already inside, as new animals cannot be brought into the enclosure in this way.
 * And of course the easiest way is just putting a fence gate down between two fences.

Baby animals
Baby animals are smaller variations of their parents, having small bodies, relatively big heads, higher pitched sounds, and faster walking speeds. They do not drop resources or experience if killed, and lambs cannot be sheared. However, baby cows and mooshroom calves can be milked. Baby animals will follow one of their parents until they grow up. (If the parent dies or there is none, they will pick a nearby adult of their kind.) Tame puppies and kittens will follow their owner if the parent is absent or sitting, and puppies will attack aggressive mobs just as a mature dog would.

Baby animals grow into full sized animals after twenty minutes (one game day, beds notwithstanding). Their growth can now slowly be accelerated using the animal's breeding item, where each use takes 10% off the remaining time to grow up. There are a few variations:
 * Sheep can grow faster if they eat grass.
 * For dogs (tamed wolves), the puppy does not gain its full health automatically (even when it grows to full size), but must be fed to increase its HP.
 * Foals (baby horses) can be fed to speed their growth.

Trivia

 * Animals of the same species are able to breed with each other regardless of whether they are a parent to the animal they are bred with.
 * Baby cows or sheep will follow you if you are holding wheat, and the wheat can be fed to them to speed up their growth.
 * Baby wolves seem to be naturally attracted to the player.
 * Using the spawn egg of a mob which has baby variants on that mob will spawn the baby variant. However, this will not work on zombies or zombie pigmen before TU18 was issued.
 * When Sheep are bred in the Pocket Edition, the lamb is either one sheep's color or the other - combination colors don't work. This feature is more realistic than combo colors as a baby's color is determined by the adult's "dominant genes" dictating the baby's color.