QuiltMC / quilt-config

Quilt Config (aka "haven king's metadata of madness") is a library designed to facilitate the creation and management of config files.
Apache License 2.0
21 stars 8 forks source link

Add config added listener #42

Open anonymous123-code opened 6 months ago

anonymous123-code commented 6 months ago

Make Configs observable so that you can add listeners that get called when a new config is added.

This is necessary for modmenu integration of an automatic loading screen mod: It first stores hashmaps provided by the entrypoint in a list, meaning that those could still be mutated, until it applies config screens provided for other mods during the init of its main screen. (So when it is opened for the first time)

It should respect the hidden metadata proposed by #32

OroArmor commented 6 months ago

This might be more useful in the loader implementation of the config system. Not sure though.