Minecraft Music Player
[!IMPORTANT]
请先安装所需的依赖项
必须安装以下两个 API 和外部工具的正确版本,否则 Minecraft Music Player 将无法加载。
必需的模组依赖项
外部工具
- FFmpeg: 用于音乐播放。下载 FFmpeg 并将其添加到系统
PATH 环境变量中,或在模组配置中设置其可执行文件路径。
- yt-dlp: 仅用于在线文本搜索、支持公共媒体页面以及提取公共播放列表。下载 yt-dlp
这是一款客户端音乐播放器模组,它将本地音乐、直接 URL 链接、在线搜索、播放列表、紧凑的 HUD/迷你播放器、游戏音频闪避(ducking)以及环境音乐处理功能带入 Minecraft,同时保持界面风格接近原版。
该模组的设计仅影响 Music Player 的音乐播放。它不会替换、取消或削弱原版的音效。
✨ 功能特性
1. 播放源与资料库
- 本地音乐库: 将受支持的音频文件放入
config/minecraftmusicplayer/music 目录,然后打开 Local(本地)选项卡并选择 Refresh List(刷新列表)。系统将递归扫描最多四层的子文件夹。
- 支持的本地格式: 通过 FFmpeg 播放管线支持
mp3、flac、wav、aac、ogg、opus、vorbis、webm、mkv、mp4 和 m4a。
- 直接 URL 播放: 在 Player(播放器)选项卡中粘贴直接的音频 URL 或受支持的公共媒体页面 URL。
- Play URL(播放 URL)启动一个临时的播放器会话,并将当前曲目加入队列。
- Queue URL(加入队列 URL)显式地将解析后的曲目添加到队列中。
- 在线搜索: 通过 yt-dlp 搜索公共媒体资源,然后立即播放结果,或将其添加到队列/播放列表中。
- 队列与播放列表: 在游戏中管理播放队列和持久化播放列表,包括曲目重排序以及播放列表的导入/导出工作流。
- 可靠的元数据与封面: 会话缓存使近期结果响应迅速,在后台刷新过时的提供商数据,并在曲目没有可用缩略图时使用种子本地模板封面。
2. 兼容原版的内置播放器
- 五个专注选项卡: 包含 Player(播放器)、Search(搜索)、Queue(队列)、Local(本地)和 Library(资料库)。
- 紧凑的控制: 播放、暂停、停止、上一首、下一首、重复、随机、队列操作、过滤器、排序和可滚动列表均基于 Minecraft 的原版视觉语言设计。
- 稳定的播放所有权: 活动的
> 标记跟随真正拥有播放权的来源——队列、本地、播放列表库或直接播放器 URL——并在切换选项卡或重新打开屏幕后保持正确。
- 安全的游戏内暂停菜单: 从单人游戏的暂停菜单打开 Music Player 会在后台保持世界暂停;在正常游戏过程中使用游戏内按键绑定打开它则会让世界继续运行。
3. HUD、迷你播放器与控制
- 正在播放 HUD: 显示当前曲目,提供可配置的唱片/封面展示方式、位置以及进入/退出动画。
- 迷你播放器: 一个紧凑的非暂停播放器屏幕,具备完整的传输控制功能和四个角落的位置选项。
- 封面选项: 在 HUD 封面槽位中使用原版唱片、自定义唱片或当前曲目的缩略图。
- 持久设置: 音频、HUD、迷你播放器、播放列表和本地封面设置均存储在
config/minecraftmusicplayer 下。
4. 自适应游戏音频闪避(Ducking)
- 感知游戏的音乐: Music Player 的音量会平滑降低,以避让选定的高优先级游戏声音,包括爆炸、Boss、战斗、投射物、烈焰人/恶魂/火球事件、雷声和其他危险提示音。
- 独立的音量控制: 最终播放电平尊重您的 Music Player 音量和 Minecraft 音乐音量。闪避效果永远不会覆盖这两个滑块。
- 可配置的反应: 可在 Audio Settings(音频设置)中调整闪避启用状态、最低音量、攻击时间(attack)和释放时间(release)。
- 原版音频不受影响: 该模组仅监听游戏声音;它从不改变这些声音的音量、替换它们或取消它们。
5. 环境数字信号处理(DSP)
- 上下文感知的音乐处理: Music Player 可以适应开放世界、洞穴、水下、下界和末地等环境。
- 洞穴: 为封闭空间提供更深的房间尾音。
- 水下: 更黑暗、低沉的低通滤波效果。
- 下界: 更密集、更黑暗的氛围。
- 末地: 稳定、宽敞的配置文件,无音量泵送效应。
- 平滑过渡: 环境配置文件的变化采用交叉淡入淡出,以避免咔嗒声、爆裂声和突然的 DSP 重置。
- 安全的生命周期处理: 寻址、更换曲目、暂停、离开世界以及关闭 Minecraft 时,都会干净地清除 DSP 状态。
- 可选功能: 随时可以在音频设置中独立切换
Environmental DSP(环境 DSP)。
⌨️ 默认按键绑定
所有绑定均可在 Minecraft Options → Controls(选项 → 控制)中更改。
| 动作 |
默认按键 |
| 打开 Music Player |
M |
| 打开 Mini Player |
F6 |
| 播放 / 暂停 |
F7 |
| 上一首 |
F8 |
| 下一首 |
F9 |
| 停止播放 |
F10 |
| 切换 HUD 封面 |
H |
⚙️ 客户端命令
这些是客户端命令,不需要服务器端安装。
/musicplayer overlay on|off|toggle — 显示或隐藏正在播放的 HUD。
/musicplayer overlay anchor <top_left|top_middle|top_right|bottom_left|bottom_middle|bottom_right> — 将 HUD 移动到预设锚点。
/musicplayer overlay move <x> <y> — 设置手动 HUD 偏移量。
/musicplayer overlay reset — 重置 HUD 位置和设置。
/musicplayer overlay animations on|off — 切换 HUD 进入/退出动画。
/musicplayer overlay style <custom|vanilla|thumbnail> — 选择 HUD 唱片/封面风格。
/musicplayer miniplayer position <top_left|top_right|bottom_left|bottom_right> — 移动迷你播放器。
/musicplayer miniplayer reset — 将迷你播放器重置为右下角。
?️ 要求
- 必需的库:
- Architectury API for NeoForge
13.0.8 或更高版本
- UI Lib for NeoForge
1.0-1.21.1
- 外部播放工具: FFmpeg 必须已安装并位于系统
PATH 中,或进行显式配置。
- 在线搜索 / 公共页面解析: 文本搜索、支持的公共媒体页面以及公共歌单提取需要 yt-dlp。
? 安装
- 安装与 Architectury API 和 UI Lib 匹配的构建版本。
- 安装 FFmpeg。将其添加到系统
PATH,或按如下所述配置其可执行文件路径。
- 如果需要在线搜索或公共页面/歌单解析,请安装 yt-dlp。
- 将 Minecraft Music Player JAR 文件和所需的库 JAR 文件放入 Minecraft 的
mods 文件夹中。
- 启动 Minecraft 一次。模组会自动创建其配置文件夹。
? 快速入门
本地音乐
- 在世界中按
M 打开音乐播放器。
- 打开 Local(本地) 标签页。
- 选择 Open Music Folder(打开音乐文件夹) 并将音乐复制到该文件夹,或直接放置文件到:
.minecraft/config/minecraftmusicplayer/music
- 选择 Refresh List(刷新列表)。
- 播放音轨、将其添加到队列或添加到歌单。
在线音乐
- 确保已安装或配置了 yt-dlp。
- 打开 Search(搜索) 以搜索公共媒体,或打开 Player(播放器) 并粘贴直接音频链接/公共页面 URL。
- 使用 Play URL(播放链接) 进行临时播放,或使用 Queue URL(加入队列链接) 将其添加到队列。
小技巧: 保持 FFmpeg 和 yt-dlp 为最新版本,然后在本地标签页中使用以实现快速离线播放,并在游戏过程中使用队列/库标签页进行较长时长的播放。
另一个小技巧: 如果你喜欢我的模组,请通过 PayPal 支持我:
Minecraft Music Player
[!IMPORTANT]
Install the required dependencies first
Minecraft Music Player will not load unless the correct builds of both APIs and External tools below are installed.
Required mod dependencies
External tools
- FFmpeg: required for music playback. Download FFmpeg and add it to your system
PATH, or configure its executable path in the mod.
- yt-dlp: required only for online text search, supported public media pages, and public playlist extraction. Download yt-dlp
A client-side music player mod , it brings local music, direct URLs, online search, playlists, a compact HUD/Mini Player, gameplay audio ducking, and environmental music processing into Minecraft while keeping the interface close to the vanilla style.
The mod is designed to affect Music Player playback only. It does not replace, cancel, or reduce vanilla sound effects.
✨ Features
1. Playback Sources & Library
- Local Music Library: Place supported audio files in
config/minecraftmusicplayer/music, then open the Local tab and select Refresh List. Subfolders are scanned up to four levels deep.
- Supported Local Formats:
mp3, flac, wav, aac, ogg, opus, vorbis, webm, mkv, mp4, and m4a through the FFmpeg playback pipeline.
- Direct URL Playback: Paste a direct audio URL or a supported public media-page URL in the Player tab.
- Play URL starts a temporary Player session and does not add the track to the Queue.
- Queue URL explicitly adds the resolved track to the Queue.
- Online Search: Search public media through yt-dlp, then play a result immediately or add it to the Queue / a playlist.
- Queue & Playlists: Manage playback queues and persistent playlists in-game, including track reordering and playlist import/export workflows.
- Reliable Metadata & Artwork: Session caches keep recent results responsive, refresh stale provider data in the background, and use seeded local template artwork when a track has no usable thumbnail.
2. Vanilla-Friendly In-Game Player
- Five Focused Tabs: Player, Search, Queue, Local, and Library.
- Compact Controls: Play, pause, stop, previous, next, repeat, shuffle, queue actions, filters, sorting, and scrollable lists are built for Minecraft's vanilla visual language.
- Stable Playback Ownership: The active
> marker follows the source that truly owns playback—Queue, Local, Playlist Library, or a direct Player URL—and remains correct after changing tabs or reopening the screen.
- Pause-Menu Safe: Opening Music Player from the singleplayer Pause Menu keeps the world paused in the background. Opening it with the in-game keybind during normal play leaves the world running.
3. HUD, Mini Player & Controls
- Now Playing HUD: Shows the current track with configurable record/artwork presentation, placement, and entrance/exit animations.
- Mini Player: A compact non-pausing player screen with full transport controls and four corner positions.
- Artwork Options: Use Vanilla Records, Custom Records, or the active track thumbnail for the HUD artwork slot.
- Persistent Settings: Audio, HUD, Mini Player, playlist, and local-artwork settings are stored under
config/minecraftmusicplayer.
4. Adaptive Gameplay Audio Ducking
- Gameplay-Aware Music: Music Player volume lowers smoothly for selected high-priority gameplay sounds, including explosions, bosses, combat, projectiles, blaze/ghast/fireball events, thunder, and other danger cues.
- Independent User Volume: The final playback level respects your Music Player volume and Minecraft Music volume. Ducking never overwrites either slider.
- Configurable Response: Adjust ducking enablement, minimum volume, attack, and release in Audio Settings.
- Vanilla Audio Stays Untouched: The mod observes gameplay sounds only; it never changes their volume, replaces them, or cancels them.
5. Environmental DSP
- Context-Aware Music Processing: Music Player can adapt to Open World, Cave, Underwater, Nether, and End environments.
- Cave: A deeper room tail for enclosed spaces.
- Underwater: A darker, submerged low-pass sound.
- Nether: A denser, darker atmosphere.
- End: A stable, spacious profile without volume pumping.
- Clean Transitions: Environmental profile changes crossfade to avoid clicks, crackles, and abrupt DSP resets.
- Safe Lifecycle Handling: Seeking, changing tracks, pausing, leaving a world, and closing Minecraft clear DSP state cleanly.
- Optional: Toggle
Environmental DSP independently in Audio Settings at any time.
⌨️ Default Keybinds
All bindings can be changed in Minecraft Options → Controls.
| Action |
Default key |
| Open Music Player |
M |
| Open Mini Player |
F6 |
| Play / Pause |
F7 |
| Previous Track |
F8 |
| Next Track |
F9 |
| Stop Playback |
F10 |
| Toggle HUD artwork |
H |
⚙️ Client Commands
These are client-side commands and do not require server installation.
/musicplayer overlay on|off|toggle — Show or hide the Now Playing HUD.
/musicplayer overlay anchor <top_left|top_middle|top_right|bottom_left|bottom_middle|bottom_right> — Move the HUD to a preset anchor.
/musicplayer overlay move <x> <y> — Set a manual HUD offset.
/musicplayer overlay reset — Reset the HUD position and settings.
/musicplayer overlay animations on|off — Toggle HUD entrance/exit animations.
/musicplayer overlay style <custom|vanilla|thumbnail> — Select the HUD record/artwork style.
/musicplayer miniplayer position <top_left|top_right|bottom_left|bottom_right> — Move the Mini Player.
/musicplayer miniplayer reset — Reset the Mini Player to Bottom Right.
🛠️ Requirements
- Required libraries:
- Architectury API for NeoForge
13.0.8 or newer
- UI Lib for NeoForge
1.0-1.21.1
- External playback tool: FFmpeg must be installed and available on your system
PATH, or configured explicitly.
- Online search / public page resolution: yt-dlp is required for text search, supported public media pages, and public playlist extraction.
📥 Installation
- Install the matching builds of Architectury API and UI Lib.
- Install FFmpeg. Put it on your system
PATH, or configure its executable path as described below.
- Install yt-dlp if you want online search or public page / playlist resolution.
- Drop the Minecraft Music Player JAR and the required library JARs into your Minecraft
mods folder.
- Launch Minecraft once. The mod creates its configuration folders automatically.
🎵 Quick Start
Local music
- Press
M in a world to open Music Player.
- Open the Local tab.
- Select Open Music Folder and copy music into the folder, or place files directly in:
.minecraft/config/minecraftmusicplayer/music
- Select Refresh List.
- Play a track, add it to Queue, or add it to a playlist.
Online music
- Make sure yt-dlp is installed or configured.
- Open Search to search public media, or open Player and paste a direct audio/public page URL.
- Use Play URL for temporary playback or Queue URL to add it to the Queue.
Pro Tip: Keep FFmpeg and yt-dlp up to date, then use the Local tab for quick offline playback and the Queue / Library tabs for longer in-game sessions.
Another Pro Tip: If you like my mod please support my mod VIA paypal :
评论 0
登录后参与评分
还没有评论,来抢沙发吧