跳到正文

Remote Resource Pack

作者:teddyxlandlee

Load resource pack content from the internet

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

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 支持哪些 Minecraft 版本?

Remote Resource Pack 支持 Minecraft Java 版 1.18.2–26.3,共 30 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Remote Resource Pack 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分

teddyxlandlee 的其他作品

查看全部 →