Melon

"Few cubes get our mouths watering and stomachs rumbling quite like the melon block. It's a tasty treat that drops slices which keep your food bar looking healthy and a block that can be used to build a deliciously nutritious looking house. But hang on a second... a block that's also a melon? Has the world gone mad?"

- Tom Stone

Melons are blocks that grow from fully grown melon seeds.

Obtaining
Melons can be harvested using any tool or by hand. Axes, followed by swords, are the fastest tools for harvesting melons. A melon will drop 3–7 melon slices, when broken; by hand, using a tool, or after being broken by the movement of a piston.

In Bedrock Edition, breaking a melon block with shears does not drop 9 melons, rather they yield the same as any other tool.

Natural generation
Melons are naturally generated in jungle biomes and inside "Stem farm" rooms of woodland mansions.

Melons can be found in savanna village.

Farming
Melon seeds can be planted, placing a small stem that will grow over time. Once the stem reaches maturity, it will attempt to generate a melon block in one of the four immediately adjacent blocks; however, this attempt may fail if the chosen adjacent block is not empty or the block beneath is not dirt, grass, or farmland. Once a stem has connected to a melon, that stem will not produce any further melons until the existing melon is harvested. If there are two melon plants a block away from each other and a melon is placed or generated between them, the two melon plants will connect to the melon as if they generated a melon at the same time. The two melon plants will not generate any more melons until the melon between them is harvested. The same principle applies for pumpkins.

Endermen
Endermen can pick up melon blocks and will drop them upon death without breaking them into melon slices.

Trading
Farmers will buy 7–12 melons for an emerald.

Trivia

 * Any stem adjacent to a melon block will appear to be connected to it, even if the melon was not grown from that stem.
 * Due to this, if a melon block generates between two stems, it will connect to both of them. Pumpkins also do this, although they will not connect to plants of different species.