SoundtrackPlayer
This mod allows you to play persistent songs or sounds even when you're not in the world/server.
截图
介绍
Play your own music in Minecraft and keep everyone on the same second of the song. Use sound events, ogg files from a resource pack, a direct link to an ogg, mp3 or wav file, or any link: YouTube, SoundCloud, videos…
Commands:
/soundtrack
/soundtrack play resource [volume] [fadeinTicks] [fadeoutTicks] [loop] [fadeloop] [pitch] [category]
/soundtrack play url [volume] …
/soundtrack stop [fadeoutTicks]
Pick resource and the tab completion shows your soundtracks folder files, modded and vanilla sounds. Pick url and paste the link. No quotes needed.
Soundtracks folder
Put your .ogg files in assets/<namespace>/soundtracks/ inside a resource pack, no sounds.json needed. Press F3+T and they show up in the tab completion as namespace:soundtracks/song.ogg.
Links
Paste a direct link to an ogg, mp3 or wav file and it plays. Each player downloads it once and keeps it cached.
Links to pages like YouTube or SoundCloud and to videos (mp4, webm…) work too. The first time you use one, the mod quietly downloads the free tools it needs (yt-dlp, deno and ffmpeg) from their official pages, nothing to install by hand.
Players can turn links off in config/soundtrackplayer.json.
Always in sync
If someone joins late, leaves and comes back, or reloads their resource packs, the song picks up at the same second as everyone else. Loops too. F3+T and the pause menu don’t cut the music anymore.
Fades, loops and categories
- fadein / fadeout: in ticks (20 = 1 second)
- stop with a fade: the fadeout in stop overrides the one the song was started with. Leave it empty and it uses the original one
- fadeloop: true fades every lap of a loop in and out, false only fades the first start and the stop
- pitch: 0.5 to 2.0, it changes the speed too
- category: SOUNDTRACKS by default, or any vanilla one like MUSIC, AMBIENT or RECORDS so it follows that slider
Running the same command again with the same id and sound changes the volume, pitch or fades live, the song keeps going from where it was. Your own soundtracks also keep playing after leaving and joining a world.
Soundtracks slider
There’s a new “Soundtracks” slider in Music & Sounds to control the volume of every soundtrack in the SOUNDTRACKS category. It’s translated to 20 languages.
Servers
- Paper/Spigot: use the SoundtrackplayerPLUGIN plugin:
/soundtrackplugin play <@a/player> <id> <url/resource> <link/sound> ...and/soundtrackplugin stop <@a/player> <id/all> [fadeoutTicks]. It saves everything, so players that join later hear the same thing at the same time. Tab completion shows the ids that are actually playing and the custom sounds your players have. - Singleplayer, Fabric, NeoForge and Forge servers: use the API from your own mod.
API
Server side (every loader, singleplayer included):
Soundtrack boss = Soundtrack.builder("boss", "soundtrackplayer:soundtracks/boss.ogg")
.volume(0.8f).fadeIn(40).fadeOut(60).loop(true).build();
SoundtrackPlayerAPI.playForAll(server, boss);
SoundtrackPlayerAPI.play(player, boss);
SoundtrackPlayerAPI.stopForAll(server, "boss", 100);
Client side: SoundtrackClientAPI to play local tracks, stop them, read or change the Soundtracks volume and listen to tracks starting and stopping.
Plugin: SoundtrackPlayerAPI.get() with the same methods for Paper plugins, plus SoundtrackClientReadyEvent when a player with the mod joins.
Source code and docs: https://github.com/Cotiiii/soundtrackplayer
Available for Fabric 1.20.1 – 26.2, NeoForge 1.20.1 – 26.2 and Forge 1.20.1 / 1.20.4.
常见问题
SoundtrackPlayer 支持哪些 Minecraft 版本?
SoundtrackPlayer 支持 Minecraft Java 版 1.20.1–26.2,共 8 个版本,可用的加载器:Bukkit / Fabric / Forge / NeoForge / Paper / Purpur / Spigot。下载时注意选择和你游戏版本一致的文件。
SoundtrackPlayer 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Bukkit / Fabric / Forge / NeoForge / Paper / Purpur / Spigot,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。
Cotii_Art 的其他作品
查看全部 →
Custom Skyboxes
Custom Skyboxes is a mod that allows you to change the sky,clouds, sun, moon, rain, snow, and stars and custom rifts or Geckolib Models in the sky in real time with a texture or GIF with Commands!
Custom Waypoints
This mod allows you to create custom waypoints with extensive customization and utilities using the editor and commands.
Custom Waypoints
This mod allows you to create custom waypoints with extensive customization and utilities using the editor and commands.
Screentext
Screentext is a Minecraft Mod for Fabric 1.20.1 - 26.2, Neoforge 1.20.1 - 26.2 and Forge 1.20.1 - 1.20.4 that let you display custom Text, Timers, Counters and Texture on the screen with fully customization!
评论
登录后评论和评分