Описание

## **`[DCME]`** Dynamic Contextual Music Engine
DCME replaces Minecraft's vanilla music system with a fully dynamic, context-aware soundtrack. Music adapts in real time to what you're doing: exploring, fighting, caving, facing a boss, or watching the credits roll.
---
### Important: Resource Pack Required
DCME is a music engine and does not include music tracks. You need a compatible resource pack to hear music in-game. Search for **`[DCME]`** on CurseForge or Modrinth to find community-made soundtracks.
If you create a music pack, add **`[DCME]`** to your project title so users can find it.
---
### Contextual Music
The mod evaluates dozens of conditions every second and plays the right music for the moment:
- **Overworld** - Day, night, dawn, and dusk each have their own soundtrack
- **Weather** - Rain triggers a dedicated atmosphere
- **Underground** - Caves and the Deep Dark get unique music
- **Dimensions** - Nether and The End have distinct soundscapes
- **Combat (PVE)** - Dynamic music kicks in when hostile mobs target you
- **Combat (PVP)** - Music triggers for both attacker and victim, with team protection and configurable timeout
- **Bosses** - Wither, Ender Dragon, and Elder Guardian each have dedicated boss themes
- **Screens** - Main menu and credits have their own music
### Smooth Transitions
- **3 transition modes** - Crossfade (simultaneous fade), Gap (silence between tracks), or Hybrid (crossfade within same group, gap between groups)
- **Combat overlay** - Base music fades to near-silence while combat plays, then resumes where it left off
- **Boss fights** - Base music is released during long boss encounters to free resources
- **Dimension transitions** - Audio state resets cleanly when entering portals
- **End-of-track fade** - Tracks fade out gracefully near the end instead of stopping abruptly
### PVP Combat Detection
DCME tracks player-vs-player combat server-side. When a player hits another player, both receive the PVP combat music signal.
- Bidirectional - both players get combat music
- Team protection - players on the same scoreboard team won't trigger PVP music against each other
- Configurable timeout - music stays active for a configurable duration after the last hit (default: 5s)
### Play Once (Smart Groups)
Contexts can finish their current track before transitioning, but only within the same group. Changing dimension or going from surface to underground always crossfades immediately.
Groups: `overworld_surface`, `overworld_underground`, `nether`, `end`, `screen`, `combat`, `boss`
### Configuration
- **JSON config** at `config/dcme.json` - master volume, fade durations, gap between tracks, combat radius, PVP timeout, team protection, per-context toggles, and more
- **In-game config screen** via Mod Menu - toggle every context on/off, adjust PVP settings, and change transition modes without editing files
- **Per-context overrides** - each context can define its own volume, fade times, and gap duration
### 100% Customizable via Resource Packs
- Replace tracks - swap any OGG file via a resource pack
- Add new contexts - create JSON files to define new music triggers
- Override existing contexts - replace any default context with your own
- Custom conditions - biome, dimension, time of day, weather, altitude, sky light, combat, boss, structure, season, advancement, and more
See the included example resource pack and datapack for a complete guide.
### Config Folder Overrides
Drop context JSONs into `config/dcme/contexts/` to override any context without a resource pack. Highest priority - overrides both defaults and resource packs.
### Third-Party Music Blocking
DCME blocks other mods from playing their own music to prevent conflicts. Configurable per-namespace in `config/dcme.json`. Jukebox music is never blocked.
---
### Context Priority System
Context | Priority | Layer | Group
---|---|---|---
Ender Dragon | 100 | Override | boss
Wither | 95 | Override | boss
Elder Guardian | 90 | Override | boss
Combat (Warden) | 85 | Override | combat
Combat (Generic) | 80 | Override | combat
Credits | 70 | Base | screen
Menu | 60 | Base | screen
Deep Dark | 50 | Base | overworld_underground
Underground | 40 | Base | overworld_underground
Rain | 38 | Base | overworld_surface
Dawn | 22 | Base | overworld_surface
Dusk | 22 | Base | overworld_surface
Night | 20 | Base | overworld_surface
Day / Nether / End | 10 | Base | (varies)
---
### Compatible with
- Mod Menu - for in-game config screen
- Serene Seasons / Fabric Seasons - season-based music
- Sound Physics Remastered, AmbientSounds
- PartyAddon and any team mod using scoreboard teams
---
Used in the [Legends Reborn: Medieval](https://www.curseforge.com/minecraft/modpacks/legends-reborn-medieval) modpack.