一个更好的唱片机!右键点击你的唱片机,输入你想听的歌曲,它会找到并为你播放。所有人都会听到,并且完全同步。
如果你还没有这首歌,它会在线搜索、下载一次,之后就会为所有人播放。
设置
将 .ogg 文件放入游戏目录下的 music 文件夹中(通常位于 .minecraft/music,首次运行游戏时会自动创建)。
随便给它们起名字,只要搜索能正常工作就行。如果在游戏内的搜索栏中搜索确切的文件名,就不会重复下载同一首歌曲。我很快会改进这个系统。
服务器端
主机需要在其本地机器上安装 yt-dlp 和 ffmpeg,并确保它们已添加到系统 PATH 中。当有人请求尚未缓存的歌曲时,正是这两个工具负责实际的搜索与转换工作。
使用 /juketify radius <方块数> 设置听觉范围,需要 OP 权限,目前还没有特定的权限设置 D:(范围为 16-128,默认值为 64)
使用方法
右键点击一个唱片机(使用空手)以打开搜索界面。手持音乐唱片时,行为仍与原版一致。
输入内容并按回车键。如果你已经拥有该唱片,系统会立即播放最匹配的曲目;否则,它会在线搜索、下载该唱片,并从那时起为范围内所有玩家播放。
- stop:停止所有人的播放
- rescan:重新读取音乐文件夹,无需重启
- 破坏唱片机也会停止播放
在歌曲播放中途加入游戏、切换维度或走入有效范围时,你会同步到当前曲目的播放进度,而不是从头开始。
免责声明
在线搜索功能通过调用运行在主机上的 yt-dlp 和 ffmpeg 来实现——本模组不会捆绑或自动安装它们,你需要自行将它们加入 PATH。具体搜索并下载什么内容完全取决于在唱片机中输入指令的用户。遵守版权法以及 yt-dlp 所抓取网站的与服务条款的责任在于你(以及主机方)。
a better jukebox! right click ur jukebox, enter the music you wanna listen to and it'll find it and play it for you from the jukebox. everyone hears it too, all synced up.
if you don't already have the song it searches for it online, downloads it once, and it just plays for everyone after that.
setup
drop .ogg files into the music folder in your game dir (usually at .minecraft/music, gets created the first time you run the game.).
name them whatever you want so search actually works well. if you search the exact filename on the search bar ingame it won't download a song again, i'll make that system work better soon.
server side
whoever's hosting needs yt-dlp and ffmpeg installed and on PATH on their own machine. that's what actually does the searching and converting when someone asks for a song that isn't cached yet.
hearing range is set with /juketify radius <blocks>, needs op, no specific permission yet D: (16-128, defaults to 64)
using it
right click a jukebox with an empty hand to open the search screen. holding a music disc still works normally.
type something and hit enter. if you already have it, closest match plays instantly. if not, it searches online, downloads it, and plays for everyone inside of the set range from then on.
- stop stops it for everyone
- rescan re-reads the music folder without restarting
- breaking the jukebox stops it too
joining mid-song, changing dimension, or walking into range gets you synced to where the track currently is instead of restarting it.
disclaimer
online search works by calling out to yt-dlp and ffmpeg on whoever's hosting - this mod doesn't bundle or auto-install them, you need them on PATH yourself. what gets searched for and downloaded is entirely up to whoever's typing into the jukebox. it's on you (and whoever's hosting) to comply with copyright law and the terms of service of whatever site yt-dlp pulls from.
评论 0
登录后参与评分
还没有评论,来抢沙发吧