Fossil

A fossil is a rarely-occurring skeletal structure composed of bone blocks, coal ore, or diamond ore.

Generation
Fossils randomly generate within y-coordinates 0 to 320 or -63 to -8 underground, but only in desert and swamp biomes. Each chunk has a $1/64$ chance to generate a fossil. They may generate as one of the four variants of skull or one of the four variants of spine.

Fossils first generate the pure-bone block fossil with a structure integrity of 0.9, meaning 10% of blocks are replaced by structure voids, leaving 90% bone blocks. Next, the coal fossil generates with a structure integrity of 0.1, with 90% of the fossil blocks are replaced by voids, leaving 10% coal. The locations of coal blocks do not always correspond with the voids generated in the bone fossil, so the resulting combination of both generations combine to make an incomplete fossil structure composed of bone blocks, coal, and structure voids.

As of 1.18, there are two types of fossils, each having a $1/64$ chance to generate per chunk. One fossil generates with coal ore between levels 0 and 320. Another with diamond ore rather than coal ore generates from level -63 to -8.

Structure
Naturally-generated fossils are composed of a mix of bone blocks, coal or diamond ores, and structure voids, as detailed above. They are made with the NBT structure block format and have NBT files for each type of fossil located in the folder minecraft.jar/data/minecraft/structures/fossil.

There are 4 type of skulls and 4 type of spines.

Trivia

 * Hidden in the structure NBT is data that credits ProfMobius with the creation of the fossils.