natanfudge / artifice

A Minecraft 1.15+ library mod for programmatically generated resource files.
https://discord.gg/CFaCu9
MIT License
8 stars 14 forks source link

Changing datapack icons #33

Open CebbyS opened 3 years ago

CebbyS commented 3 years ago

I can't seem to find a way how can I change generated datapack icon. Any help with this?

natanfudge commented 3 years ago

How do you give datapacks icons usually?

CebbyS commented 3 years ago

Datapack icon is placed at root of the datapack folder, called pack.png. If my namespace is "minecraft", than the icon would be "minecraft/pack.png".

One thing I thaught of was to generate datapack using artifice and add a empty datapack containing the icon file inside mod resources. But it did not work.

Current solution I think of is to add function to resource generator, setIcon(String path) which loads the png file from resources and adds that file as pack.png to the generated resource/datapack.