If you like our work please consider becoming a Supporter and get an ad-free experience.

What is this?
A command-line tool that automates the boring resizing/zipping part of creating a Minecraft resource pack that no-one likes.It takes a folder of source textures, then resizes, optimises, and removes transparent pixels from them. It then copies them into separate 512x, 256x, 128x... etc. folders, and optionally zips each folder up into a shareable texture pack zip.
The tool is highly configurable via a basic config file, patch.config.toml.
Features
Automatically resizes all images to standard resource pack sizes.512x source images are copied, resized to 256x, 128x, 64x, and 32x, then saved into their own size pack directory.
This is fully configurable. Is your source only 128x? Want to only generate packs down to 64x? No problem.
Optimises generated PNGs losslessly, to ensure small filesizes.
Ensures the patch takes up as little memory as possible when used in-game, for better FPS.
Removes translucent pixels from item texture edges.
Ensures no texture flickering with Minecraft's graphics engine. This is configurable should certain textures need opting-in or -out, and is only applied to item textures by default.
Zips up each generated pack with clear, descriptive filenames.
E.g. SphaxPatch_MyTexturePack_MC1.16.4_64x.zip
Comes with a 'watch' mode, allowing you to design and create packs on the fly.
Any changes to .png, .txt or .mcmeta files will trigger a fresh generation of size packs
How to use
- Install Node JS v14+. It may work with earlier versions, but hasn't been tested on them.
- Download and unzip a Sphaxify release. Alternatively, clone the repo locally.
- Place your source images inside source-designs/{MC_VERSION}/, e.g. source-designs/1.16.4/. Mimic how the textures would be laid out when used as a texture pack. A typical working layout would be:
- /source-designs/1.16.4/assets/some-incredible-mod/...
- /source-designs/1.16.4/pack.mcmeta
- /source-designs/1.16.4/pack.png
An example 1.16.4/ folder has been provided, along with a barebones pack.mcmeta and pack icon design that you're encouraged to customise. - . Customise the build options by editing patch.config.toml. Worry not, each option has detailed instructions, and has been set up with the defaults expected of a 512x source patch.
- If your source designs are a different size (e.g. 128x), then make sure you customise initialSize and resizeLevels!
Option 1: For less tech-savvy users
Simply double-click either _MakePacks.command (macOS), or _MakePacks.bat (Windows). This will install everything Sphaxify needs to run, and then create the zipped-up texture packs for you. Generated texture packs will be inside the size-packs directory, ready to be shared.Option 2: For those comfortable with the command line
1. Install Sphaxify's dependencies. Open a terminal, browse to the _sphaxify directory, and run npm install.2. The following npm scripts are now available:
- npm run build - generates size packs
- npm run zip - same as build, but also zips them up
- npm run watch - will begin watching your source-designs/ directory for any changes to texture files, generating size packs every time a change is made.
- npm run clean - nukes the size-packs/ directory. Handle with care!
The console will show the progress of all processed images, and a system notification will appear when complete.
Issues
Please report any issues encountered either here or via GitHub.Cheers to
Sphax, and the BDCraft community as a whole for being a big source of inspiration, creativity and motivation.Changelog
Show[01-01-2021] - v3.0.0
- Graphicsmagick/Imagemagick no longer needed, now uses sharp (and should be much faster as a result)
- Patch config now written in TOML
- Now works with Node 14+
- Large QoL upgrade, setup has been made much easier
- Issues with colour type getting reduced by imagemin have been fixed, eliminating the need for the compressables list
- Default directories have been renamed to something more meaningful
- src/ -> source-designs/
- dist/ -> size-packs/
- Can now simply double-click _Install.bat/_Install.sh to install Sphaxify locally
- Fixes/improves _MakePacks scripts
- Much easier to set up + configure
- Remove need to install global Gulp
- Options for specifying which images are excluded when resizing/optimising/thresholding are now at the top of Gulpfile.js, along with all the other options