Ambience

Ambience (also called ambience sounds or ambient sounds) are sounds that can be heard in specific conditions. They were created by C418 and Samuel Åberg. Currently, there are 167 different ambience sounds.

Ambience is divided into groups of ambience sounds that play under same condition/s. Currently, there are "cave", "underwater" and "Nether" ambiences.

The volume of ambient sounds can be changed individually through "Music & Sounds" in the Options menu by changing the "Ambient/Environment" bar. However, this also affects the sounds of firework rockets and such.

All ambience can be played using the command. All ambiences' code names start with 'ambient. '.

''Note that the player needs to put into the command more variables than just the name of the sounds. See playsound for more info.''

Cave ambience
Cave ambience (also known as cave sounds, or eerie noises according to the subtitles) are sounds that occasionally play when the player is underground or in a dark area, based on the mood algorithm.

Cave ambience sounds can play in all biomes except the Nether biomes, as long as there is a cave or a dark enough area present.

The code name for cave ambience is ambient.cave. There are 19 different cave ambience sounds in total.

Underwater ambience
Underwater ambience plays while the player's head is underwater. There are 22 different underwater ambience sounds in total.

They can be heard within a body of water of any size and in any dimension.

Underwater ambience is divided into two groups: "Loop" and "Loop Additions". Both of these play independently of each other while player is underwater. Additionally, "Loop Additions" are divided into 3 more groups.

Its code name is 'ambient.underwater. '

Nether ambience
Nether ambience plays while the player is in the Nether. Each biome has its own unique ambience. There are 126 different nether ambience sounds in total.

Nether ambience is divided into three groups: "Loop", "Loop Additions", and "Mood", all of which play independently of each other while the player is in the Nether.

Its code name is 'ambient. . '

Mood algorithm
Mood ambience sounds occur based on a "mood" percent value between 0–100. The mood increases when the player is in a cave or in a dark place, and decreases otherwise. When the mood reaches 100%, one of the sounds plays randomly, resetting the mood to 0% and thus restarting the cycle. The darker it is, and the more non-transparent blocks there are, the quicker the mood increases. $$, the current mood value appears on the debug screen.

This is the simplified algorithm for computing this value in pseudocode: updateMood(mood): tickDelay = 6000 maxLightLevel = 15 block = select a random block in a 17×17×17 block cube centered around the player skyLight = block.getSkyLightLevel

if (skyLight > 0): mood = mood - (skyLight / maxLightLevel) * 0.015 else: blockLight = block.getBlockLightLevel mood = mood - (blockLight - 1) / tickDelay if (mood ≥ 1.0): player.playSpookySound mood = 0.0 else if (mood < 0): mood = 0.0

This method is called once every tick. It selects a random block in a 17×17×17 area centered around the player's eye position, and alters the mood value accordingly:
 * If the selected block has sky light, it decreases the mood by $1/1000$ per sky light level.
 * If it has a block light level above 1, it decreases the mood value by $(block light level - 1)/6000$.
 * If the block light level is 0, it increases the mood value by $1/6000$.

This means that if you are in complete darkness and there are no lit blocks around you, an ambient noise will play every 6000 ticks (5 minutes).

Since non-transparent blocks are considered to have a sky and block light level of 0, the mood value increases especially fast if you're in a cave.

Trivia



 * When "Cave 14" is viewed in a spectrogram, it appears to show the face of a creeper.
 * Cave ambience is the only ambience that has subtitles.
 * "Warped Forest Additions 1-5" are a mix of vanilla Enderman sounds and those of the Enderman from Minecraft Dungeons.
 * "Warped Forest Addition 6" is actually the sound of an enderman screaming, slowed down, and in reverse.
 * "Warped Forest Mood 9" is actually a slowed-down and reverberated idle sound of the witch.
 * Since the End doesn't have its own set of ambient noises yet, it borrows the mood-based cave noises from the Overworld.
 * "Dark 4" is a slowed and pitched down scream of a Ghast.