跳到正文

Music Player [PORT]

作者:misaki_schulz

从 YouTube、SoundCloud 或电台直播等多种来源播放音乐

收藏

介绍

介绍由机器翻译自 Modrinth 原页面,仅供参考。

原模组:音乐播放器

使用此模组,你无需借助外部程序即可听音乐并管理播放列表。

此模组需要 Fabric API!

如何使用此模组?
按 F8 可以打开播放列表控制菜单。还有一些其他按键绑定,可用于暂停和切换曲目。在这里,你可以创建播放列表。
A wide, pixel-art music player interface with a dark brown, block-textured background resembling Minecraft. Across the top is a playback control bar: a green shuffle button, previous-track button, pause button, next-track button, and repeat button. Beneath them is a gray progress bar with yellow “00:00” timestamps on both sides. In the upper-right corner, a horizontal volume control reads “Volume: 8%,” with a gear-shaped settings button beside it. A back-arrow button appears in the upper-left corner.  Below the player controls is an “Add playlist” section with a long empty black text field and a square add button showing a folder-like outline with a plus sign.  The lower portion contains a large black playlist panel. Four playlists are listed vertically, with playlist names in yellow and entry counts in white:  * “Youtube Music” — “1 Entry” * “Soundcloud songs” — “5 Entries” * “Tests” — “3 Entries” * “Radio” — “2 Entries”  The “Youtube Music” row is selected and outlined with a thin light-gray rectangular border. On the right side of each playlist row are three square gray buttons: a play triangle, a share/export-style curved arrow, and a black circle containing an “X” for deletion.

播放列表目前还是空的。

A wide, pixel-art music player interface with a dark brown, block-textured background resembling Minecraft. In the upper-left corner is a small gray back-arrow button. Centered along the top is a row of playback controls: a green shuffle button, previous-track button, pause button, next-track button, and repeat button. Below them is a horizontal gray progress bar, with yellow “00:00” timestamps at both the left and right ends, indicating that no track is playing.  In the upper-right corner, a horizontal volume control reads “Volume: 8%,” with a gray gear-shaped settings button beside it. Directly below is a square blue-gray button containing a black circle with a white plus sign, likely used to add music or create an entry.  Most of the screen is occupied by a large, empty, nearly black rectangular content panel with subtle diagonal texture. No songs, playlists, text, or other entries are displayed inside the panel.

不过我们现在就来添加内容!

A wide, pixel-art “Add new tracks” screen with a dark brown, block-textured background resembling Minecraft.  At the top-left is a small gray back-arrow button. Centered near the top is the title “Add new tracks.” Beneath it, the upper section provides three ways to add music:  On the left, the label “Enter url to track” appears above a long, empty black text field. To the right, the label “Open file explorer” appears above two large gray buttons labeled “Load file” and “Load folder.”  Below this is a “Search for track” section. A red YouTube-style play icon sits at the left of a long black search field containing the typed word “hey.” To the right, beneath the search bar, is a large gray “Add all” button.  The lower half of the screen is a dark results panel showing YouTube search results. Each result has a blue track title, an orange channel or artist name underneath, a yellow duration near the right side, and a gray square button with a black circle and plus sign at the far right. A vertical scrollbar is visible along the panel’s right edge.  Visible results are:  “Andreas Bourani – Hey (Official Video)” by “Digster Pop,” duration “04:00.”  “EGOVERT & KIL – HEY!” by “ELEVATOR,” duration “02:36.”  “Fais – Hey ft. Afrojack (Official Music Video)” by “Afrojack,” duration “04:09.”  “Blumio – Hey Mr. Nazi (official video) Produziert von Don Tone” by “Gold School Records,” duration “04:12.”  “OutKast – Hey Ya! (Official Music Video)” by “OutKast,” duration “05:03.”

此播放器支持多种来源(感谢 sedmelluq 提供 lavaplayer)。

支持的来源:

  • YouTube
  • SoundCloud
  • Bandcamp
  • Vimeo
  • Twitch 直播
  • 本地文件
  • HTTP URL

文件格式:

  • MP3
  • FLAC
  • WAV
  • Matroska/WebM(AAC、Opus 或 Vorbis 编码)
  • MP4/M4A(AAC 编码)
  • OGG 流(Opus、Vorbis 和 FLAC 编码)
  • AAC 流
  • 流媒体播放列表(M3U 和 PLS)

你可以粘贴直达链接,也可以在 YouTube 或 SoundCloud 上搜索歌曲。你还可以加载单个文件,或加载包含歌曲的整个文件夹。

加载完成后,你需要将歌曲添加到播放列表。你可以选择要添加的歌曲,也可以将它们全部添加到播放列表。

现在可以返回并按下播放。
A wide, pixel-art music player interface with a dark brown, block-textured background resembling Minecraft.  At the upper-left is a small gray back-arrow button. Beside it, the currently playing track is shown in yellow text: “EGOVERT & KIL – HEY!” with “ELEVATOR” beneath it.  Centered across the top is a row of playback controls: a green-highlighted shuffle button, previous-track button, pause button, next-track button, and repeat button. Below them is a horizontal progress bar, filled green for roughly one-third of its length. Yellow timestamps show “00:56” elapsed on the left and “02:35” total on the right.  In the upper-right corner is a volume control labeled “Volume: 8%,” followed by a gray gear-shaped settings button. Below it is a square blue-gray add button containing a black circle with a white plus sign.  The main content area is a large, nearly black playlist panel. One track appears at the top inside a thin light-gray border. Its title, “EGOVERT & KIL – HEY!,” is displayed in red, with the artist “ELEVATOR” beneath it in orange. The track duration, “02:36,” appears in yellow near the right side. At the far right are three controls: a pause button, a pair of up-and-down arrows for reordering the track, and a delete button marked with an “X.” The rest of the playlist panel is empty.

你可以为音乐播放器设置一些选项。播放器支持随机播放、循环播放列表、单曲循环、快进和快退。你还可以暂停歌曲;如果支持,也可以点击进度条跳转到指定位置。

游戏内会显示一个叠加层,提供相关信息。

A first-person Minecraft gameplay screenshot taken from the bottom of a deep, narrow ravine. The view is angled sharply upward between steep gray stone cliffs, with a strip of bright blue sky visible at the top. The ravine walls are irregular and blocky, with ledges, overhangs, cavities, and protruding stone formations. Patches of lighter gravel-like blocks, dark coal ore, reddish granite, and pale sand or sandstone appear among the stone. A darker cave opening is visible near the center-left in the distance.  A small white crosshair is centered on the stone wall. The player’s blocky right arm appears in the lower-right corner, with a tan hand and dark navy-blue sleeve.  Along the bottom is the Minecraft survival HUD. Several red health hearts are filled while the last few are empty. The hunger bar to the right is mostly depleted, with only a few food icons remaining. Beneath them is an empty nine-slot hotbar, with the first slot highlighted by a white border.  A compact music-player overlay occupies the lower-right corner. It has a black background and yellow pixel text reading “EGOVERT & KIL – HEY!” with “ELEVATOR” below. A green progress bar shows the song partway through, with “01:21” elapsed on the left and “02:35” total duration on the right.

在游戏内菜单中,你可以切换是否显示控制叠加层,以便快速管理音乐播放器。

<img src="https://i.imgur.com/lRXEPvZ.png" alt="一张 Minecraft 游戏截图:在昏暗的第一人称视角下,深石峡谷或洞穴内打开了 游戏菜单。暂停的游戏画面仍可透过半透明的黑色遮罩看到。灰色石壁在两侧陡然升起,带有不规则的岩架、较暗的凹洞,以及矿石或颜色不同的岩石斑块。画面右下角可见玩家方块状的右臂,穿着深蓝色袖子,露出棕褐色的手。底部隐约可见生存模式 HUD:几颗红色生命值爱心、几乎耗尽的饥饿值,以及一个空的九格快捷栏,其中第一格处于选中状态。画面上方中央显示白色标题 “游戏菜单”。 下方垂直排列着六个大型灰色按钮: * 返回游戏 * 进度 和 统计 并排显示 * 选项…… 和 对局域网开放 并排显示 * 保存并退回标题界面 音乐播放器叠加层仍显示在屏幕顶部。左上角以黄色文字显示曲目 “EGOVERT & KIL – HEY!”,下方是 “ELEVATOR”。顶部中央是播放控制按钮:绿色随机播放按钮、上一曲、暂停、下一曲和循环播放按钮。下方的进度条大部分为绿色,左侧显示已播放时间 “01:58”,右侧显示总时长 “02:35”。右上角是音量控制,标注为 “音量:8%”,旁边还有分享或外部操作按钮,以及齿轮形状的设置按钮。" loading="lazy">

右上角有一个设置图标。在设置菜单中,你可以切换一些选项,例如 GUI 中的按键绑定、菜单叠加层、游戏内叠加层,以及游戏内叠加层的位置。

настройки мода

此模组可以打包进任何整合包。
上方提供了源代码链接;源代码采用 Apache License 2.0 许可。
请在 GitHub 上报告 Bug。

常见问题

Music Player [PORT] 支持哪些 Minecraft 版本?

Music Player [PORT] 支持 Minecraft Java 版 1.20.1–26.3,共 17 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

Music Player [PORT] 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分