Cave



A cave (also known as a cavern) is a common terrain feature that generates in the Overworld and the Nether. Caves are usually found underground. They are open spaces of various sizes and shapes that often intersect with each another or with different generated structures, creating vast cave systems. They feature an abundance of ores, as well as hostile mobs that spawn in the darkness.

Generation
Caves are underground structures consisting of randomly generated cavities of air, water or lava, hollowing out an area and exposing other blocks generated with the terrain (such as stones and ore blobs) in the interior. Their structure typically consists of a series of irregular tunnels branching off and winding in other directions, which may connect to the surface, creating natural entrances to the cave. In jungle biomes, vines generate in caves near the surface. Sand often falls into caves generated near the surface of a desert or beach; craters in the sand can alert the player to caves below the surface. Caves cannot cut through red sand nor snow blocks, despite these generating as a surface block in several biomes.

Caves generate at any altitude up to Y-level 256, and may span from the surface all the way to the bedrock at Y-level -59. They frequently intersect natural structures such as other caves, dungeons, ravines, and mineshafts. Because of low light levels, hostile mobs and certain animals like bats and glow squid (only in water) often spawn in caves.

Structure
Caves come in two types: carvers and noise caves.

Small cave
Small caves are primarily located close to sea level and are unlikely to be linked to other caves. Because of their relative shallowness, they are unlikely to contain anything rarer than small deposits of basic ores such as coal, iron and copper. Such caves may have multiple entrances that are naturally lit by sunlight or moonlight. These type of caves almost always feature pools of water/lava within, likely caused by the generation of the water itself.

Medium cave


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

Large cave


These are large subterranean systems, found deep within the overworld. They tend to hold smaller deposits of more common ores and larger deposits of rarer ones such as gold and diamonds, but generally expose more ores overall. Such systems contain a number of lakes of all types, as well as the presence of major lava and water flows.

There is little to no difference between small, medium, and large caves other than their size and complexity.

Mega cave
Mega caves are huge spacious caves that are extremely rare to find. They expose many ores and can potentially expose much of a mineshaft. Unlike large caves, mega caves can range from 20 blocks and above in length. They can also be possibly bigger than a small ravine. Mega caves that generate low enough can form giant lava oceans.

Circular voids


During the terrain generation process, large symmetrical and cylindrical or spherical voids of various sizes can infrequently be created underground, which often merge with other cave systems. These unusual type of caves vary from roughly 1 to 27 blocks in height, and from roughly 13 to 30 blocks in diameter, though larger examples are quite rare. Although not particularly of interest, from a mining perspective, they may appear unnaturally regular 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 large ravine.

Deep pit


These caves have a large hole for an entrance and then spiral down, often cutting into coal, iron and copper deposits. Sometimes, these entrances can go nearly straight down, exposing rarer minerals.

Connected cavern


Connected caverns are large, spacious caverns that is usually the result when multiple small caves merge with each other creating a large, messy, single cave. They are similar to large caves except more messy and spacious, with different layers. These connected caverns usually have waterfalls or lavafalls coming out of the cave ceiling, sometimes even both. They also have different "floor layers", meaning the cave has different stone layers that can be accessed to each other in the same connected cavern, simply by stacking up blocks. Connected caves usually have two to four layers. Usually, small regular cave systems nearby eventually connect to a connected cavern. Caves may connect to a connected cavern from any direction, including from above. Connected caverns are not significantly rare, but can still prove to be a small challenge to find.

Sea-access cave


Sea-access caves are fundamentally underwater entrances to caves connected to the sea. They generate exclusively on ocean biomes. Even when caves usually generate specifically to avoid water, sea-access caves appear regularly, and are quite often small entrances with seagrass, and kelp if they can generate exposed to the sky. Sometimes, pseudo-sea-access caves are formed by gravel blocks collapsing inside a cave.

Underwater caves


Underwater caves are completely flooded caves that may have magma blocks. They are more likely to generate in ocean biomes.

Being completely underwater, only the magma blocks provide any air for entities to breathe, since they generate bubble columns. They have often seagrass, but since they don't generate exposed to sky kelp cannot generate, unlike sea-access caves.

Noise caves
Noise caves are generated using a noise generator. They come in the form of cheese caves, spaghetti caves, and aquifers. By adjusting noise frequency, hollowness (for cheese caves), and thickness (for spaghetti caves, noodle caves, and noise pillars), noise caves can vary in extremely diverse ways. When generating noise caves, the game firstly generates a random noise field, and "smudges" it using a mathematical trick called Perlin noise. These processes then results in a 3D noise image. Noise pillars also generate inside cave blobs.

Cheese cave
Cheese caves are pocket areas of the underground that come in various sizes. Cheese caves offer large and open spaces, being the largest cave type on the game. They frequently generate noise pillars, and expose many ores. When generating, the black part of noise image becomes stone or deepslate, and white part becomes air, making it resemble a cheese with many holes.

Spaghetti cave
Spaghetti caves are long, narrow caves that wind their way through the underground and are a bit similar to small or medium carver caves, but longer. They provide a connection system between carvers and cheese caves, consequently connecting caves that otherwise would be separated. When generating, the edge of black and white part of noise image becomes air, making it look like long and wide spaghetti.

Noodle cave
Noodle caves are a thinner and squigglier variant of spaghetti caves. They consist of tunnels 1 to 5 blocks in width. Similar to spaghetti caves, they provide a connection between other cave types. When generating, the edge of black and white part of noise image becomes air, making it look like long and thin noodles.

Aquifer
Aquifers are flooded cave systems used to generate bodies of liquids in noise caves. Aquifers may create underground lakes. Magma blocks may appear at the bottom of aquifers, creating bubble columns. Because they are filled with water instead of air, aquifers often contain ores that generate with reduced or no air exposure like coal or diamonds. Glow squids are common in aquifers below Y=30, and tropical fish may spawn in any aquifers found in lush caves. Aquifers below Y=0 may generate filled with lava instead of water. The color of water in an aquifer depends on the biome containing it.

Lava lakes


These are simiar to old water lakes in generation. Blocks of stone usually generate around these. Lava lakes generate above Y layer 0.

Lava oceans


Similarly to how water oceans replace all air blocks below a certain altitude on the surface, when deep enough in a cave, all air blocks from y=-55 to -63 that would generate as air instead generate as lava.

Dripstone Caves
A dripstone cave is an underground Overworld biome that features a landscape filled with stalagmites and stalactites, as well as giant versions of them, as well as blocks of dripstone littering the ground. Small sources of water can be found on the floor. Drowned can spawn here in aquifers.

Lush Caves
A lush cave is an underground Overworld biome that is filled with unique flora, vines covering the roof, and clay pools of water on the bottom. This biome can be found underground below azalea trees. axolotls, glow squids, and tropical fish can spawn here.