Farmland

Farmland is a block on which seeds, root vegetables, and most saplings can be planted and grown.

Breaking
When mined (even with a Silk Touch tool), farmland drops dirt. $$, it can be obtained only from the inventory using commands to obtain it from the inventory, the Creative inventory or the control.

Natural generation
Farmland occurs naturally in villages where wheat, potatoes, carrots, beetroots, pumpkin stem, and melon stem are grown. Patches of farmland are surrounded by logs or sandstone, spruce trapdoor, and cobblestone. They also naturally occur in woodland mansions.

Post-generation
A player may create a block of farmland by a hoe on a dirt block, grass block, or dirt path.

Usage
Farmland is required to grow six of the game's types of crops.

Plants such as saplings, ferns, tall grass and flowers may be planted on farmland. Mushrooms, sugar cane, and cacti cannot be planted on farmland.

$$, acacia saplings don't grow on farmland and 2×2 trees cannot be grown if the northwest sapling is on farmland.

$$, 2×2 giant spruce trees and giant jungle trees don't grow if the northwest sapling is on farmland.

Hydration
A farmland block is created dry, and eventually reverts back to dirt if not hydrated and nothing is planted on it.

To become hydrated, water must be present:
 * up to four blocks away horizontally from the farmland block, including diagonals, and
 * at the same level or one block above the farmland block level.

The blocks between the farmland block and the water make no difference. Flowing water hydrates farmland the same as water source blocks.

The rate at which farmland becomes hydrated cannot be changed. Each farmland block within a 9×9 grid of farmland with a single water block in the middle has exactly the same chance of becoming hydrated as a single farmland block in an ocean.

Farmland can also be hydrated by rain.

Different types of seeds grow faster on hydrated farmland than on dry farmland. Hydrated farmland yields a fully developed wheat crop in a little over a single day/night cycle.

Decay
Farmland eventually decays into normal dirt if is dehydrated and nothing is planted in it. Additionally, a farmland block becomes a dirt block, regardless of its state of hydration, if any of the following occur:


 * The player or any mob jumps/falls on the block (with a greater chance as falling speed increases).
 * $$, mobs smaller than 0.512 cubic block cannot destroy farmland. This includes parrots, rabbits, chickens, bats, ocelots, wolves, foxes, cave spiders, endermites, silverfish, baby mobs, small slimes, and small magma cubes.
 * A piston arm is extended over a farmland block.
 * A piston pushes a farmland block down.
 * A solid block covers the top surface of the farmland block such as when pumpkin or melon blocks appear or trees grow.
 * An enderman teleports directly on top of a farmland block.
 * Snow falls directly on top of a farmland block.
 * A ravager steps on it.

When farmland decays, any crops growing on the block are dropped as items, as if they were harvested.

ID




Metadata
$$, farmland uses the following data values:

Trivia

 * Ladders and torches cannot be attached to the side of a farmland block, but signs can.
 * Farmland is not trampled when walking onto it from a slab next to it.
 * Farmland does not revert to dirt if the player jumps onto it, if a block is two blocks above the farmland being jumped on.
 * Farmland $15/16$ is a full block, therefore a hopper cannot pick up items on a farmland block from underneath it.
 * According to the developer, Xilefian, "there's code that makes [crops] grow faster if they're in rows with a space between them"