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.

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 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