#optimization #minecraft #jar #processing #repack

mc-repack-core

A library for repacking Minecraft mods and resource packs to optimize size and loading speed

2 releases

0.18.1 Mar 6, 2024
0.18.0 Nov 4, 2023

#1507 in Game dev

Download history 7/week @ 2024-02-19 15/week @ 2024-02-26 129/week @ 2024-03-04 80/week @ 2024-03-11 49/week @ 2024-04-01

134 downloads per month
Used in mc-repack

MIT license

29KB
585 lines

The mc-repack-core create

This crate is a part of MC-Repack project, available on GitHub (see here).

Features

  • Minifying JSON files, using serde-json, and removing comments
  • Optimizing PNG files, using oxipng
  • Optimizing TOML files, using toml
  • Removing unwanted files – some project files (from Blender, Photoshop, etc.) are mistakenly packed in mods. This operation will detect and remove (ignore while repacking) these files.
  • Stripping Unicode BOM
  • Removing comment lines in many file types: .cfg, .obj, .mtl, .zs, .vsh, .fsh
  • Recompressing files more efficiently

For more info, visit the MC-Repack webpage


lib.rs:

MC-Repack is initially built as a CLI app, but can also be used as a library. This crate contains methods necessary to work with files that need optimizations.

You should be interested in optimizer module. There are important methods used for repaching and optimizing files.

This crate considers that the repacked files are used in Minecraft mods. You can still use the library for other types, like Android or Gradle files.

Dependencies

~2–3.5MB
~62K SLoC