Colormatic

Colormatic

6M Downloads

Unused Optifine properties can result in invalid Colormatic JSON

ChloeDawn opened this issue ยท 1 comments

commented

The specification of color.properties has keys that can both coexist as a value and object mapping (in the context of JSON interpretation). Currently, the parser will error when loading OptiFine-based resource packs that declare properties like this. See the loading screen properties as an example: https://github.com/sp614x/optifine/blob/28d232899769f7cc9222d8d3328c53693941089a/OptiFineDoc/doc/color.properties#L279-L294. Currently, the loading screen properties are also the only case of this - whilst they are unused by Colormatic, it is still a specification discrepancy that causes an error due to them being parsed regardless.

I would suggest nesting root values into the object with a key of $ or similar to avoid conflict.

For further context, this issue was actually encountered personally by loading a pack that declared a property that is unused by OptiFine, text.xpbar.outline, which caused the parser to error as text.xpbar had already been parsed with a string mapping, so alternatively, you could just restrict the parser to just properties supported by the mod.

commented

Would it be possible to add support for the text.xpbar and text.xpbar.outline properties? The main reason I downloaded this mod was to see if it allowed me to change the color of the xp level text like I could with OptiFine, but that does not seem to be the case.