Ocean Ruins

Ocean ruins or underwater ruins are oceanic structures primarily composed of stone bricks or sandstone. They come in many different sizes varying from large villages to single ruined huts. They are rare, and have cold and warm variants.

Generation
Cold ocean ruins generate in normal, cold, and frozen ocean biomes, as well as their deep variants. They are composed of stone materials.

Warm ocean ruins generate in warm, lukewarm, and deep lukewarm ocean biomes, and are composed of sandstone and stone materials.

Although most ocean ruins generate underwater, they sometimes generate on land.

30% of ocean ruins generate as large ocean ruins; the other 70% generate as small ruins. If the ocean ruin is large, there is a 90% chance for 4-8 (inclusive) small ocean ruins to generate around it in a cluster. If the ocean ruin is warm, large ocean ruins generate with a structure integrity of 0.9 and small ocean ruins generate with a structure integrity of 0.8. If the ocean ruin is cold, the "brick" variant of the chosen structure type generates with a structure integrity of 0.9 if large and 0.8 if small. The "cracked" variant generates with a structure integrity of 0.7, and the "mossy" variant generates with a structure integrity of 0.5, both regardless of size. Reduced structure integrity may also remove drowned and loot chests from the structures.

During generation, all air blocks and structure blocks act as structure voids.

Structure
The shape and size of ocean ruins varies greatly, and they often generate together in groups to create ruined villages.

All but two of the structures contain a loot chest with loot inside. The chest contains loot for specifically either a small or large sized ocean ruin structure and may be buried by some sort of material such as gravel and sand.

Cold ocean ruins are primarily composed of stone bricks and gravel, and also contain prismarine, sand, magma blocks, sea lanterns, polished granite, glazed terracotta, bricks, planks, cobblestone, mossy cobblestone, stone brick stairs, obsidian, and/or a chest with loot in it. Warm ocean ruins are primarily composed of sand and sandstone, and also contain polished granite, polished diorite, sea lanterns, magma blocks, gravel, terracotta, sandstone stairs, and/or a loot chest.

Many of the structures spawn with drowned (usually 1–2, though a few structures have 3 or 4).

Note that natural ocean ruins generate following the rules above and may not exactly match the stored structures.

Each structure below is located in the folder client.jar/data/minecraft/structures/underwater_ruin. The following is an incomplete table of the structures with their filenames, descriptions and what they consist of:

Trivia

 * In the Bedrock Edition, the loot chest of ocean ruins generates waterlogged as well as having a water block above it. This can be seen in the image on the right. It is unknown whether it is intentional that water is part of the ruin's structure.
 * In the Java Edition though, this is not the case, according to the second picture.