Crates.io | mc-repack |
lib.rs | mc-repack |
version | 0.27.1 |
source | src |
created_at | 2023-02-19 22:05:48.873704 |
updated_at | 2024-07-29 00:55:58.789592 |
description | A command-line interface for repacking Minecraft mods and resource packs to optimize size and loading speed. |
homepage | https://szeweq.xyz/mc-repack |
repository | https://github.com/szeweq/mc-repack |
max_upload_size | |
id | 789350 |
size | 63,912 |
A repacking tool for Minecraft mods and resource packs to optimize size and loading speed.
serde-json
, and removing commentsoxipng
toml
optivorbis
.cfg, .obj, .mtl, .zs, .vsh, .fsh
mc-repack.toml
or other TOML file specified by --config
argument)These mods are tested and repacked by MC-Repack with the following results:
File name | Original | 0.18 | 0.20 (*) | 0.21 (*) |
---|---|---|---|---|
minecolonies-1.19.2-1.0.1247-BETA.jar | 72.8 MB | 63.7 MB | 63.4 MB | 62.7 MB |
twilightforest-1.19.3-4.2.1549-universal.jar | 22.5 MB | 21.9 MB | 21.8 MB | 21.2 MB |
TConstruct-1.18.2-3.6.3.111.jar | 15.2 MB | 14.0 MB | 13.9 MB | 13.6 MB |
BloodMagic-1.18.2-3.2.6-41.jar | 13.6 MB | 11.9 MB | 11.7 MB | 11.6 MB |
create-1.19.2-0.5.0.i.jar | 13.1 MB | 12.8 MB | 12.7 MB | 12.6 MB |
Botania-1.19.2-437-FORGE.jar | 10.9 MB | 10.1 MB | 10.1 MB | 10.0 MB |
ImmersiveEngineering-1.19.3-9.3.0-163.jar | 10.3 MB | 10.0 MB | 9.65 MB | 9.46 MB |
thermal_foundation-1.19.2-10.2.0.47.jar | 4.58 MB | 4.38 MB | 4.35 MB | 4.35 MB |
cfm-7.0.0-pre35-1.19.3.jar | 2.11 MB | 1.92 MB | 1.87 MB | 1.84 MB |
* - Using Deflate (faster)
More mods are available on My Website.
The fastest way is to get the latest version from Releases page.
You can also install this app by using Cargo:
cargo install mc-repack
If you want to test the latest commit directly from this repo:
cargo install --git https://github.com/szeweq/mc-repack
After installation, the tool can be used by typing one of following commands:
mc-repack jars --in <file|directory> --out <path>
mc-repack files --in <file|directory> --out <path>
jars
subcommand looks for entries stored in .jar
(or .zip
) files.files
subcommand transforms the file tree directly. Files will be minified or copied.
When a file path is provided, then MC-Repack will repack the file contents. If a path is a directory, then all files inside (non-recursive) will be repacked.More options are provided by typing mc-repack --help
in a shell/terminal.
MC-Repack can be also purposed for creating your own version of a repacking tool. See mc-repack-core
crate on crates.io for more technical details.
MC-Repack is meant to show how many Minecraft mods and resource packs come with unoptimized files (and I don't mean just pretty-printed JSON files). You will be surprised that in some cases a PNG file's metadata added by Photoshop is much larger than its content.
One other inportant thing is that MC-Repack determines if a file really needs to be compressed. Most PNG files and smaller JSON files will usually be stored uncompressed. This kind of operation saves bytes if a "compressed" form is larger than original. Also, uncompressed data can be loaded faster.
This is a great tool that can be helpful for:
MC-Repack shows all errors happened during repacking. Most of them are errors that can be simply ignored (like trailing comma at line X column Y
).
The easiest way to contribute is to share this with others on social media.
There is a lot of things that should be fixed or optimized. New feature ideas are welcome, just file an issue.
Sure! The tool does not recognize that an archive is not a Minecraft mod nor a resource pack (yet).