Remote Resource Pack

Mod

Load resource pack content from the internet

Client Utility

2,265 downloads
9 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

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.


Project members

teddyxlandlee

Owner

Details

Licensed MIT
Published a year ago
Updated 4 months ago