模组功能
本模组旨在实现「客户端」整合包的自动更新。当「服务器」整合包更新时,这些整合包会自动同步更新。
工作原理
启动客户端时,如果检测到有可用更新,会弹出一个窗口通知玩家整合包存在更新。窗口中还会提供一个 Update(更新)按钮,点击后将触发整合包更新并关闭 Minecraft。
服务器整合包
该整合包实际上是一个 GitHub 仓库,其中包含一个记录服务器整合包版本的文件以及一个存放模组的文件夹。
如何配置服务器整合包
- 创建一个 GitHub 仓库。(公开访问权限)
- 在仓库内创建一个名为
version.json 的文件。
- 在
version.json 文件中写入以下内容:
{
"version": "1.0.0"
}
(此版本号代表服务器整合包的版本。每次添加更新时,都需要递增此版本号。)
将模组上传至一个名为 mods.zip 的压缩文件中(模组应直接位于压缩文件的根目录下,即压缩文件内不应包含任何文件夹)。
客户端整合包
该整合包供使用这些模组的玩家使用。它将包含一个 pxl-updater.json 文件,其中显示当前的客户端版本和 GitHub 仓库链接。
如何配置客户端模组
- 安装模组并使用它首次启动 Minecraft。
- 在你的启动器中,你会找到一个
config 文件夹,里面有一个名为 pxl-updater.json 的文件。
- 编辑此文件以更新
repositoryUrl 的值。version 将自动与 GitHub 仓库中的版本同步。
What does the Mod do?
This mod is designed for the automatic updating of "Client" ModPacks. These ModPacks are automatically updated whenever the "Server" ModPack is updated.
How does it work?
When the client is launched, if it detects an update, a window will pop up, notifying the player that the modpack has an update. There will also be a Update button, which will trigger the modpack update and then close Minecraft.
Server ModPack
This ModPack is actually a GitHub repository that contains a file with the server ModPack version and a folder with the mods.
How to set up the Server ModPack
- Create a GitHub repository. (Public)
- Inside the repository, create a file called
version.json.
- In the version.json file, write the following:
{
"version": "1.0.0"
}
(This version represents the server modpack version. You’ll need to increase this version whenever you add updates.)
Upload the mods in a compressed file named mods.zip (The mods should be directly in the main directory of the compressed file, meaning there should be no folders inside the compressed file.)
Client ModPack
This ModPack is for the player using these mods. It will include a pxl-updater.json file, where the current client version and the GitHub repository link will appear.
How to set up the Client Mod
- Install the mod and launch Minecraft with it for the first time.
- In your launcher, you’ll find a
config folder, and inside it, you’ll see a file called pxl-updater.json.
- Edit this file to update the
repositoryUrl value. The version will automatically sync to the one in the GitHub repository.
评论 0
登录后参与评分
还没有评论,来抢沙发吧