promotional bannermobile promotional banner

[DCME] Dynamic Contextual Music Engine

Replaces vanilla music with a dynamic soundtrack that reacts to biomes, time of day, weather, battles, bosses, structures, etc. Fully customizable via resource packs and JSON; no programming required

File Details

dcme-example-datapack

  • R
  • Apr 30, 2026
  • 3.90 KB
  • 0
  • 1.20.3
  • Fabric

File Name

dcme-example-datapack.zip

Supported Versions

  • 1.20.3

Curse Maven Snippet

Fabric

modImplementation "curse.maven:dcme-dynamic-contextual-music-engine-1460839:8015754"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

DCME - Example Biome Tag Datapack

This datapack shows how to extend DCME's biome detection to support additional modded biomes.


Datapack vs Resource Pack — What Goes Where?

DCME uses two systems that live in different places:

Content Location Format
Biome tags (data/) Datapack or mod JAR data/dcme/tags/worldgen/biome/*.json
Music contexts (assets/) Resource pack or mod JAR assets/dcme/music_contexts/*.json
Sound events (assets/) Resource pack or mod JAR assets/dcme/sounds.json
OGG files (assets/) Resource pack or mod JAR assets/dcme/sounds/**/*.ogg

Minecraft enforces this separation:
- data/ = server-side logic (biome tags, recipes, loot tables) → datapacks
- assets/ = client-side content (sounds, textures, contexts) → resource packs

A resource pack cannot provide data/ files, and a datapack cannot provide assets/ files.


What This Datapack Does

DCME decides which music to play based on biome tags. For example, the underground music context checks if the player is in a biome listed in #dcme:underground.

The mod already includes support for:
- Vanilla: lush_caves, dripstone_caves, deep_dark
- Terralith: 11 cave biomes (andesite_caves, frostfire_caves, etc.)
- Biomes O' Plenty: glowing_grotto, spider_nest
- BigGlobe: #bigglobe:underground

This datapack lets you add more biomes to those tags without touching the mod JAR.


Installation

  1. Copy the dcme-example-datapack folder (or zip it) into:
    - Singleplayer: .minecraft/saves/<world>/datapacks/
    - Server: <server>/world/datapacks/
  2. Run /reload in-game or restart the server
  3. Verify with: /datapack list enabled

How It Works

"replace": false (Important!)

{
  "replace": false,
  "values": [...]
}

This merges your entries with DCME's built-in tags. If you set "replace": true, you would delete all of DCME's default entries and only keep yours — don't do that unless you know what you're doing.

"required": false (Important!)

{ "id": "mymod:crystal_caves", "required": false }

This tells Minecraft: "if this biome doesn't exist (mod not installed), ignore it silently." Without "required": false, the game would crash if the biome mod isn't loaded.

Always use "required": false for modded biomes.


Finding Biome IDs

To find the exact biome ID of a modded biome:

  1. F3 debug screen: Stand in the biome, press F3 — the biome ID is shown on the left side
  2. Command: /locate biome <tab> — auto-completes all registered biomes
  3. Mod wiki/source: Check the mod's documentation for biome IDs

Common namespace patterns:
- Vanilla: minecraft:lush_caves
- Biomes O' Plenty: biomesoplenty:bayou
- Terralith: terralith:cave/fungal_caves
- Oh The Biomes You'll Go: byg:howling_peaks
- Regions Unexplored: regions_unexplored:bioshroom_caves
- BigGlobe: bigglobe:deep_dark

You can also reference biome tags from other mods using #:

{ "id": "#somemod:is_underground", "required": false }

Available Tags

DCME uses two biome tags:

data/dcme/tags/worldgen/biome/underground.json

Biomes that trigger cave/underground music (overworld_underground context, priority 40).

Add any modded cave or underground biome here.

data/dcme/tags/worldgen/biome/deep_dark.json

Biomes that trigger deep dark music (deep_dark context, priority 50 — overrides underground).

Add any modded deep dark variant or similar eerie underground biome here.


Examples

Adding Regions Unexplored cave biomes:

data/dcme/tags/worldgen/biome/underground.json:

{
  "replace": false,
  "values": [
    { "id": "regions_unexplored:bioshroom_caves", "required": false },
    { "id": "regions_unexplored:redstone_caves", "required": false },
    { "id": "regions_unexplored:scorching_caves", "required": false }
  ]
}

Adding a modded biome to deep dark:

data/dcme/tags/worldgen/biome/deep_dark.json:

{
  "replace": false,
  "values": [
    { "id": "myhorrormod:abyssal_depths", "required": false }
  ]
}

Using another mod's biome tag:

data/dcme/tags/worldgen/biome/underground.json:

{
  "replace": false,
  "values": [
    { "id": "#terralith:all_cave_biomes", "required": false }
  ]
}

Combining With a Resource Pack

For full customization, use both:

  1. Datapack — Add modded biomes to DCME's tags (this file)
  2. Resource pack — Create new music contexts that target those biomes specifically

Example: You add mymod:crystal_caves to #dcme:underground via datapack, so it gets the default cave music. But you also create a resource pack with a dedicated crystal_caves.json context at priority 45 (above underground's 40) with custom crystal-themed music.


Folder Structure

dcme-example-datapack/
├── pack.mcmeta
├── README.md
└── data/
    └── dcme/
        └── tags/
            └── worldgen/
                └── biome/
                    ├── underground.json    ← Add cave biomes here
                    └── deep_dark.json      ← Add deep dark variants here

Tips

  • Use /locate biome + Tab to discover all registered biome IDs in your modpack
  • Always test with F3 to confirm you're in the expected biome
  • Set "debugLogging": true in config/dcme.json to see which context is active
  • Multiple datapacks can extend the same tag — they all merge together
  • Datapack changes require /reload, resource pack changes require F3+T