Ruined Portal

Ruined portals are naturally generated damaged nether portals, which spawn in both the Nether and the Overworld.

Generation
Ruined portals generate in all biomes in both the Nether and the Overworld. They can spawn underground, underwater, or exposed to the air. If they generate underground, they will have air pockets around them. Natural terrain around ruined portals generates as netherrack. They will also generate a mass of netherrack underneath them.

Ruined portals that generate underground will generate at Y-level from 15 to, where is the highest block at the point of generation and  is the height of the ruined portal structure. This means the terrain will be higher, or at least level with the top of the structure.

Ruined portals that generate in mountains generate at y-level from 70 to.

Ruined portals that generate partially buried will generate at y-level, plus a random integer from 2 to 8. This means the structure will have 2 to 8 layers raised above the surface.

In the Nether, ruined portals with air pockets will generate from Y-level 32 to 100. Ruined portals without air pockets have a 50% chance to spawn from Y-level 27 to 29, and a 50% chance to spawn from Y-level 29 to 100.

Many blocks in ruined portals will be replaced upon generation. A ruined portal is in a "cold" biome if the temperature is less than 0.15.

Structure
Ruined portals generate incomplete portal frames composed of both obsidian and crying obsidian, despite crying obsidian not being a valid portal material (likely to give the portals an "aged" appearance). Some frames generate flat on the ground, as if they toppled over.

Ruined portals generate with a chest, which contain various golden items and items used to build portals such as obsidian and flint and steel.

A ruined portal generated in the Overworld is surrounded with structures made of stone, stone bricks, and iron bars; in the Nether it is surrounded by blackstone variants and chains.

If a ruined portal generates underwater, it may create downward bubble columns with nearby magma blocks.

Currently there are 13 variants: 10 normal size portals and 3 giant portals in varying states of decay.

Ruined portals can be generated by the player by loading  or   with a structure block

Portals
Note that some blocks will be replaced with others upon generation. A full list can be seen above.

Trivia

 * Using the partially buried generation, some ruined portal variants are short enough that they can generate completely on the surface.
 * Ruined portals are the only generated structure that can be found in two dimensions.