Skip to content

indyteo/MaterialSpritesGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaterialSpritesGenerator

Generate mappings from PaperMC's Material to Minecraft sprite components.

Download pre-generated mappings

You can download pre-generated mappings for a specific Minecraft version from the releases.

Some sprite names change across versions, new sprites are added for new materials, and existing sprites could be improved. Notable changes include the refactoring of item sprites from the blocks (default) atlas to their dedicated items atlas, in Minecraft 1.21.11.

Generate mappings

Clone the repository and build the JAR using Maven (be sure to checkout the tag corresponding to the version you're interested in so you get the correct mapping rules).

Run a PaperMC server with the appropriate version and the installed plugin. You should get the generated mappings in the plugin's folder.

You can also optionally customize the config.yml file to edit generation options, or the Java template file.

Why is this needed?

Naive approaches like using the material name or ID as a sprite key won't work for most of them. Sprites are defined from atlases, which are automatically generated by the game based on textures in the resource pack. You can visualize them by saving debug textures using F3 + S in-game.

This project relies on manually written mappings, that are used to transform material IDs and check for the existence of a sprite with that transformed key. You can help improve the results either by improving the mapping rules, or add "exceptions", which are basically exact matching rules to handle one or a few given materials only. Some materials don't have any sprite available, because the game does not provide them. Such materials were assigned manually selected head textures for completeness.

License

This project is licensed under the terms of the MIT license.

About

Generate mappings from PaperMC's Material to Minecraft sprite components

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages