A mineral vein is a terrain feature consisting of a natural deposit of ores or other blocks in the ground.
List
The Overworld
| Block | Spawn size | Spawn tries | Minimum height | Maximum height | Biomes |
|---|---|---|---|---|---|
| Dirt | 33 | 10 | 0 | 256 | All |
| Gravel | 33 | 8 | 0 | 256 | All |
| Granite | 33 | 10 | 0 | 80 | All |
| Diorite | 33 | 10 | 0 | 80 | All |
| Andesite | 33 | 10 | 0 | 80 | All |
| Coal Ore | 17 | 20 | 0 | 128 | All |
| Iron Ore | 9 | 20 | 0 | 64 | All |
| Redstone Ore | 8 | 8 | 0 | 16 | All |
| Lapis Lazuli Ore | 7 | 1 | 16[note 1] | 16[note 1] | All |
| Gold Ore | 9 | 2 | 0 | 32 | All |
| Diamond Ore | 8 | 1 | 0 | 16 | All |
| Emerald Ore | 1 | 11 | 4 | 28 | Gravelly Mountains Gravelly Mountains+ Mountains Mountain Edge Wooded Mountains |
| Gold Ore[note 2] | 9 | 20 | 32 | 80 | Badlands Badlands Plateau Eroded Badlands Modified Badlands Plateau Modified Wooded Badlands Plateau Wooded Badlands Plateau |
| Infested Stone | 9 | 7 | 0 | 64 | Gravelly Mountains Gravelly Mountains+ Mountains Mountain Edge Wooded Mountains |
- ↑ a b The Lapis Lazuli distribution follows its own rules : instead of a minimum and a maximum height, it is based on a center height and a spread value. By default, these values are set to 16, meaning that Lapis Lazuli can generate within levels 0 to 32, mostly around level 16; i.e. a periodic gaussian distribution.
- ↑ This is the extra rolls for gold ore in badlands biomes.
The Nether
| Block | Spawn size | Spawn tries | Minimum height | Maximum height | Biomes |
|---|---|---|---|---|---|
| Magma Block | 33 | 4 | 0 | [more information needed] | All |
| Nether Quartz Ore | 14 | 16 | 10 | 128 | All |
Generation
Players can come across these veins in caverns or anywhere where there is natural stone. Underground deposits of dirt and gravel are generated in this step, followed by the more precious ores: coal, iron, gold, redstone, diamond, emerald (in mountains biomes) and lapis lazuli. They can form only in stone, andesite, diorite and granite (also in their polished variants, replacing parts of structures, and do not replace each other or any other block. Note that two or more mineral veins can form next to each other and make it look like a mineral vein made of more than one material.
The generation of ore veins utilizes 32-bit floating-point numbers, rather than 64-bit. While this does not cause issues within the vanilla bounds of the game, if the player were to generate terrain between 2^26 and 2^27 blocks, generation of ore veins would lose precision in such a way that would cause millions of chunks to attempt to load, resulting in a game crash.[1]
History
Gallery
- MultipleOreVeins.png
Multiple ores generated above an underground lava lake.
A coal vein generated underwater.
- Oreveinmultiples.png
Multiple ore veins in a cave. Diamond ore and redstone ore as well as coal ore and gold ore are visible in the distance.

