Login Music
一款简单的 Minecraft 模组,可在玩家进入世界时播放音乐。
本模组的开发使用了 AI 辅助。
灵感来源于 TartaricAcid 的 Net Music!
| 里程碑 | 重大变更 |
|---|---|
| 1.1.0 | javafx 已被 com.googlecode.soundlibs:mp3spi 取代,现在提供 MP3 支持。 |
| 1.2.0 | 音乐配置已更改为 JSON 格式。 |
| 1.2.1 | 音乐可直接通过互联网播放而无需下载;新增歌词支持! |
| 1.2.2 | 音频后端加载,服务器上的玩家可接收来自其他玩家的音频。 |
| 1.2.6 | 添加缓存系统。重构代码。 |
Logo 来源于 此处,由 juicy_fish 设计。
功能
- 支持 MP3
- 音频后端加载
- 根据玩家名称(UUID)播放不同的音乐
- 播放音乐时显示歌词
- ...
文件结构
破坏性变更:
自模组版本 1.2.5 起,配置文件存储位置已更改!如果您从旧版本升级,请将它们移动到新位置!
所有音乐文件均存储在 /data/login_music 文件夹中。
{version folder}
├── config
│ ├── login_music-music.json # 具体音乐配置
│ ├── login_music-client.toml # 客户端配置
│ └── login_music-common.toml # 通用配置
│
├── data/login_music # 存储音乐文件
│ ├── MusicsCache
│ │ ├── music_1.mp3
│ │ ├── music_2.wav
│ │ └── ...
│ └── LyricsCache
│ ├── music_1.lrc
│ ├── music_2.lrc
│ └── ...
└── ...
配置
自模组版本 1.2.0 起,音乐配置已更改为 JSON 格式,如下所示。
如果您加入安装了此模组的服务器,服务器端的配置文件具有更高优先级,将会覆盖您的自定义设置。
{
"defaultMusic": {
"id": "Default",
"musicName": "Default.mp3",
"musicPath": "https://www.example.com/example.mp3",
"lyricName": "Default.lrc",
"lyricPath": "https://www.example.com/example.lrc"
},
"musics": [
{
"id": "Steve",
"musicName": "login_music_1.mp3",
"musicPath": "https://www.example.com/login_music_1.mp3",
"lyricName": "login_music_1.lrc",
"lyricPath": "https://www.example.com/login_music_1.lrc"
},
{
"id": "Alex",
"musicName": "login_music_2.mp3",
"musicPath": "https://www.example.com/login_music_2.mp3",
"lyricName": "login_music_2.lrc",
"lyricPath": "https://www.example.com/login_music_2.lrc"
}
]
}
如果将
InternetAccess设置为true(默认为false),则音乐将被下载;否则,将通过网络音频流播放音乐,这可能导致进入世界时出现短暂暂停。
例如,当名为 Steve 的玩家进入世界时,模组会首先在 data/login_music 文件夹中查找与名称 Steve 匹配的音乐(在这种情况下是 login_music_1.mp3)。如果之前失败,则会尝试从其相关 URL 下载。
如果文件夹中存在同名文件,即使该文件与 URL 不匹配,也会跳过下载。
如果需要添加更多条目,请遵循 JSON 规则。
自模组版本 1.2.4 起,如果已安装 Cloth Config API,您可以从主菜单打开 Login Music Config。
命令
命令系统已在 1.2.6 版本中重建,所有命令都需要权限等级 2。
| 命令 | 功能 |
|---|---|
/loginmusic reload |
重新加载音乐配置 |
/loginmusic list |
显示当前可用的音乐配置 |
/loginmusic stop |
停止当前正在播放的音乐 |
/loginmusic play |
重播登录音乐 |
/loginmusic cache list |
显示缓存文件 |
/loginmusic cache clear |
清除缓存文件 |
Login Music
A simple Minecraft mod that can play music when players join in the world.
This mod uses AI to assist in development.
Inspired by TartaricAcid's Net Music !
| Milestone | Big changes |
|---|---|
| 1.1.0 | javafx has given place to com.googlecode.soundlibs:mp3spi, which provides MP3 support now. |
| 1.2.0 | the music config has changed to JSON type. |
| 1.2.1 | Music can be played directly through the Internet without downloading; lyrics support! |
| 1.2.2 | Audio backend loading, Players can receive audio from other players on the server. |
| 1.2.6 | Add cache system. Refactor the code. |
The logo comes from here, designed by juicy_fish.
Functions
- MP3 supported
- Audio backend loading
- Play different musics based on the player's name (uuid)
- Show lyrics while playing music
- ...
File Structure
Destructive changes:
Since mod version 1.2.5, the config file's storage has been changed! If you upgrade from previous version, please move them to the new place!
All music files are stored in the /data/login_music folder.
{version folder}
├── config
│ ├── login_music-music.json # Specific musics
│ ├── login_music-client.toml # Client config
│ └── login_music-common.toml # Common config
│
├── data/login_music # Store music files
│ ├── MusicsCache
│ │ ├── music_1.mp3
│ │ ├── music_2.wav
│ │ └── ...
│ └── LyricsCache
│ ├── music_1.lrc
│ ├── music_2.lrc
│ └── ...
└── ...
Configuration
Since mod version 1.2.0, the music config has changed to JSON type, just as shown below.
If you enter a server with this mod, the config file on the server has higher priority, which will cover your custom settings.
{
"defaultMusic": {
"id": "Default",
"musicName": "Default.mp3",
"musicPath": "https://www.example.com/example.mp3",
"lyricName": "Default.lrc",
"lyricPath": "https://www.example.com/example.lrc"
},
"musics": [
{
"id": "Steve",
"musicName": "login_music_1.mp3",
"musicPath": "https://www.example.com/login_music_1.mp3",
"lyricName": "login_music_1.lrc",
"lyricPath": "https://www.example.com/login_music_1.lrc"
},
{
"id": "Alex",
"musicName": "login_music_2.mp3",
"musicPath": "https://www.example.com/login_music_2.mp3",
"lyricName": "login_music_2.lrc",
"lyricPath": "https://www.example.com/login_music_2.lrc"
}
]
}
The music will be downloaded if
InternetAccessis settrue(the default setting isfalse), otherwise, the music is played through network audio streams, which may cause a short pause when entering a world.
For example, When a player named Steve enters the world, the mod will try to find the music matched the name Steve (in this case it's login_music_1.mp3 ) in the folder data/login_music first. Then try to download it from its related url if it has failed before.
If there is a file with the same name in the folder, it will skip the download even if the file does not match the URL.
If more entries need to be added, please follow the JSON's rule.
Since mod version 1.2.4, you can open Login Music Config from the main menu if Cloth Config API has been installed.
Command
The Command system has been rebuilt since 1.2.6, all the commands need permission level 2.
| Command | Function |
|---|---|
/loginmusic reload |
reload music config |
/loginmusic list |
show music config available currently |
/loginmusic stop |
stop you current playing music |
/loginmusic play |
replay your login music |
/loginmusic cache list |
show the cached file |
/loginmusic cache clear |
clear the cached file |
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
下载 Login Music
- 修复音乐目录错误。
- 使用类型检测器改进了音乐加载方法。
重要提示:默认音乐已移至新位置:
{
"defaultMusic": {
"id": "Default",
"musicName": "Default.mp3",
"musicPath": "https://www.example.com/example.mp3",
"lyricName": "Default.lrc",
"lyricPath": "https://www.example.com/example.lrc"
},
"musics": [
{
"id": "Steve",
"musicName": "login_music_1.mp3",
"musicPath": "https://www.example.com/login_music_1.mp3",
"lyricName": "login_music_1.lrc",
"lyricPath": "https://www.example.com/login_music_1.lrc"
},
{
"id": "Alex",
"musicName": "login_music_2.mp3",
"musicPath": "https://www.example.com/login_music_2.mp3",
"lyricName": "login_music_2.lrc",
"lyricPath": "https://www.example.com/login_music_2.lrc"
}
]
}
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧