灵感来源于 Vazkii 的 "Ambience" 和 viniciusgf1 的 "Ambience - Extras",本模组允许你根据游戏状态播放自定义音乐,例如 Boss 战、战斗、身处地下、睡觉、钓鱼、一天中的不同时间段以及更多情况,但拥有比旧版本更加灵活的配置系统。此版本 不 包含旧模组中的任何方块、物品或命令,且我目前没有重新实现这些功能的计划;因此名称中带有“Mini”(尽管该模组已不再那么“迷你”,不过也无所谓了)。
CurseForge 上仅包含开始使用本模组所需的最低限度信息,但你始终可以在 Ambience Mini Wiki 上找到更多信息,或在 Ambience Mini Discord 服务器 上提问。欢迎在 Discord 或 GitHub 上报告错误。
此外,Ambience Mini 现在提供了一个 基于网页的音乐配置编辑器,帮助你创建、修改和测试音乐包配置。
这个模组是否有些过度设计?也许吧。制作它有趣吗?是的!
功能概览
模组的完整功能在 Wiki 中有详细解释,这里提供一个粗略概述。
最新版本可以检测/读取:
- 特定的打开菜单(主菜单、加入游戏、断开连接、制作人员名单、暂停)。
- 特定的世界信息(难度、维度 ID、生物群系 ID 和标签)。
- 一天中的时间(白天、夜晚、黄昏、黎明)。
- 天气(雨、雪、雷暴)。
- 特定的玩家状态(生命值、睡觉、钓鱼、水下、骑乘/载具、药水/减益效果、鞘翅等)。
- 战斗状态(已击败的生物数量、活跃的 Boss 以及附近是否有监守者)。
- 通过计算附近的实体来识别村庄和牧场。
- 根据周围方块和光照判断玩家是否在洞穴中。
- 玩家当前所在的所有用户定义区域/范围。 (部分功能需要服务器支持)
- 玩家是否处于自动生成的结构(如村庄和要塞)中。 (需要服务器支持)
- 存储在服务器上并通过命令设置的标志(命名文本/字符串值)。 (需要服务器支持)
洞穴检测: 洞穴检测算法利用周围的光照和方块来判断玩家处于洞穴中的可能性,与其他通常仅依赖光照和/或海拔高度的音乐模组相比,能够更精确地检测洞穴。
区域系统: 玩家可以使用完全基于客户端的系统(通过快捷键和菜单)定义命名区域,即使模组未安装在服务器上也是如此。在服务器支持下,区域可以在玩家之间共享。
标志系统: 在服务器支持下,拥有操作员权限的玩家可以定义带有文本/字符串值的命名变量,用于音乐选择。你也可以使用命令方块来更新这些标志。
支持的文件格式: MP3、OGG 和 FLAC。
原版音乐播放器: 如果某些情况下你仍然希望保留正常的 Minecraft 音乐,你可以在音乐配置中重新启用内置的音乐播放器。
基本快捷键:
P在游戏中重载 Ambience Mini 和音乐包,这样你就可以在不重启游戏的情况下应用更改后的音乐配置,或者在音乐引擎崩溃时进行恢复。End将暂停/继续当前正在播放的音乐。Page Up在当前播放列表中切换到下一首音乐。Page Down将所有 Ambience Mini 状态(事件和属性)打印到 Minecraft 日志中,让你看到模组所感知到的内容。
安装与配置
如需视频教程指南:
要开始使用,你需要下载并安装 1) 模组本身 2) 一个音乐包。在 2.2.0 版本之前,该模组应仅安装在客户端。从 2.2.0 版本及以上,该模组可以安装在客户端、服务器或两者之上。当安装在服务器上时,会启用一些额外功能(并且没有安装该模组的客户端仍然可以加入)。
接下来,你可以下载一个 适用于 Ambience Mini 2.7.x 的示例音乐包,或者 尝试制作你自己的。无论哪种情况,请确保 ambience_music 文件夹放置在 .minecraft 文件夹内,与 mods 文件夹并列。
以下列表显示了本模组使用的文件和文件夹。音乐文件位于 .minecraft/ambience_music/music/ 中。文件 .minecraft/ambience_music/music_config.txt 描述了在何种条件下应播放哪些音乐。
- .minecraft
- ambience_music // <-- 示例可从上述链接下载
- music
- Music1.mp3
- Music2.mp3
- ...
- MusicN.mp3
- music_config.txt
- config
- ambience_mini-client.toml
- mods
- AmbienceMini-McVersion-ModVersion.jar
如果在设置模组或音乐包时遇到问题,请参阅 故障排除 页面。
注意事项
默认情况下,由于音乐往往比其他声音小得多,而且将音乐与主音量断开比调整其他所有内容要容易得多,因此模组会忽略 Minecraft 中的主音量设置。此行为可以在 "ambience_mini-client.toml" 配置文件中更改。
Inspired by "Ambience" by Vazkii and "Ambience - Extras" by viniciusgf1, this mod lets you play custom music based on game state such as boss fights, combat, being underground, sleeping, fishing, the time of day, and many more, but with a much more flexible configuration system compared to the older versions. This version does not provide any of the blocks, items, or commands from the older mods and I currently have no plans of re-implementing these; hence the "Mini" in the name (though the mod is not so "mini" anymore, but oh well).
CurseForge contains only the minimum information needed to get started with the mod but you can always find more information on the Ambience Mini Wiki or ask questions on the Ambience Mini Discord Server. Feel free to report errors on Discord or GitHub.
Also, Ambience Mini now has a web-based music configuration editor which helps you create, modify, and test music pack configurations.
Is this mod a bit over-engineered? Perhaps. Was it fun to make? Yes!
Feature overview
The full capabilities of the mod are explained throughout the wiki, but here is a rough overview.
The latest version can detect/read:
- Certain open menus (main menu, joining, disconnected, credits, paused).
- Certain world information (difficulty, dimension id, biome ids and tags).
- The time of day (day, night, dusk, dawn).
- The weather (rain, snow, thunder).
- Certain player states (health, sleeping, fishing, underwater, mounts/vehicles, potion/(de-)buff effects, elytra, and more).
- Combat state (number of fought mobs, active bosses, and whether a warden is nearby).
- Villages and ranches by counting nearby entities.
- Whether the player is in a cave based on the surrounding blocks and lighting.
- All user-defined areas/regions the player is currently located within. (some features require server support)
- Whether the player is in auto-generated structures such as villages and strongholds. (requires server support)
- Flags (named text/string values) stored on the server and which can be set with commands. (requires server support)
Cave detection: The cave detection algorithm uses the surrounding lighting and blocks to determine how likely it is that the player is in a cave or not, allowing for much more precise detection of caves compared to other music mods which typically rely solely on lighting and/or elevation.
Area system: Players can define named areas using a fully client-side-based system using key bindings and menus, even when the mod is not installed on the server. With server support, areas can be shared between players.
Flag system: With server support, players with operator privileges can define named variables with text/string values which can be used for music selection. You can also use command blocks to update these flags.
Supported file formats: MP3, OGG, and FLAC.
Vanilla music player: You can re-enable the built-in music player in the music configuration in case you still want the normal Minecraft in certain cases.
Basic key bindings:
Preloads Ambience Mini and the music pack while in-game, so you can apply your changed music config without restarting the game or recover if the music engine crashes.Endwill pause/resume the currently playing music.Page Upselects a new music within the current playlist.Page Downprints all Ambience Mini state (events and properties) to the Minecraft logs, allowing you to see what the mod sees.
Installation and Configuration
For a video-based guide:
To get started, you need to download and install 1) the mod itself and 2) a music pack. Before version 2.2.0, the mod should only be installed on the client. From version 2.2.0 and up, the mod can be installed on either or both the client and the server. When installed on the server, a few additional features are enabled (and clients without the mod can still join).
Next, you can either download a sample music pack for Ambience Mini 2.7.x or try making your own. In either case, make sure the ambience_music-folder is placed in the .minecraft-folder alongside the mods-folder.
The list below shows the files and folders used by this mod. The music files are located in .minecraft/ambience_music/music/. The file .minecraft/ambience_music/music_config.txt describes which music should be played under which conditions.
- .minecraft
- ambience_music // <-- Sample can be downloaded from the link above
- music
- Music1.mp3
- Music2.mp3
- ...
- MusicN.mp3
- music_config.txt
- config
- ambience_mini-client.toml
- mods
- AmbienceMini-McVersion-ModVersion.jar
If you run into problems with setting up the mod or music packs, see also the troubleshooting page.
Things of Note
By default, the mod ignores the master volume setting in Minecraft since the music tends to become way too silent compared to other sounds and it was way easier to just disconnect the music from the master volume than to adjust everything else. This behavior can be changed in the "ambience_mini-client.toml" configuration file.
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
下载 Ambience Mini
版本 2.7.12:
- 修复了在使用
$skylight_potential属性时与 Sable 模组相关的崩溃问题。
版本 2.7.11:
- 修复了在使用
$cave_score属性时与 Sable 模组相关的崩溃问题。
版本 2.7.10:
- 提升了 Minecraft 启动期间音乐播放器的稳定性,以及音乐播放器崩溃后的自动重载功能。
- 修复了当游戏线程挂起一段时间后,
@warden_nearby导致音乐播放器崩溃的问题。 - 修复了实体查找失败时音乐播放器缓存的问题。(感谢 create_xiaoyu)
- 修复了各种事件处理器中的空指针崩溃问题。(感谢 create_xiaoyu)
版本 2.7.9:
- 重写了“自动重载音乐播放器”的提示框文案,使其更清楚地表明自动重载已成功。
- 修复了当主游戏线程挂起一段时间后导致的音乐播放器崩溃问题。
版本 2.7.8:
- 修复了在 FLAC 文件缺少元数据时导致的音乐播放器崩溃问题。
- 修复了注册战斗状态时导致游戏冻结的错误。
版本 2.7.7:
- 修复了在部分 Minecraft 版本中,有其他玩家在线时加入服务器导致的崩溃问题。
- 修复了因跨线程访问世界实体而导致的罕见模组冲突和崩溃问题。
@village、@ranch和@warden_nearby现在每秒仅更新一次,以减少对主游戏线程的负载。
- 尝试解决在大型整合包中启动时偶尔出现的音乐播放器崩溃问题。
- 尝试修复原版音乐与自定义音乐重叠的问题。
- 修复了音乐音量设置过低(例如
"..."<-50.0>)时导致的崩溃问题。 - 音乐播放器现在会在崩溃后自动尝试重启一次。
版本 2.7.6:
- 修复了安装某些战斗模组(至少包括 Epic Fight 和 SlashBlade)时导致战斗追踪失效的问题。
- 修复了多人游戏中战斗追踪通常无法正常工作(而在单人游戏中正常)的问题。
- 修复了与 MP3 文件元数据解析相关的音乐播放器崩溃问题。
- 修复了由于模组不断更改音乐音量,导致在切换音乐时 Ambience Mini 淡入/淡出效果期间游戏渲染挂起的问题。
- 为什么要不断更改音乐音量?我也搞不懂。
- 尝试修复在 Minecraft 1.21.1 中模组事件处理器启动时的奇怪空指针崩溃问题。
版本 2.7.5:
- 修复了在未安装 Ambience Mini 的情况下加入服务器时导致的崩溃错误。
- 添加了模组配置选项,可在每次音乐变化时显示包含音乐信息的提示框。
- 修复了在多人游戏中靠近唱片机(或持有 Alex's Mobs 模组的响尾蛇,因为其播放的音乐类似于唱片音乐)时在 Minecraft 1.19.2 及以上版本导致的音乐播放器崩溃问题。
- 修复了部分 OGG 和 MP3 文件导致的音乐播放器崩溃问题。
版本 2.7.4:
- 修复了 mixin refmap 问题。
版本 2.7.3:
- 修复了播放 MP3 文件时间歇性的卡顿/故障问题。
- 音乐播放器和解码器的错误修复和改进。
版本 2.7.2:
- 修复了使用投射物攻击实体时在服务器端发生的崩溃错误。
版本 2.7.1:
- hopefully 修复了快速进入和离开 Boss 战导致音乐播放器崩溃的错误。
- 添加了
@is_targeted事件,当有任何生物正在锁定玩家时该事件为true(若无服务端支持则为undefined)。 - 添加了
@is_fighting事件,当有任何生物近期与玩家发生过基于伤害的交互时该事件为true。 @in_combat事件的运作方式大致相同,仅在 actively 战斗时激活,并持续到玩家安全或经过足够时间后才停止。- 你现在可以在创造模式下处于战斗状态,但前提是你未被锁定。如果你不希望创造模式下有战斗音乐,可以使用
$game_mode。 - 移除了
Leaving_Combat_Distance模组配置选项,改用基于时间的战斗检测(因为远距离战斗仍应被视为战斗)。
- 你现在可以在创造模式下处于战斗状态,但前提是你未被锁定。如果你不希望创造模式下有战斗音乐,可以使用
- 修复了 Minecraft 1.19.2 及以上版本中导致战斗追踪敌人不正确的问题。
- 整体改进了战斗追踪功能。
- 改进了边缘情况下的错误提示信息。
- 修复了一个低级错误:消息(错误、通知等)已创建但未打印到聊天栏……
版本 2.7.0:
- 改进了结构缓存和交集检查。
- 添加了在音乐配置中重新启用原版音乐播放器的功能。
- 使用
use_vanilla_player命令(而非play命令)来启用原版播放器。
- 使用
- 添加了类型为
list<combatant>的$combatants属性,使用了新的combatant类型。combatant包含四个字段(通过combatant.field访问):type_id、health、maxHealth和health_percent。- 这可用于根据战斗生物的类型和状态选择音乐。
- 添加了
int.floatVal和float.intVal字段,用于在整数和小数之间进行转换。 - 在配置语言中添加了算术运算符
+、-、*和/。 - 添加了玩家事件
@on_fire和@in_powder_snow。 - 为列表添加了
length字段。list.length将获取列表的长度。 - 为所有支持的音频文件添加了对
loopstart和looplength/loopend元数据标签的支持。- 这将使音乐正常开始,但在到达循环间隔末尾后继续循环指定部分。
loopstart和looplength/loopend均以采样(最小的音频数据单元)为单位测量。
- 当音乐目录中包含未使用的音乐文件时,模组现在会在日志中打印警告。
- 当音乐配置中存在未使用的标识符(例如播放列表)时,模组现在会打印警告。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧