
Unused Optifine properties can result in invalid Colormatic JSON
ChloeDawn opened this issue ยท 1 comments
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.