Add API for Mod Support
BrainStone opened this issue ยท 3 comments
Having an API to add one's own colors for armors to this mod would be cool.
Like I'd love to add custom icons for mz two armor sets from my mod.
The work towards this feature is complete but needs testing. See 1c8cd20 for the new mod/resource pack friendly data format for the mod:
- Make a new directory
src/main/resources/assets/<modid>/textures/gui/armor_chroma.json
in:- your own mod (preferred),
- a PR in this repo,
- a resource pack (remove
src/main/resources/
from the beginning in this case)
- In the directory create a texture
armor_chroma.png
, 256x256, containing adjacent 9x9 icons- Positive indices start from the top left and move right, then down
- Negative indices start from the bottom right and move left, then up
- Next create a file
armor_chroma.json
which will contain the icon data.- The root object may contain any of the keys
"materials"
,"items"
and"special"
- The
"materials"
object should map armor material names to icon indices - The
"items"
object should map item IDs to icon indices, it is ignored if an entry is found in the"materials"
object - The
"special"
object is used for overriding the default icon for the mod (iron) and is also used for masking half icons
- The root object may contain any of the keys
See the existing entries for examples. You can include these files in your mod now, the format may be subject to change.
Is is possible to add your own armor icons in 1.7.10? I've got my new icons pointed to 476+ for the new row, I've registered the materials and the items directly, but they're all still rendered in iron.
I've also tried replacing the json and png files in the mod itself, but still no luck.
1.7.10 doesn't really have any resource pack or mod support. Only one mod can override the png file from the jar file and the overrides.json file in the config folder, which should work. I don't know how easy it might be to backport the version with mod support to 1.7.10, but it's something to look in to in future.