Cave



Caverns, tunnels, or caves are commonly-found cavities in the stone layer of a map.

Overview
Many caverns have tunnels branching off and winding in other directions, some of which connect to the surface of the map creating natural entrances to the cavern (and some of which lead to dead ends). Caverns can be quite deep, extending from the surface all the way to the bedrock layer. These caverns are randomly generated so two of them will almost never look exactly alike. They can sometimes be attached to natural dungeons. The maximum altitude a cavern can generate is layer 128, often exposing it to the surface.

Caverns usually contain at least one type of exposed ore block. Hostile mobs often spawn in naturally occurring caverns because of its low light level. Exposed cave systems are most often found in mountain biomes.

Classification of caverns
A cavern can be classified into the following kinds of cave systems.

Trench
If a cavern generates high enough, it can remove some of the dirt and grass blocks while not being completely submerged, forming a "ditch" or "trench" type formation. A similar effect can be seen when a river biome generates above sea layer, leaving no water and a trench-erous trench.

Small cavern


Small caverns are primarily located close to sea level and are unlikely to be linked with other caverns. They frequently contain small deposits of basic ores such as coal and iron whilst seldom possessing rarer materials. Such caverns may have multiple entrances which are naturally lit. This type of cave also commonly has a pool of water in it, likely caused by the generation of the water itself.

Medium cave


Medium-sized cave systems are commonly found within reach of other, often smaller, bountiful caverns which are accessible via mining. These caverns frequently contain large deposits of basic ores alongside small repositories of rarer materials - including Lapis Lazuli and Gold. Splatter caves also regularly contain, at the very least, minor water or lava flows as well as the presence of small dungeons.

Large cave


Large subterranean systems, found deep within the earth close to the bedrock, hold large deposits of essentially every known type of ore - with rarer materials, such as Diamond, being found, like everywhere else, in less frequent deposits than more common materials. Such systems contain a number of large lakes as well as the presence of major lava flows.

Circular rooms


During the terrain generation process, large symmetrical and cylindrical chambers of various sizes can infrequently be created underground which often merge with other cave systems. These "rooms" vary from roughly 5 to 22 blocks in height, and from roughly 11 to over 30 blocks in width and/or length, though the latter is quite rare. Although not particularly of interest, from a mining perspective, they may appear unnatural and irregular in comparison to the surrounding terrain. While the smallest rarely contain many ores, the largest can be quite useful for mining as their sheer surface area rivals that of a medium-large ravine. Medium and large circular rooms may be used for growing Huge Mushrooms with little or no modification. Very rarely, a dungeon can be found in these rooms.

Ravine


These are natural formations of stone and gravel that can cross a big part of an island. It's rather deep, and sometimes can connect with any kind of cave, even with dungeons and sometimes abandoned mine shafts or, much rarer, strongholds. In the ravine, fair amounts of coal and iron ore can be found. Due to the fact the ravines are fairly deep drops, gold and diamond can be found.

Deep cliff


A deep cavern sometimes goes down onto bedrock. This formation is not to be confused with a ravine, although they can be quite similar. These caverns are usually not linked to other caverns and don't have large amounts of minerals in them. Dungeons usually aren't linked to them because they are generated almost straight down and the bottom is often in full sunlight. This makes it hard for hostile mobs to spawn there.

Giant entrance


These caverns have a large hole for an entrance and then often spiral down, containing materials like coal and iron. Rarely, these entrances can go nearly straight down, exposing rare minerals like gold and lapis lazuli.

Sea-access cave


These caves are often connected with the sea, and can be accessed from the sea. These act like a horizontal underwater giant entrance to a splatter cave that often contains lava, allowing them to be seen from the surface of the ocean.

Lava lakes
Most often found in large caves far underground, lava lakes are believed to have the most valuable materials near them; however, there is no proof that ores appear more around them. A lava lake can even cut through a vein of ore and reduce the amount of ore in the vein. However, if you have a bucket of water on hand, this can be a great way to obtain obsidian.

Water lakes


Found in every part of the world, water lakes are by far the most common lake. Water lakes occur on the surface, a mere 1-20 blocks below the surface, and from then on to bedrock.

Trivia

 * Sand and sandstone, as well as generated structures, can overwrite caves.
 * In jungle biomes, vines generate in caves near the surface.
 * Though ores are abundant in caverns and often require little digging to get to, ore veins visible in the walls of the cavern often contain little ore, as the cavern cut through them when it was generated.
 * Sand often will fall into caverns generated near the surface of a desert or beach and so craters in a desert will alert the player to caves below the surface.
 * Rarely, near-surface caves can be generated with a grass (later turning to dirt with the darkness) floor. These are not real caves, but rather "closed-over overhangs", generated only in Extreme Hills. These are technically inverted floating islands.
 * Ambience noises can be caused by dark caves.