User:MentalMouse42/Sandbox/Crop Farming



Crop farming allows players to plant any of several on farmland, which then grow over time and can be harvested for food. This page covers three separate crops, all of which share essentially the same growth mechanics, though they produce different foods. All three crops need to grow to maturity to produce more food.

Starting Out
Each crop requires an initial "seed stock" for planting, and getting those first few items can be non-trivial. After the first few seeds, or the first carrot or potato, are planted, they will eventually produce more seeds or vegetables than you started with. These can be used to replant the original space, plus some more, and so on until you've filled your farm-plot of choice. All three crops can be found in village farms, but those are usually not available when beginning a game.

Most players will want to set up a wheat farm early on, to provide bread as their first food supply. However, as the game progresses, better foods will become available, and the wheat farm will be turned to breeding animals. Carrots and potatoes are usually not available until somewhat later in the game.

Wheat is grown from seeds, which can be found by destroying tall grass. While tall grass is common in most biomes, it doesn't drop seeds all that often, so gathering more than a few seeds can be difficult. Harvesting a mature wheat plant yields 1 piece of wheat and 0-3 seeds. If harvested early, they will drop seeds but no wheat. The wheat items can be crafted into bread, or combined with other items to make cake, or cookies. While wheat itself can't be planted, it can be used to breed cows, sheep, or Mooshrooms. The seeds can be used either to grow more wheat, or to breed chickens.

In contrast, Carrots and Potatoes are their own seed, and the plants are not found in the wild. However, killed zombies will occasionally drop a single carrot or potato, which can then be cultivated and multiplied into a farm's worth. Without a village farm, this is usually the only way to get started with either of these crops. When planted, they grow to produce more of the same. Each mature plant can be harvested to get 1-4 potatoes or carrots respectively. A potato plant also has an additional 2% chance of dropping a useless poisonous potato. Both carrots and potatoes can be eaten directly, but potatoes can also be cooked into baked potatoes for more nutrition, while carrots can be used to breed or control pigs.

Sowing
These crops can only be planted on Farmland, which is produced by using a hoe on dirt or grass. Farmland can revert to dirt in two situations: Firstly, if it is jumped on, it will revert, and any crop planted will be broken (harvested, regardless of maturity). Secondly, if there is no water nearby, (within 4 blocks away on the same level) farmland will dry out. If it becomes completely dry and no crop is planted on it, the farmland will revert to dirt. Thus it is possible to grow crops without water (say, in the Nether) by hoeing the dirt and immediately planting a crop; the farmland will not revert until the crop is harvested, and that can often be avoided by immediately replanting the space. (Note however, that this "dry farming" makes the plants grow much more slowly than normal, see below for details.)

A basic repeatable farm plot consists of a 9&times;9 square of farmland, with the center square dug out and filled with a water source block. The water source can be covered with any block, but using a slab prevents accidentally trampling the nearby farmland. In cold biomes you will need to guard the water against freezing, by covering it or placing a light source nearby.

At the beginning of the game when buckets are not available, you can simply till the dirt at the edge of a pond or lake, perhaps digging a trench to extend the water supply inland. (Flowing water blocks do hydrate farmland just as well as source blocks.)

Placing torches (or any other light source, such as glowstone) near the crops allows them to continue growing at night, and also prevents aggressive Mobs from spawning near them. Planting crops in alternate rows (that is, rows separated by bare farmland or a different crop) will also speed growth (details below). Most farms will also need surrounding fences to keep mobs from trampling the crops.

Growth and harvesting


Wheat crops will only grow under the following conditions:


 * It is directly above a block of farmland. If the farmland is removed or reverts to dirt, the wheat crop will be broken.
 * The light level above is at least 9. This doesn't have to be sunlight, so torches will let them continue growing at night.
 * There is at least one block of empty space above it (transparent blocks count as empty)
 * Any player is within their chunk update radius (that is, the crops will only grow if their chunk is loaded).

In single-player or with only one player nearby, crops will not grow while the player is sleeping. However, if torches are not being used, sleeping will skip past the nights when the crops would not grow.

All three crops have a total of 8 growth stages. For wheat, each stage is a little taller and darker than the last, and the crop is mature when the wheat turns brown. Carrots and potatoes, however, have only 4 visible appearances -- that is, pairs of stages appear identical. When the plant shows carrots or potatoes protruding from the ground, it is mature and ready for harvest.

Growth happens at random intervals, and is affected by growing conditions. The average duration of each stage ranges from 5 minutes (in ideal conditions) to 35 minutes (in worst-case conditions). Aside from being placed on hydrated farmland, "ideal conditions" include having light sources (for night growth) and planting crops in alternate rows: each row of plants should be next to either a different crop, or empty farmland. (For the plants on the edges of the plot, it's also ideal to have more farmland beyond the row ends, but this is rare, as it amounts to leaving the edges of the available field empty.)

Right-clicking on any crop plant with Bone Meal will advance it to a later stage in the growing process, which is useful for speeding up the initial multiplication of seed stock.



Crops can be harvested at any time by left-clicking with any tool, but they will yield their product only when the crop is mature. At this stage, wheat will yield 0-3 Seeds and one item of Wheat, while earlier stages will yield only seeds, and the drop rate for these gets steadily lower for earlier stages. Carrots and potatoes will yield 1-4 of the crop when mature, but harvesting earlier will only get back the single carrot or potato you planted. (Mature potato plants also have a 2% chance of dropping a useless poisonous potato.)

Because harvesting one block at a time can become very tedious, some methods for semi-automatically mass-harvesting fields have been devised. The most common is to flood the field with water (which harvests all the plants), but it is also possible to use pistons. The Tips section below has more details.

Growth rate
Crop growth is prompted by random update ticks (the same random events that, for example, create smoke particles above torches and play cave noises). For a given block a random update occurs an average of once every 82 seconds. However the delay can vary widely, and it is even possible (albeit very unlikely) for a crop to be updated multiple times in the same frame. During every update a crop plant gets a chance to grow to the next stage, with the exact change depending on conditions:
 * As noted above, growth requires a light level of at least 9.
 * Any farmland in the 9 blocks below the crop plant (that is, the block it's planted in, and the 8 blocks around it) add to the growth chance. See the chart below for the approximate amount that each farmland block adds to the total probability.  This means that if a field is bordered with anything besides more farmland, the plants at the edge will grow more slowly.

If plants of the same type are growing in the eight surrounding blocks the growth probability is cut in half, unless the crops are arranged in rows as shown below. That is, having the same plant either on a diagonal, or in both north-south and east-west directions, cuts the growth chance.



For the fastest growth, a solid layer of hydrated farmland with crops in rows is ideal. Under these conditions, the probability of growth during each update is approximately 30%, and most (4/5) planted wheat will reach maturity within 37 minutes (about 2 minecraft days)

Placing a row of non-farmland blocks next to a row of wheat crops reduces the growth probability to about 24%. This is necessary when using sticky pistons for automatic harvesting, and most fields will have a border of other blocks. Most planted crops in this case will reach maturity within 50 minutes (about 2.5 minecraft days)

Replacing all unplanted farmland with other blocks reduces the growth probability to about 17%. This is also the approximate probability if crops are planted outside of rows (but on pure hydrated farmland). In either case, most crops will reach maturity within 62 minutes (about 3 minecraft days)

The absolute worst-case conditions for growing are crops placed diagonally on dry farmland. In this case the growth probability is approximately 4%, and it will take about 4 hours for most of the crops to reach maturity (about 12 minecraft days)

The progression of crops over time is shown in the plot below. Each line represents the probability of finding a given crop in that particular growth stage, assuming ideal conditions. The plots for non-ideal conditions look similar, with only the scale of the x axis (time passed) being longer.



Tips for efficient/automated farming


For a simple tutorial on creating a semi-automatic harvesting farm click here Planting in rows on a layer of hydrated farmland produces the fastest growth, which is useful when first starting out a given farm, and trying to multiply the seed stock. However, planting a solid area of hydrated farmland packs about twice as many plants into the same space, each taking a little less than twice as long to mature (see the section on Growth Rates above). Thus, planting an area solid will actually produce slightly more return than planting it in rows, will take less space, and will need to be harvested much less often. This is more useful once you have an established farm and a surplus of food. At that point, most players will leave a farm idle (and mature) until they actually need more of the product.

If water flows in, wheat and seeds are dropped as if the crop had been harvested by hand. This can be used to harvest crops semi-automatically, and carry the resulting items to some central location. A water flood will not revert farmland back into dirt.

Wheat crops are also broken when pushed by pistons, with the same item drops as harvesting manually. The pistons will push the dropped items as well, potentially allowing them to be collected by an adjacent water current. However, using this technique will revert the farmland back into dirt, so that it needs to be re-tilled after every harvest.

Alternatively, sticky pistons can be used to move the farmland block itself, which will cause any crop planted on it to break and drop items as normal. This will not revert the farmland to dirt. Water currents for collecting the items can be placed under the farmland rather than beside it, making this method more compact than harvesting directly with pistons.

Automatic harvesting is generally an all-or-nothing business - harvesting every plant regardless of whether it is actually mature or not. In this situation, it is best not to wait for every last plant to finish growing, as there will always be a few that take much longer than normal. The optimal time to harvest turns out to be when 80% (4/5) of the plants have matured. Assuming that the field is immediately replanted, harvesting at this time will result in the greatest overall rate of production, along with a surplus of seeds for wheat. The section on Growth Rates gives the optimum harvesting time in minutes for some common planting arrangements.

Because bonemeal can force crops to grow more quickly - ignoring normal concerns like growth rate or ambient light - it can be used to create large amounts of wheat or other crops quickly. A number of farm designs focus on using bonemeal exclusively, sacrificing volume and growth efficiency for speed/ease of planting and harvesting. An example which takes advantage of the inventory mechanics to minimize the time required to plant and harvest can be seen here. Note however, that with the recent bonemeal nerfs, it now requires several pieces of bonemeal to take a crop plant from seed to maturity.

Compact design
The best way to save space is to make a vertical farm. The farm can be both over or under the ground, and there must be a two-block height between floors in order to fit the player who must manually replant the crops. One water block irrigates a 9&times;9 block area, and the block under the water must be solid to keep the water. Therefore, you can build a 9&times;9 block "tower" (11&times;11 with its walls), with a central column of water and solid blocks to prevent water from spilling.

Keeping that compact design in mind, the following farm design uses two central columns on a 9&times;10 plot, to irrigate (water blocks), light (Jack-o-lanterns) and automatically retrieve the crops (dispensers loaded with water buckets). (With just one central column and a 9 by 9 block farm, the single water dispenser wouldn't be able to reach all the crops.)

Two ways to trigger the water dispensers are shown in the video: with buttons and tripwires (need more space than buttons). Using redstone circuitry will take much more space.

Automated wheat harvester


This method has couple of advantages over other types of wheat harvesting, like:


 * 1) You only need one piston for each plot of 29 wheat plants.
 * 2) No matter how big you want your farm to be, all the products gather in one point.
 * 3) There’s no need to till the dirt before planting the seeds every time.

Water is used to harvest the wheat plants and the piston controls the water. The farm will consist of cells in which a piston, a bucket of water and 4 glass blocks/panes will be used. There’s a stream of water in the center of the farm and cells on both sides of the water stream. The cells are separated from each other with two block high walls; if the wall is not tall enough some of the products may fall on the sides and out of the flow. The water stream's waterway should go down 1 block every 8 blocks so the water keeps going. Under every wall separating the cells from each other is one block of water source to keep the farmlands on both sides of the wall hydrated.

How it works
The piston controls the flow of water and is always ON, so the piston is always extended, on top of the extended part of the piston is a water source block, surrounded with 8 (or 4 with a cross shape) glass blocks/panes (must be glass so lights goes through to the plants). When the switch is turned OFF the piston goes back to normal and the water flows through the hole which is made now, harvests the crops and drops them in the stream. You can either go to the end of the stream and pick them up or place a hopper underneath the stream which picks the wheat up and puts it into a chest of some sort.

Redstone Lamp Farming
An alternative method of harvest is a sealed room lit only by redstone lamps. When the lamps are turned off, all of the wheat will automatically pop from the ground. This is effective on servers where pistons are disabled. Redstone lamps should be placed 2 blocks off the ground on an offset 8 block interval. Each farm floor will occupy 6 vertical blocks (5 blocks is possible but you would not be able to walk on top of the lighting grid)

With lighting from above, there is no need for torch lighting which improves utilization of farmland to a max of 98.7%, only requiring 1 water block for every 81 blocks. The additional vertical space may offset this benefit depending on your priorities.

There is a glitch with minecraft that fails to process redstone lamps properly when they are placed against the outer walls. As a result, crops lit by lamps touching the outer wall will fail to harvest themselves. To avoid this problem, you should keep all lighting blocks at least 1 space away from the outer wall.

Harvesting large farms can also create significant lag; it may be wise to put a delay on the repeaters to assist the server.

Water design
In this design water from the back of the farm flows to the front, destroying the wheat and allowing for easy collection.

Trivia

 * Farmland cannot absorb water from the bottom.
 * Farmland placed at an altitude of 1 will not grow crops on its own.