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 have an equal chance to generate as any of the four variants of skull or four variants of spine.

Fossils first generate the pure-bone layer with a structure integrity of 0.9, meaning 10% of the bone blocks are replaced by structure voids, leaving 90% bone blocks. Next, the ore layer generates with a structure integrity of 0.1, replacing 10% of the existing fossil with coal ore for fossils that generate above Y level 0, or deepslate diamond ore for fossils that generate below Y level -8. The locations of these ore blocks do not always correspond with the voids generated in the initial bone fossil, so the resulting combination of both generations will usually result in an incomplete fossil structure composed of bone blocks, coal, and structure voids.

Note that structure voids are only used during initial world generation, and will be replaced with whatever block happens to naturally generate in that spot.

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.