Melon

Melons are fruit blocks which grow from fully grown melon seeds.

Natural generation
Melons are naturally commonly generated in jungle biomes, in savanna villages and inside tillage rooms of woodland mansions.

Obtaining
"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."

- Tom Stone

Melons can be harvested using any tool or by hand. Axes, followed by swords, are the fastest tools for harvesting melons.

A melon drops 3–7 melon slices when broken by hand, using tools, or by the movement of a piston.

Farming
Melon seeds can be planted, placing a small stem that grows over time. Once the stem reaches maturity, it attempts 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 produced to a melon, that stem does not produce any further melons until the existing melon is harvested. Melon stems connect only to the melons they produce. For example, if stem A generates a melon adjacent to stem B, stem B does not connect and can still produce another melon. Similarly, if a melon is placed adjacent to stem B, stem B would still be able to produce another melon. The same principle applies for pumpkins.

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

Trading
In Java Edition, villagers who are journeymen farmers buy 4 melons for an emerald.

Composting
Placing a melon into a composter has a 65% chance of raising the compost level by 1.

ID
Java Edition:

Bedrock Edition:

Trivia

 * Any stem adjacent to a melon block appears 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 connects to both of them. Pumpkins also do this, although they do not connect to plants of different species.