Tutorials/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.

Why build a ranch?
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: cows for milk with a bucket, and mooshrooms 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/8$th 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

Designs


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 three 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 (do not 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 cannot.
 * 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 two 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.
 * Another method is to use leads to attach mobs to a single fence post. This design is not a design that can be achieved early on, but the farm is much easier to enter and exit.
 * And of course the easiest way is just putting a fence gate down between two fences.