OpenBagTwo / FoxNap

A survival-, multiplayer- and copyright-friendly mod for adding custom music discs to your world
GNU General Public License v3.0
1 stars 1 forks source link

Is it possible to generate custom music discs via config? #37

Closed OpenBagTwo closed 2 weeks ago

OpenBagTwo commented 1 year ago

If Fabric datagen providers can automatically generate item models, textures, etc. for placeholder tracks (see: #29), then it should be possible to leverage that functionality for all music discs. Does that mean that custom music discs could be generated using assets placed in the config folder? If so, would one be able to swap tracks in and out as easily as swapping resource packs? And furthermore, would it be possible to integrate ffmpeg directly into the FoxNap jar so that users could just drop in a bunch of music discs and let the mod handle the rest?

OpenBagTwo commented 1 year ago

Preliminary findings:

Does that mean that custom music discs could be generated using assets placed in the config folder?

Yes. While it's unclear whether any of the built-in resource managers can look outside of assets/data, one can always read in data from FabricLoader.getInstance().getConfigDir() and munge it as needed into in-memory JSONs for model providers, etc.

If so, would one be able to swap tracks in and out as easily as swapping resource packs?

I think this could be accomplished with reload listeners? I believe that down this route lies ModMenu-based config editing.

OpenBagTwo commented 2 weeks ago

Minecraft 1.21 is now completely data-driven. As such, changing any aspects of the music discs is just a simple /reload away.