Since Java Edition 1.18 (2021), Minecraft's caves come from noise: smooth random numbers, one for every block. Mojang's release notes name them: cheese caves, "like the holes in swiss cheese", are where one number dips low. Spaghetti caves are "long squiggly tunnels", and they take two numbers.
Henrik Kniberg, who worked on Minecraft's world generation, explains the tunnels flat: on a picture of the noise, the border between light and dark is air, a winding line. But in his words, "it is slightly different in 3d". In 3D, the border of a blob is a skin, so one number near zero only makes thin sheets. In the game's own files (1.18), every spaghetti tunnel asks two noises, spaghetti_3d_1 and spaghetti_3d_2, and a block is air only where both are near zero: within about 0.0765. Two sheets cross in a line, and the line is a tunnel. Noodle caves use the same trick on two finer noises, and the old cave carvers and canyons still dig through it all.
The world in this film is our own simplified version, built in code block by block: our own noise, with the game's rule shapes and its 0.0765 width. Kniberg's lines are from his video "Minecraft terrain generation in a nutshell" (2022): "i still get surprised quite often by the caves i find".
Which game's world should we cut open next?
Sources: Henrik Kniberg, "Minecraft terrain generation in a nutshell" (video, February 6, 2022). Mojang, Minecraft Java Edition 1.18 release notes (November 30, 2021). Minecraft Java Edition 1.18 game code and 1.18.2 worldgen data (entrances.json).
Not an official Minecraft video. Not approved by or associated with Mojang or Microsoft.
Sounds: Apple iMovie sound effects.
