Closed mezz closed 1 year ago
Configured doesn't know how to convert records like ColorName
into a String
and vice versa. In my original implementation I added my own parser but that depended on the full codebase, since switching to API only of JEI this would no longer be possible. Anything that is not a primitive it won't understand, that's why IListType
exists.
Yeah, that is a drawback of my implementation here. I noted that in the PR description as the main regression from this PR. I would like to think a bit more about how I could support that properly.
Here are some improvements that I think Configured could implement later to improve support for JEI's configs:
List<Enum>
, so the player is provided an enum selection instead of a string entry.I may be able to expose the string serialization and deserialization in JEI's API somehow. I will try some things out and see how it looks.
I have updated this PR, and now it uses new features of JEI's API to implement IListType
for List<ColorName>
. 🎉
I have updated the PR to use the latest JEI version, which exposes configs much earlier. This way, players can access all the JEI configs before entering a world.
Everything checks out. Merging now. Thanks for your work into making these mods compatible again.
Hey @mezz, I am currently relicensing Configured. I want to change the mod to be under a more appropriate license of LGPLv3. I want to get your permission to change the license of your contributions under this new license. Thank you.
Hello! You have my permission to relicense my changes to Configured under LGPLv3 :+1:
Thank you!
I added some methods to JEI's API so that Configured can get the config information without reflection. This should make the compatibility much more stable, since JEI does not change the API much.
There are some regressions here, like Configured does not understand myrecord
values.I added some extra support for enums in lists, but I wasn't able to make it use a selector like with regular enum values.Despite the drawbacks, I hope this is a good clean starting point at least.Update: I have added full support for serializing and deserializing these values in the configs.