-
Notifications
You must be signed in to change notification settings - Fork 2
π How to use it?
There are two ways you can use this software.
Java Requirements: Java 8 or higher
After you download the software, put it in a separate folder and create two directories:
Output and Resources.
Your folder should look like shown below:
image
Make sure you set it up correctly because the program will not work properly without them.
When you're done setting everything up, run the program to build your resource pack.
It's the place where your resource pack will be available after the building process.
This directory feeds the program with all needed images for the generation of your resource pack.
It splits into four specific groups of textures.
- blocks - textures for custom blocks
- itemframes - textures for items that are meant to be displayed in an item frame
- items - textures for custom items
- sounds - ogg files for custom sounds
When you execute the software for the first time, these directories should be generated for you automatically.
After that, you may insert your textures there and run the program to build your resource pack.
All textures have to be png format and their resolution must be a power of 2 e.g. 2x2, 4x4, 8x8, 16x16, 32x32...
If you want what we call HD textures e.g. 400x400 or 50x100 you must use Optifine for it to render properly.
Java Requirements: Java 8 or higher
You may also clone the repository and manually build your resource pack by executing the program in your IDE.
Just remember to prepare a valid setting to run the application without errors.
We need them because we have to specify the path to Output and Resources directories.
Here's a quick tutorial on how to set it up in IntelliJ IDEA:
- Edit the configurations
image- Create new application
image- Set up Build and run
image
The main class stays as me.marcusslover.resourcepacker.core.packer.Core,
however, your CLI arguments must meet your exact expectations.
Use -r argument to specify path to the Resources directory
and use the -o argument to specify path to the Output directory.
The paths must be valid otherwise the program won't be working properly.
Example: -r C:\Users\Mark\Desktop\CoolResourcePack\Resources -o C:\Users\Mark\Desktop\CoolResourcePack\Output
When you're done setting it up, you can go ahead and do some configuration to your resource pack.
Choosing to run the code yourself allows you to customize more things.
Example of features you may modify:
- Name of your resource pack
- Description of your resource pack
- Usage of textures (custom registration)
That can be done in the ResourcePacker.class
public class ResourcePacker implements IResourcePacker { @Override public void pack(RPPacker packer) { /*Information for the build*/ packer.setPrefix("marcusslover"); packer.setName("Packer"); List<String> description = new ArrayList<>(); description.add("Generated by ResourcePacker"); packer.setDescription(description); packer.setMode(RPMode.MANUAL_REGISTRATION); // Make sure to change that to MANUAL_REGISTRATION /*Resources*/ ResourceHelper r = packer.resources(); /*Blocks*/ RPBlockRegistry b = packer.blocks(); b.register(RPBlock.of("Dark Tile", r.get("dark_tile.png"))); } }
Then just run your custom run configuration and enjoy your resource pack.
Your final built should be in the Output directory that you specified the path to.