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.

Ruined portals that generate underground will generate at y-level from 15 to (inclusive), 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 (inclusive).

Ruined portals that generate partially buried will generate at y-level (inclusive), 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 at y-level 32 – 100 (inclusive). Ruined portals without air pockets have a 50% chance to spawn at y-level 27 – 29 (inclusive), and a 50% chance to spawn at y-level 29 – 100 (inclusive).

In cold biomes (biomes with a temperature less than 0.15), all lava in ruined portals will be replaced with netherrack. On ocean floors, all lava will be replaced with magma blocks.

Structure
Ruined portals generate incomplete portal frames composed of both obsidian and crying obsidian, despite the latter 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, in addition to a few other things, like obsidian.

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