Creates a new, empty modpack
Optionalfabric?: stringThe version of Fabric loader used by this modpack.
Optionalforge?: stringThe version of Forge used by this modpack. This version must not include the Minecraft version as a prefix.
Optionalliteloader?: stringThe version of Liteloader used by this modpack.
The version of Minecraft used by this modpack. This should be in the format used by the version.json files.
Optionalneoforge?: stringThe version of NeoForge used by this modpack.
This is an undocumented variable in packwiz, so this documentation may be inaccurate.
Optionalquilt?: stringThe version of Quilt loader used by this modpack.
The directory in which all pack files are stored
The name of the PackMetaData file
This object stores the contents of PackFileMetaData files referenced in the PackIndex
In order to comply with curseforge API requirements, direct download URLs to curseforge files cannot be saved into the pack. Instead, you may use this function beforehand to cache the download URLs in memory before attempting to install the pack.
required to access the curseforge api, can be retreived from the curseforge console
Hashes all non-metafiles in the pack and makes a request to curseforge to find matching files. Any file that matches is removed from the modpack and replaced with a metafile referencing the curseforge file.
required to access the curseforge api, can be retreived from the curseforge console
Hashes all non-metafiles in the pack and makes a request to modrinth to find matching files. Any file that matches is removed from the modpack and replaced with a metafile referencing the modrinth file.
Uses the hashes stored in any non-modrinth metafiles to find files that are also availible from modrinth, then adds modrinth metadata (client/server side, download url, etc) to that file.
Useful for metafiles that don't already have that meatadata availible, or for exporting your pack to multiple platforms.
Saves the in-memory modpack changes to storage. You must call this function after making any changes to the pack in order to preserve those changes.
Optionalhashes: booleanwhether to calculate and include file hashes in the output. You should only change this to true when saving the pack for serving over HTTP, where hashes are required. Otherwise, this option is automatically set from pack options.
StaticfetchFetches a modpack from an HTTP/HTTPS url
StaticloadLoads a modpack from storage
StaticrefreshLoads a modpack from storage, ignoring and rebuilding the index so that changes made outside of packwiz(-extras) are included.
This object contains all the functionality of packwiz-extras, and is the default export of this library.
All instancing methods (new PackwizPack, loadPack, refreshPack, fetchPack) require a FileSystemDirectoryHandle as their first argument.
In web browsers, you can use navigator.storage.getDirectory to use browser storage, or showDirectoryPicker to allow the user to select a folder on the host system.
In node, you can use my node file system adapter (or any pollyfill/ponyfill that provides the Web File System API) to grant this library access to a host folder.