Melon

Melons are blocks that grow from planted melon seeds, which grow over time until they reach maturity, randomly spawning melon blocks on adjacent farmland (or dirt/grass as of Minecraft 1.1). Destroying a melon yields 3-7 melon slices, and a maximum of nine with a fortune tool. A melon slice can be consumed for, or be crafted into a melon seed to be planted as a new stem.

Crafting
Melon blocks can be crafted out of 9 melon slices. You cannot reverse this to craft melon slices from a melon block. You must place the melon block and then destroy it to get melon slices back again. Melon slices are wasted in this process, as breaking a melon block only yields a portion of the melon slices used to craft the block.

Farming
To start a Melon farm, one must first find Melon Seeds, which only spawn in an Abandoned Mine Shaft Chest. You can also obtain Melon Slices (which can be crafted into melon seeds)from trading with villagers. Planting a Melon Seed places a small stem that will grow over time. Like regular seeds, Melon stems grow faster if there is one block of water within 4 blocks of it (but having water nearby doesn't affect melon spawning speed once the stem has fully grown). Once the stem reaches maturity (which can be instantly forced by the use of Bone Meal), the stem will spawn a Melon Block in one of the adjacent Dirt or Grass blocks (only Farmland in 1.0 and below) every 1–30 minutes real-life time (0.05-1.5 Minecraft days) and visually connect to it (unless there is a Melon already next to it, then it connects to that melon instead and won't spawn any melons). Once a Melon has grown, the stem will not produce any further Melons until the existing Melon is destroyed. Melons will revert farmland below them to dirt when they grow, so before 1.1, the soil would have to be re-tilled after harvesting Melons. Once a connected Melon is harvested, the stem will be able to generate a new Melon block. A melon will not grow if the block directly above the stem is occupied by a solid block. Additionally, a melon will not spawn on a space adjacent to the stem if that space has a solid block directly above it. Melons will however grow if there is a transparent block above the stem or the adjacent space.

For maximum melon per block yield, the following methods can be used: . . . . . . . . .           . . . . . . . . .            % % % % % % % % %   % % % % % % % % %            % % % % % % % % %            . . . . . . . . .   % % % % % % % % %            % % % % % % % % %            . . . . . . . . .   . . . . . . . . .            . . . . . . . . .            % % % % % % % % %   . . . . = . . . .     OR     ? ? ? ? = ? ? ? ?    OR     ? ? ? ? = ? ? ? ?  % % % % ? % % % %            . . . . . . . . .            % % % % % % % % %   % % % % % % % % %            % % % % % % % % %            . . . . . . . . .   . . . . . . . . .            % % % % % % % % %            . . . . . . . . .                                . . . . . . . . .            % % % % % % % % %     9x8 @ 48.61%                 9x9 @ 44.44%                 9x9 @ 44.44% . % . . % . . % .           % . % . % . % . %            % . . % % % . . %   % ? % % ? % % ? %            . . . . . . . . .            . % % . . . % % .   . % . . % . . % .            . % . % . % . % .            . % % . . . % % .   . % . . % . . % .            . . . . ? . . . .            % . . % % % . . %   % ? % % = % % ? %     OR     %. % . = . % . %    OR     %. . % = % . . %  . % . . % . . % .            . . . . ? . . . .            % . . % % % . . %   . % . . % . . % .            . % . % . % . % .            . % % . . . % % .   % ? % % ? % % ? %            . . . . . . . . .            . % % . . . % % .   . % . . % . . % .            % . % . % . % . %            % . . % % % . . % 9x9 @ 22.22% - 33.33%        9x9 @ 14.81% - 27.16%            9x9 @ 29.62% (43.20%)                                                  (44.44%) % melon seeds. farmland, dirt or grass   = water    ? any block (not air)

With all these, both farm blocks and seed blocks will be hydrated.

The top-left method has an efficiency of 48.61%, the top-middle and top-right are efficient at 44.44%. The efficiency of the first two on bottom row designs varies.

The percentages in round brackets are maximum efficiencies if there are no other farms adjacent to it, and have chance of growing melon outside of the farm area (meaning there is 1 wide dirt surrounding around the farm). But again, that's maximum efficiency, and it varies (if melon grows inside the farm area instead of using the new surrounding to grow, the efficiency goes lower).

Wheat could be grown in the spaces marked '?' to avoid wasting potential hydrated farmland blocks.

While all above designs use one layer, the most efficient, 49.38% farm can be created by using two layers. Design is based on the third design:

x x x x % x x x x             % % % % ? % % % %         x x x x. x x x x. . . . ? . . . .         x x x x. x x x x. . . . ? . . . .         x x x x % x x x x              % % % % ? % % % % top:    %. . % = % . . %   bottom:   ? ? ? ? = ? ? ? ?         x x x x % x x x x              % % % % ? % % % %         x x x x. x x x x. . . . ? . . . .         x x x x. x x x x. . . . ? . . . .         x x x x % x x x x              % % % % ? % % % % x air (empty)

While this design has spots where you need to jump when made in larger scale, there is even cleaner design with same efficiency. In this design the water source must be isolated, so it would stay in 1x1 area and won't spread into '+' sign. It should be placed at least 2 blocks above the first farm layer, so it would be possible to place light source: x x x x x x x x x             x x x x x x x x x           x x x x x x x x x              x x x x x x x x x           x x x x x x x x x              x x x x x x x x x           x x x x ? x x x x             x x x x x x x x x   top:    x x x ? S ? x x x   2nd:      x x x x = x x x x  (1st)    x x x x ? x x x x             x x x x x x x x x           x x x x x x x x x              x x x x x x x x x           x x x x x x x x x              x x x x x x x x x           x x x x x x x x x              x x x x x x x x x           x x x x x x x x x              % % % % % % % % % x x x x x x x x x. . . . . . . . .          x x x x x x x x x. . . . . . . . .          x x x x x x x x x              % % % % % % % % % 3rd:   %. . % = % . . %   bottom:   ? ? ? ? = ? ? ? ?          x x x x x x x x x     (4th)    % % % % % % % % % x x x x x x x x x. . . . . . . . .          x x x x x x x x x. . . . . . . . .          x x x x x x x x x              % % % % % % % % % S water source block     = falling water

The position of the melon seeds (%) and farmland, dirt or grass blocks (.) in the 3rd and 4th layers can be swapped around as efficiency is not sacrificed, E.g.: still 44.44% efficiency for the 4th layer.

The above layouts are optimized for infrequent harvests, with plenty of time for the field to regrow in between. For frequent harvests, the following layout may be better suited; if harvested once per day-and-night cycle, it yields about 17 melons per harvest (as opposed to about 13 melons for the above designs):

. . . . . . . . . % % % % % % % % % . . . . . . . . . . . . . ? . . . . % % % % = % % % % . . . . ? . . . . . . . . . . . . . % % % % % % % % % . . . . . . . ..

Melons are destroyed and drop Melon Slices when a Piston of any kind pushes it, leading the possibility for auto-harvesting Melon farms. A simple Auto-Harvester would be made by placing an up-facing sticky piston under each farmland block reserved for melons. When the sticky pistons are powered, they destroy all of the melons for pickup by the player. Using this technique, one can make a fully automatic farm, but it uses up some space, shown here.

History
Melons were first revealed in an IGN interview with Notch.

Melons were introduced in Minecraft Beta 1.8, the Adventure Update.

In Beta 1.9 pre4, Melons had a bug that made them only yield 1 Melon Slice.

Trivia

 * The Beta 1.8 Changelog had stated "Added Melons" twice.
 * Any stem adjacent to a melon block will appear to connected to it, even if the melon was not grown from that stem.
 * On the Getsatisfaction.com complete ideas for the Ideas section, it was stated that Watermelons were to be implemented.
 * Despite the fact that the block and the items are called "Melon", "Melon Slice" and "Glistering Melon", they have the appearance of Watermelons and Watermelon Slices, like they were originally supposed to be named.
 * When a melon block is pushed by a piston, it will break into melon slices.
 * The block form is square, yet the slices are round.
 * If spawned on water it will generate dirt and removing that block of water.