远程资源包
本模组允许你加载从互联网下载内容的资源包。
为什么需要这个?
部分玩家、模组和整合包可能需要保持其资源为最新版本。
此外,某些资源可能无法合法地直接分发,因此需要在运行时动态下载。
配置文件格式
将配置文件放入 .minecraft/config/RemoteResourcePack/ 目录(或其子目录)中,文件名后缀为 .json。
以下是一个示例。请注意配置文件中 不允许 包含注释。
{
"schema": 1, // 必填
// 资源包多久后会过期并需要重新下载
// 例如:2min / 3d / 11h45min14s
// 也可以设置为 "always"(始终更新)或 "never"(从不更新)
"autoUpdate": "2h",
// 资源包配置,控制包含哪些文件
"zipconfig": "https://featurehouse.github.io/epx_packs/v2/dl/zipconfig.json",
"args": { // 动态内容参数
"poem": "random", // 可以是字面量 "random"
"splashes": 0 // 也可以是数字索引
},
// 远程内容 URL 的基础地址
"base": "https://featurehouse.github.io/epx_packs/v2/dl/index.html"
}
zipconfig 格式(同样不允许注释):
{
"static": { // 始终包含的文件
"pack.mcmeta": { // 可以显式定义
"raw": "{\"pack\":{\"pack_format\":18,\"description\":\"Hello World\"}}"
},
"assets/example/test.bin": { // 可以定义为 base64 编码
"base64": "TmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAh"
},
"assets/example/songs/dynamic/rickroll.ogg": { // 可以从互联网下载
"fetch": "https://www.example.net/songs/Rick%20Astley/Never_Gonna_Give_You_Up-HiRes.ogg"
},
"assets/example/lang/fr_fr.json": { // 可以使用相对 URL,其基础 URL 由上述配置中的 "base" 字段定义
"fetch": "/my-interesting-example-mod/resources/i18n/fr_fr.json"
}
},
"dynamic": {
"example-arg": { // 对应上方配置中的 "args"
"default": "random", // 随机选择一个项目。可以在 args.example-arg 中进行覆盖。
"items": [{
"weight": 250, // 可省略,默认为 100
"files": { // 与 "static" 中的格式相同
"assets/example/news/content.json": {"fetch": "/my-interesting-example-mod/news-channel/1.json"},
"assets/example/news/timestamp.txt": {"raw": "2023-10-10T09:24:30+08:00"}
}
}, {
"files": {
"assets/example/news/content.json": {"fetch": "/my-interesting-example-mod/news-channel/2.json"},
"assets/example/news/timestamp.txt": {"raw": "2023-10-10T09:25:21+08:00"}
}
}]
},
"another_arg": {
"default": 0,
"items": [
{},
{
"files": {
"assets/example/textures/items/silver_ingot.png": {
"fetch": "/my-interesting-example-mod/experimental/resources/silver_ingot/2023-10-10.png"
}
}
}
]
}
}
}
模组的内置配置
模组可以将它们的配置文件放在 JAR 根目录下的 RemoteResourcePack.json 中。
这是一个示例:
{
"end-poem-extension/recommended-pack-v2.json": {
"schema": 1,
"_description": [
"End Poem Extension Recommended Pack",
"Contents may differ between downloads as they are picked randomly"
],
"autoUpdate": "2h",
"args": {
"poem": "random",
"splashes": 0
},
"base": "https://featurehouse.github.io/epx_packs/v2/dl/index.html",
"zipconfig": "https://featurehouse.github.io/epx_packs/v2/dl/zipconfig.json"
}
}
配置文件将被转储到 .minecraft/config/RemoteResourcePack/end-poem-extension/recommended-pack-v2.json
(如果不存在则创建),随后被加载。
Remote Resource Pack
This mod enables you to load resource packs to which contents are downloaded from the internet.
Why do I need this?
Some players, mods and modpacks may need to keep their resources up-to-date.
What's more, some resources may not be legal to distribute directly, therefore needed to be downloaded in runtime.
Config Format
Put the config file in .minecraft/config/RemoteResourcePack/ directory (or its subdirs),
suffixed .json.
Here's an example. Please not that comments are not allowed in the config file.
{
"schema": 1, // Mandatory
// How long will the pack be outdated and require re-downloading
// e.g. 2min / 3d / 11h45min14s
// Can be "always" or "never"
"autoUpdate": "2h",
// The pack config, which controls what files are included
"zipconfig": "https://featurehouse.github.io/epx_packs/v2/dl/zipconfig.json",
"args": { // Dynamic content arguments
"poem": "random", // Can be literal "random"
"splashes": 0 // Can be a numeral index
},
// Base URL for the remote contents URL
"base": "https://featurehouse.github.io/epx_packs/v2/dl/index.html"
}
zipconfig format (comments are also not allowed):
{
"static": { // Files that are always included
"pack.mcmeta": { // Can be literally defined
"raw": "{\"pack\":{\"pack_format\":18,\"description\":\"Hello World\"}}"
},
"assets/example/test.bin": { // Can be defined as base64
"base64": "TmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAh"
},
"assets/example/songs/dynamic/rickroll.ogg": { // Can be downloaded from the internet
"fetch": "https://www.example.net/songs/Rick%20Astley/Never_Gonna_Give_You_Up-HiRes.ogg"
},
"assets/example/lang/fr_fr.json": { // Can be relative URL, whose base URL is defined in the above config
"fetch": "/my-interesting-example-mod/resources/i18n/fr_fr.json"
}
},
"dynamic": {
"example-arg": { // See "args" in the above config
"default": "random", // Select an item randomly. Can be overridden in args.example-arg.
"items": [{
"weight": 250, // Can be omitted, defaulting to 100
"files": { // Same as in "static"
"assets/example/news/content.json": {"fetch": "/my-interesting-example-mod/news-channel/1.json"},
"assets/example/news/timestamp.txt": {"raw": "2023-10-10T09:24:30+08:00"}
}
}, {
"files": {
"assets/example/news/content.json": {"fetch": "/my-interesting-example-mod/news-channel/2.json"},
"assets/example/news/timestamp.txt": {"raw": "2023-10-10T09:25:21+08:00"}
}
}]
},
"another_arg": {
"default": 0,
"items": [
{},
{
"files": {
"assets/example/textures/items/silver_ingot.png": {
"fetch": "/my-interesting-example-mod/experimental/resources/silver_ingot/2023-10-10.png"
}
}
}
]
}
}
}
Built-in config for mods
Mods can include their config at RemoteResourcePack.json in the root dir of the JAR.
This is an example:
{
"end-poem-extension/recommended-pack-v2.json": {
"schema": 1,
"_description": [
"End Poem Extension Recommended Pack",
"Contents may differ between downloads as they are picked randomly"
],
"autoUpdate": "2h",
"args": {
"poem": "random",
"splashes": 0
},
"base": "https://featurehouse.github.io/epx_packs/v2/dl/index.html",
"zipconfig": "https://featurehouse.github.io/epx_packs/v2/dl/zipconfig.json"
}
}
Config will be dumped into .minecraft/config/RemoteResourcePack/end-poem-extension/recommended-pack-v2.json
(if not exist) and thereby loaded.
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Remote Resource Pack
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
支持 26.3;读取 etags 时去除空白字符
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧