Battle Music Crescendo
Minecraft 1.21.x · 客户端自适应战斗音乐 · 自定义音乐包 · 游戏内编辑器 · 可选服务器同步 · 支持 Mob Battle Music 包格式
作者: MickDev
这个模组实际做了什么(底层原理)
Battle Music Crescendo 并不是单一的循环曲目。它每秒都会:
- 扫描你周围的整个世界(敌对生物、Boss、PvP、生命值、生物群系、结构)。
- 评分战斗强度并选择一个情绪状态(探索 → 紧张 → 战斗 → 激烈 → Boss → PvP → 极度危险)。
- 解决优先级,确保真正的危险总是优先于环境氛围音乐。
- 选择来自已启用音乐包的最佳匹配曲目(基于 JSON 规则和条件)。
- 在曲目之间进行交叉淡入淡出,可配置淡入/淡出时间。
- 在你的自定义音乐播放时静音原版 Minecraft 音乐(可选)。
- 战斗结束时播放胜利音效(可选)。
所有音频仅在你的客户端上运行。其他玩家听到的是他们自己的音乐(或原版音乐)。服务器不需要你的 .ogg 文件。
功能一览
| 功能 |
详情 |
| 曲目情绪 |
探索、紧张、轻度战斗、激烈战斗、Boss、PvP、胜利、极度危险、环境、菜单(主屏幕)、脚本化 |
| 音乐包 |
battlemusiccrescendo_musicpacks/ 中的文件夹包 —— 像资源包一样启用它们 |
| 包编辑器 |
创建、编辑、预览、导出 .zip、导入包、加载示例包(完整模板) |
| JSON 曲目 |
每个曲目一个 .json 文件 + 匹配的 .ogg 文件位于 sounds/music/ |
| 条件 |
生物群系、维度、结构、实体 ID、实体标签、最小敌人数量、Boss、PvP、低生命值、屏幕(title 用于主菜单) |
| Mob Battle Music |
导入使用 assets/mobbattlemusic/music_tracks/ 的包(mob_specific, mob_list, mob_tag, player_specific) |
| 多人游戏 |
仅在任何服务器的客户端上 —— 无需服务器模组 |
| 服务器同步 |
可选:同时在服务器上安装以获得稍好的战斗检测 |
| 配置界面 |
音量、检测、淡入淡出、调试叠加层、菜单音乐、静音原版 |
| 调试叠加层 |
实时状态、曲目 ID、优先级、敌人数量、强度 |
兼容性
| 设置 |
结果 |
| 单人游戏 |
全部功能 |
| 多人游戏 —— 模组仅安装在你的客户端 |
有效 —— 本地生物检测 |
| 多人游戏 —— 模组安装在客户端 + 服务器 |
有效 —— 可选的战斗同步数据包 |
| 混合服务器(Mohist 等) |
客户端回退检测;无需服务器模组 |
| Mob Battle Music 包 |
将 JSON 和 OGG 放入你的 BMC 音乐包中(见下文教程) |
Minecraft 版本: 1.21.x
完整教程
首次使用此模组时,请按顺序执行以下步骤。之后,你只需调整包或添加新的 .ogg 文件即可。
第一部分 —— 安装并打开设置
- 在你的 Minecraft 客户端(1.21.x)上安装 Battle Music Crescendo。
- 启动游戏并加入世界(单人游戏适合测试)。
- 打开 选项 → 控制 并找到类别 Battle Music Crescendo:
- 打开配置(默认
B)—— 主设置界面
- 切换调试(默认
F8)—— 屏幕上的战斗/音乐调试信息
- 测试音乐(未绑定)—— 如果已加载包,则播放测试曲目
- 打开 选项 → 音乐与声音(或通过
B / 模组列表访问模组配置)。
- 点击 音乐包...(位于皮肤/资源包按钮附近)。
你不需要在专用服务器上安装模组也能听到音乐。
第二部分 —— 加载示例包(推荐)
模组附带了一个完整的 ExamplePack 模板。使用游戏内编辑器,这样你永远不会从零开始。
- 从主菜单或游戏中打开音乐包 UI:
- 选项 → 音乐包...,然后 音乐包编辑器,
或者 从模组配置界面使用编辑器快捷方式。
- 在编辑器(左栏)中,点击 加载示例包。
- 你应该在列表中看到 12 个曲目,例如:
tension_near, combat_light, combat_intense, boss_dark, pvp_duel, victory_sting, critical_danger, ambient_forest, ambient_stronghold, menu_title, exploration_calm, scripted_example
- 点击 打开包文件夹 —— Windows 资源管理器将打开你的包目录。
默认文件夹(游戏目录):
battlemusiccrescendo_musicpacks/ExamplePack/
- 任何文件更改后,在编辑器中点击 重新加载包。
重要提示: 加载示例包仅创建 JSON + sounds.json。你仍需添加你自己的音乐文件(下一部分)。
第三部分 —— 添加你的音乐文件 (.ogg)
每个曲目 JSON 引用一个 ogg_file。将匹配的文件放在这里:
battlemusiccrescendo_musicpacks/ExamplePack/assets/battlemusiccrescendo/sounds/music/
| 曲目 JSON |
将此文件放入 sounds/music/ |
tension_near.json |
tension.ogg |
combat_light.json |
combat_light.ogg |
combat_intense.json |
combat_intense.ogg |
boss_dark.json |
boss_dark.ogg |
pvp_duel.json |
pvp.ogg |
victory_sting.json |
victory.ogg |
critical_danger.json |
defeat.ogg |
ambient_forest.json |
ambient_forest.ogg |
ambient_stronghold.json |
ambient_stronghold.ogg |
menu_title.json |
menu_title.ogg |
exploration_calm.json |
exploration.ogg |
scripted_example.json |
scripted_event.ogg |
提示:
- 使用
.ogg (Vorbis),立体声,流式音乐质量。
- 文件名必须与 JSON 中的
ogg_file 完全匹配。
- 如果你愿意,可以为多个曲目使用相同的
.ogg 文件(用不同的名称复制文件)。
复制文件后:
- 返回游戏。
- 音乐包... → 启用 ExamplePack(将其移动到 已选中)。
- 在编辑器中,点击 重新加载包。
- 点击曲目的 播放 以预览,或生成生物以测试实时效果。
第四部分 —— 在游戏中启用包
- 选项 → 音乐包...
- 左侧列表:可用音乐包 — 选择
ExamplePack(或你的包名称)。
- 点击箭头将其移至 已选音乐包。
- 关闭屏幕 — 游戏会自动重新加载包资源。
- 可选:在模组配置中启用 菜单测试音乐,以便在 主菜单(屏幕条件为
title)听到 menu_title.ogg。
如果听不到声音:
- 确认
sounds/music/ 中存在 .ogg 文件。
- 确认该包处于 已选中 状态,而不仅仅是存在于磁盘上。
- 在编辑器中点击 重载包。
- 启用 调试叠加层 (
F8) 并检查在怪物附近时 Playing: true(正在播放:是)和 State:(状态)。
第五部分 — 在世界中测试战斗音乐
- 启用 调试叠加层 (
F8 或在配置中)。
- 在配置中将 检测范围 设置为至少
48 格(默认值)。
- 在创造模式或生存模式中,生成或在范围内找到 敌对生物。
- 观察叠加层:
- State(状态)应在你战斗时移动:
exploration(探索)→ tension(紧张)→ light_combat(轻度战斗)/ intense_combat(激烈战斗)。
- 当有曲目匹配时,Playing(正在播放)应显示为
true。
- 击杀怪物并离开战斗区域 — 可能会播放一段短暂的 胜利 曲目(如果在通用配置中启用)。
- 受到低于临界健康阈值的伤害 — 可能会播放 失败 / 危险 音乐。
Boss 音乐: 生成一个高生命值的怪物,或在 JSON 中使用 boss: true 条件(参见第七部分)。
PvP: 在配置中启用 PvP 音乐的情况下与其他玩家战斗。
第六部分 — 音乐包编辑器(创建你自己的曲目)
从音乐包屏幕或模组配置中打开 音乐包编辑器。
| 按钮 |
功能 |
| 加载示例包 |
安装/刷新所有 12 个示例 JSON 文件 + Mob Battle Music 样本 + README |
| 打开包文件夹 |
在文件管理器中打开 battlemusiccrescendo_musicpacks/ExamplePack/ |
| 新建曲目 |
创建一个空白的 JSON 供你编辑和保存 |
| 保存 |
将当前曲目的 JSON 写入磁盘 |
| 播放 / 停止 |
预览选定的曲目 |
| 重载包 |
重新加载资源,以便注册新音效 |
| 导出 zip |
将包文件夹导出为可分享的 .zip 文件 |
| 导入 .zip 包 |
将 zip 包解压到 battlemusiccrescendo_musicpacks/ 中 |
编辑器字段(右侧面板)
| 字段 |
含义 |
| Id |
唯一的曲目 ID,例如 battlemusiccrescendo:my_boss |
| Ogg file |
sounds/music/ 中的文件名,例如 my_boss.ogg |
| Type |
tension、combat、intense、boss、pvp、victory、defeat、ambient、menu、exploration、scripted |
| Priority |
当多个曲目匹配时,数字越大优先级越高(boss > combat > tension) |
| Dimensions / Biomes / Structures |
逗号分隔的 ID — 仅在匹配时播放曲目 |
| Entity tags |
例如 minecraft:skeletons |
| Min enemies |
所需的最小敌对生物数量 |
| Boss / PvP / Critical |
切换条件标志 |
点击 Save(保存)后,点击 Reload packs(重载包)。模组会自动根据你的 JSON 文件重建 sounds.json。
第七部分 — 曲目 JSON 参考(手动编辑)
文件夹路径:
assets/battlemusiccrescendo/music_tracks/my_track.json
最小化示例:
{
"id": "battlemusiccrescendo:my_track",
"ogg_file": "my_track.ogg",
"type": "combat",
"priority": 30,
"fade_in_ticks": 60,
"fade_out_ticks": 80,
"loop": true,
"conditions": {
"min_enemy_count": 1
}
}
type 值说明
| type |
播放时机 |
exploration |
平静 — 没有真正威胁 |
tension |
附近有敌人,但未进入全面战斗 |
combat |
轻度战斗 |
intense |
大量敌人 / 激烈战斗 |
boss |
检测到 Boss 或满足 boss: true 条件 |
pvp |
玩家对战 |
victory |
战斗结束后立即播放一次 |
defeat |
生命值极低 |
ambient |
覆盖生物群系/结构的环境音 |
menu |
主菜单(conditions.screen: "title") |
scripted |
自定义脚本/事件用途 |
conditions(全部可选)
"conditions": {
"dimensions": ["minecraft:overworld", "minecraft:the_nether"],
"biomes": ["minecraft:deep_dark"],
"structures": ["minecraft:stronghold"],
"entities": ["minecraft:wither"],
"entity_tags": ["minecraft:skeletons"],
"min_enemy_count": 4,
"boss": true,
"pvp": true,
"critical_health": true,
"screen": "title"
}
ogg_file 是主要引用源 — 音效 ID 由文件名派生(不含 .ogg 后缀)。
- 在你发布的包中,不要依赖受版权保护的占位符名称;请使用你自己的文件名。
第八部分 — 兼容 Mob Battle Music 的包
你可以在 BMC 包中重用 Mob Battle Music 的曲目格式。
文件夹路径:
assets/mobbattlemusic/music_tracks/
示例 — 僵尸激怒曲目:
{
"type": "mob_specific",
"sound": "mobbattlemusic:aggro_track",
"priority": 30,
"fade_time": 40,
"group": "attacking",
"selector": "any",
"mob": "minecraft:zombie"
}
放置音频文件:
assets/mobbattlemusic/sounds/aggro_track.ogg
assets/mobbattlemusic/sounds/non_aggro_track.ogg
assets/mobbattlemusic/sounds/player_track.ogg
支持的类型:mob_specific、mob_list、mob_tag、player_specific、player_specific_uuid。
示例包包含三个示例 JSON 文件。在编辑器中点击 Load example pack(加载示例包)即可为你复制它们。
第九部分 — 多人游戏与服务器
| 你的设置 |
需要做什么 |
| 在 没有该模组的类原版服务器 上游玩 |
仅在客户端安装 BMC — 音乐通过本地检测工作 |
| 在 装有该模组的服务器 上游玩 |
可选更好的同步;客户端使用相同的音乐包 |
| 自建服务器 |
服务器端模组为 可选 — 玩家无需服务端模组即可听到音乐 |
网络同步是 可选的。如果服务器没有安装该模组,客户端不会因缺少通道而断开连接。
第十部分 — 配置文件
| 文件 |
位置 |
| Common(通用) |
config/battlemusiccrescendo-common.toml |
| Client(客户端) |
config/battlemusiccrescendo-client.toml |
Common(共享逻辑)
| 选项 |
用途 |
enabled |
总开关 |
detectionRange |
生物扫描半径(方块) |
bossDetectionRange |
Boss 扫描半径 |
fadeInTicks / fadeOutTicks / crossfadeTicks |
默认过渡时间 |
minMobsForBattle / minMobsForIntense |
战斗氛围的阈值 |
pvpMusic / victoryMusic |
启用 PvP 和胜利音效 |
allowServerSync |
在可用时使用服务器战斗数据包进行同步 |
allowClientOnlyFallback |
当服务器未安装模组时,使用本地检测作为备选方案 |
blacklistDimensions / whitelistDimensions |
限制音乐生效的范围维度 |
entityBlacklist / entityWhitelist |
过滤计入战斗的生物 |
Client(客户端)
| 选项 |
用途 |
battleVolume |
你的战斗音乐音量(0.0–1.0) |
showDebugOverlay |
显示屏幕调试信息 |
muteVanillaDuringCombat |
在模组音乐播放期间停止原版背景音乐 |
menuTestMusic |
在主菜单标题界面播放菜单曲目 |
游戏内路径:Mods → Battle Music Crescendo → Config 或使用快捷键 B。
第 11 部分 — 分享整合包 (.zip)
- 在
battlemusiccrescendo_musicpacks/MyPack/ 目录下构建你的整合包。
- 包含以下内容:
pack.mcmeta
assets/battlemusiccrescendo/music_tracks/*.json
assets/battlemusiccrescendo/sounds/music/*.ogg
- 可选:
assets/mobbattlemusic/...
- 在编辑器中点击 Export zip(导出为 zip)。
- 其他玩家通过 Import .zip pack(s)(导入 .zip 整合包)功能加载,并在 Music packs...(音乐整合包)中启用该整合包。
故障排除
| 问题 |
解决方法 |
| 完全没有音乐 |
在 Selected(已选择)中启用整合包;添加 .ogg 文件;执行 Reload packs(重新加载整合包) |
| 编辑器中只显示一个曲目 |
再次点击 Load example pack(加载示例整合包)(刷新所有 12 个 JSON 文件) |
日志中出现 Sound ... not loaded |
缺少 .ogg 文件或文件名与 ogg_file 字段不匹配 |
| 菜单音乐无声 |
添加 menu_title.ogg;启用 Menu test music(菜单测试音乐);确保整合包已选中 |
| 原版音乐重叠 |
在客户端配置中启用 mute vanilla during combat(战斗中静音原版音乐) |
| 服务器上的音乐需要模组? |
错误 — 仅在 客户端 安装即可 |
| 战斗触发感觉滞后 |
增加 detectionRange(检测范围);在服务器上安装模组以实现同步 |
| 日志中出现 JSON 错误 |
每个曲目都需要 ogg_file(或 sound)字段 + type 字段 |
测试时请启用 debug overlay(调试叠加层)(按 F8)——它会显示实时的战斗状态、选中的曲目以及音频是否正在播放。
灵感来源
战斗音乐的概念灵感来源于 [Mob Battle Music] By:nonamecrackers2 的设计目标。Battle Music Crescendo 增加了其自己的优先级系统、整合包编辑器、菜单曲目、胜利/关键层以及可选的服务器同步功能。
Battle Music Crescendo
Minecraft 1.21.x · Client-side adaptive combat music · Custom music packs · In-game editor · Optional server sync · Mob Battle Music pack format supported
Author: MickDev
What this mod actually does (under the hood)
Battle Music Crescendo is not a single looping track. Every second it:
- Scans your world around you (hostile mobs, bosses, PvP, health, biomes, structures).
- Scores combat intensity and picks a mood (exploration → tension → combat → intense → boss → PvP → critical danger).
- Resolves priority so real danger always beats ambient fluff.
- Selects the best matching track from your enabled music packs (JSON rules + conditions).
- Crossfades between tracks with configurable fade in/out.
- Silences vanilla Minecraft music while your custom music plays (optional).
- Plays victory stings when combat ends (optional).
All audio runs on your client only. Other players hear their own music (or vanilla). The server never needs your .ogg files.
Features at a glance
| Feature |
Details |
| Track moods |
Exploration, tension, light combat, intense combat, boss, PvP, victory, critical danger, ambient, menu (title screen), scripted |
| Music packs |
Folder packs in battlemusiccrescendo_musicpacks/ — enable them like resource packs |
| Pack editor |
Create, edit, preview, export .zip, import packs, Load example pack (full template) |
| JSON tracks |
One .json per track + matching .ogg in sounds/music/ |
| Conditions |
Biomes, dimensions, structures, entity ids, entity tags, min enemy count, boss, PvP, low health, screen (title for main menu) |
| Mob Battle Music |
Import packs using assets/mobbattlemusic/music_tracks/ (mob_specific, mob_list, mob_tag, player_specific) |
| Multiplayer |
Client-only on any server — no server mod required |
| Server sync |
Optional: install on server too for slightly better combat detection |
| Config screen |
Volume, detection, fades, debug overlay, menu music, mute vanilla |
| Debug overlay |
Live state, track id, priority, enemy count, intensity |
Compatibility
| Setup |
Result |
| Single-player |
Full features |
| Multiplayer — mod only on your client |
Works — local mob detection |
| Multiplayer — mod on client + server |
Works — optional combat sync packets |
| Hybrid servers (Mohist, etc.) |
Client fallback detection; no server mod required |
| Mob Battle Music packs |
Drop JSON + OGG into your BMC music pack (see tutorial below) |
Minecraft version: 1.21.x
Complete tutorial
Follow these steps in order the first time you use the mod. After that, you only tweak packs or add new .ogg files.
Part 1 — Install and open settings
- Install Battle Music Crescendo on your Minecraft client (1.21.x).
- Launch the game and join a world (single-player is fine for testing).
- Open Options → Controls and find the category Battle Music Crescendo:
- Open config (default
B) — main settings screen
- Toggle debug (default
F8) — on-screen combat/music debug
- Test music (unbound) — plays a test track if packs are loaded
- Open Options → Music & Sound (or the mod config via
B / Mods list).
- Click Music packs... (placed near skin/resource pack buttons).
You do not need the mod on a dedicated server to hear music.
Part 2 — Load the example pack (recommended)
The mod ships a full ExamplePack template. Use the in-game editor so you never start from an empty folder.
- From the main menu or in-game, open the music pack UI:
- Options → Music packs..., then Music Pack editor,
or use the editor shortcut from the mod config screen.
- In the editor (left column), click Load example pack.
- You should see 12 tracks in the list, for example:
tension_near, combat_light, combat_intense, boss_dark, pvp_duel, victory_sting, critical_danger, ambient_forest, ambient_stronghold, menu_title, exploration_calm, scripted_example
- Click Open pack folder — Windows Explorer opens your pack directory.
Default folder (game directory):
battlemusiccrescendo_musicpacks/ExamplePack/
- Click Reload packs in the editor after any file change.
Important: Loading the example pack creates JSON + sounds.json only. You still add your own music files (next part).
Part 3 — Add your music files (.ogg)
Each track JSON references an ogg_file. Put the matching file here:
battlemusiccrescendo_musicpacks/ExamplePack/assets/battlemusiccrescendo/sounds/music/
| Track JSON |
Put this file in sounds/music/ |
tension_near.json |
tension.ogg |
combat_light.json |
combat_light.ogg |
combat_intense.json |
combat_intense.ogg |
boss_dark.json |
boss_dark.ogg |
pvp_duel.json |
pvp.ogg |
victory_sting.json |
victory.ogg |
critical_danger.json |
defeat.ogg |
ambient_forest.json |
ambient_forest.ogg |
ambient_stronghold.json |
ambient_stronghold.ogg |
menu_title.json |
menu_title.ogg |
exploration_calm.json |
exploration.ogg |
scripted_example.json |
scripted_event.ogg |
Tips:
- Use
.ogg (Vorbis), stereo, streamed music quality.
- File names must match
ogg_file in the JSON exactly.
- You can use the same
.ogg for several tracks if you want (duplicate the file with different names).
After copying files:
- Return to the game.
- Music packs... → enable ExamplePack (move it to Selected).
- In the editor, click Reload packs.
- Press Play on a track to preview, or spawn mobs to test live.
Part 4 — Enable the pack in-game
- Options → Music packs...
- Left list: Available Music Packs — select
ExamplePack (or your pack name).
- Click the arrow to move it to Selected Music Packs.
- Close the screen — the game reloads pack resources automatically.
- Optional: enable Menu test music in mod config to hear
menu_title.ogg on the main menu (screen condition title).
If you hear nothing:
- Confirm
.ogg files exist in sounds/music/.
- Confirm the pack is selected, not only present on disk.
- Click Reload packs in the editor.
- Enable Debug overlay (
F8) and check Playing: true and State: when near mobs.
Part 5 — Test combat music in a world
- Enable Debug overlay (
F8 or config).
- Set Detection range to at least
48 blocks in config (default).
- In Creative or Survival, spawn or find hostile mobs within range.
- Watch the overlay:
- State should move:
exploration → tension → light_combat / intense_combat when you fight.
- Playing should be
true when a track matches.
- Kill mobs and leave combat — a short victory track may play (if enabled in common config).
- Take damage below the critical health threshold — defeat / danger music can play.
Boss music: spawn a high-HP mob or use the boss: true condition in JSON (see Part 7).
PvP: fight another player with PvP music enabled in config.
Part 6 — Music Pack Editor (create your own tracks)
Open Music Pack editor from the music packs screen or mod config.
| Button |
What it does |
| Load example pack |
Installs/refreshes all 12 example JSON files + Mob Battle Music samples + README |
| Open pack folder |
Opens battlemusiccrescendo_musicpacks/ExamplePack/ in your file manager |
| New track |
Creates a blank JSON you edit and save |
| Save |
Writes the current track JSON to disk |
| Play / Stop |
Preview the selected track |
| Reload packs |
Reloads resources so new sounds are registered |
| Export zip |
Exports the pack folder as a shareable .zip |
| Import .zip pack(s) |
Extracts zip packs into battlemusiccrescendo_musicpacks/ |
Editor fields (right panel)
| Field |
Meaning |
| Id |
Unique track id, e.g. battlemusiccrescendo:my_boss |
| Ogg file |
File name in sounds/music/, e.g. my_boss.ogg |
| Type |
tension, combat, intense, boss, pvp, victory, defeat, ambient, menu, exploration, scripted |
| Priority |
Higher number wins when multiple tracks match (boss > combat > tension) |
| Dimensions / Biomes / Structures |
Comma-separated ids — track only plays when matched |
| Entity tags |
e.g. minecraft:skeletons |
| Min enemies |
Minimum hostile count required |
| Boss / PvP / Critical |
Toggle condition flags |
After Save, click Reload packs. The mod rebuilds sounds.json from your JSON files automatically.
Part 7 — Track JSON reference (manual editing)
Folder:
assets/battlemusiccrescendo/music_tracks/my_track.json
Minimal example:
{
"id": "battlemusiccrescendo:my_track",
"ogg_file": "my_track.ogg",
"type": "combat",
"priority": 30,
"fade_in_ticks": 60,
"fade_out_ticks": 80,
"loop": true,
"conditions": {
"min_enemy_count": 1
}
}
type values
| type |
When it plays |
exploration |
Calm — no real threat |
tension |
Enemies nearby, not full combat |
combat |
Light combat |
intense |
Many enemies / heavy fight |
boss |
Boss detected or boss: true condition |
pvp |
Fighting players |
victory |
One-shot after combat ends |
defeat |
Critical low health |
ambient |
Biome/structure ambience override |
menu |
Main menu (conditions.screen: "title") |
scripted |
Custom scripted/event use |
conditions (all optional)
"conditions": {
"dimensions": ["minecraft:overworld", "minecraft:the_nether"],
"biomes": ["minecraft:deep_dark"],
"structures": ["minecraft:stronghold"],
"entities": ["minecraft:wither"],
"entity_tags": ["minecraft:skeletons"],
"min_enemy_count": 4,
"boss": true,
"pvp": true,
"critical_health": true,
"screen": "title"
}
ogg_file is the main reference — the sound id is derived from the file name (without .ogg).
- Do not rely on copyrighted placeholder names in packs you publish; use your own file names.
Part 8 — Mob Battle Music compatible packs
You can reuse the track format from Mob Battle Music inside your BMC pack.
Folder:
assets/mobbattlemusic/music_tracks/
Example — zombie aggro track:
{
"type": "mob_specific",
"sound": "mobbattlemusic:aggro_track",
"priority": 30,
"fade_time": 40,
"group": "attacking",
"selector": "any",
"mob": "minecraft:zombie"
}
Place audio:
assets/mobbattlemusic/sounds/aggro_track.ogg
assets/mobbattlemusic/sounds/non_aggro_track.ogg
assets/mobbattlemusic/sounds/player_track.ogg
Supported types: mob_specific, mob_list, mob_tag, player_specific, player_specific_uuid.
The example pack includes three sample JSON files. Load example pack in the editor copies them for you.
Part 9 — Multiplayer and servers
| Your setup |
What to do |
| Play on a vanilla-like server without the mod |
Install BMC only on your client — music works via local detection |
| Play on a server with the mod |
Optional better sync; same music packs on your client |
| Host your own server |
Server mod is optional — not required for players to hear music |
Network sync is optional. If the server does not have the mod, the client never disconnects because of missing channels.
Part 10 — Configuration files
| File |
Location |
| Common |
config/battlemusiccrescendo-common.toml |
| Client |
config/battlemusiccrescendo-client.toml |
Common (shared logic)
| Option |
Purpose |
enabled |
Master switch |
detectionRange |
Mob scan radius (blocks) |
bossDetectionRange |
Boss scan radius |
fadeInTicks / fadeOutTicks / crossfadeTicks |
Default transitions |
minMobsForBattle / minMobsForIntense |
Thresholds for combat moods |
pvpMusic / victoryMusic |
Enable PvP and victory stings |
allowServerSync |
Use server combat packets when available |
allowClientOnlyFallback |
Local detection when server has no mod |
blacklistDimensions / whitelistDimensions |
Limit where music runs |
entityBlacklist / entityWhitelist |
Filter which mobs count |
Client
| Option |
Purpose |
battleVolume |
Your battle music volume (0.0–1.0) |
showDebugOverlay |
On-screen debug |
muteVanillaDuringCombat |
Stop vanilla background music while mod music plays |
menuTestMusic |
Play menu track on title screen |
In-game: Mods → Battle Music Crescendo → Config or keybind B.
Part 11 — Sharing a pack (.zip)
- Build your pack under
battlemusiccrescendo_musicpacks/MyPack/.
- Include:
pack.mcmeta
assets/battlemusiccrescendo/music_tracks/*.json
assets/battlemusiccrescendo/sounds/music/*.ogg
- Optional:
assets/mobbattlemusic/...
- In the editor, Export zip.
- Others use Import .zip pack(s) and enable the pack in Music packs....
Troubleshooting
| Problem |
Fix |
| No music at all |
Enable pack in Selected; add .ogg files; Reload packs |
| Only one track in editor |
Click Load example pack again (refreshes all 12 JSON files) |
Sound ... not loaded in log |
Missing .ogg or wrong file name vs ogg_file |
| Menu music silent |
Add menu_title.ogg; enable Menu test music; pack selected |
| Vanilla music overlaps |
Enable mute vanilla during combat in client config |
| Music on server requires mod |
False — install on client only |
| Combat feels late |
Increase detectionRange; install mod on server for sync |
| JSON error in log |
Each track needs ogg_file (or sound) + type |
Enable debug overlay (F8) while testing — it shows the live combat state, selected track, and whether audio is playing.
inspiration
Combat music concept inspired by the goals of [Mob Battle Music] By:nonamecrackers2. Battle Music Crescendo adds its own priority system, pack editor, menu tracks, victory/critical layers, and optional server sync.
评论 0
登录后参与评分
还没有评论,来抢沙发吧