Advanced usage
Editing pack.toml
manually
Warning
Any comments added to the pack.toml
file WILL BE LOST if you use any pack-it
command that updates the file; eg. *-add
, remove
, etc.
File layout
Modrinth metadata
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
CurseForge metadata
All the fields are the same as those above, except for the [installed_mods.<mod name>.update_info]
1 2 3 4 5 6 7 |
|
GitHub metadata
All the fields are the same as those above, except for the [installed_mods.<mod name>.update_info]
1 2 3 4 5 6 7 8 9 |
|
Adding other mods
Sometimes you may want to include a mod that isn't hosted on one of the supported services, and might want to manually add it. Fortunately this isn't too difficult, and some steps will be outlined below:
- Find the download URL of the mod JAR, for example
https://example.com/mod-1.0.0.jar
-
In order for pack-it to verify that the JAR has downloaded correctly, you need to calculate the SHA-1 hash of the file. A quick way to do this on linux is with the following command:
1
curl <download url> | sha1sum
What does that command do?
If you are curious as to what the command does does (good for you :D), then you can have a look at an explanation on explainshell
It will output something like the following:
The first part of this (the 40 hex characters) is the hash that you need.1
4a3ce8ee11e091dd7923f4d8c6e5b5e41ec7c047 -
-
Add the following new section to your
pack.toml
file, being sure to replace all the values1 2 3 4 5
[installed_mods.<mod name>] name = "<mod name>" download_url = "<download url>" download_hash = "<hash that was calculated in step 2>" output_path = "./mods/<file name>.jar"
Adding things other than mods
pack-it can be used to automatically download other files as well as just your mods; eg. resource packs or config files.
As long as you can host the file on a webserver somewhere (eg. GitHub Pages or Vercel), you can distribute them with the pack simply by including them as an installed_mods
, with a different output_path
set. See Adding other mods for more details on the process