You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
kvverti
changed the title
Properties parsing does not support coexistence of value and object mappings
Unused Optifine properties can result in invalid Colormatic JSON
May 9, 2022
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.
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 astext.xpbar
had already been parsed with a string mapping, so alternatively, you could just restrict the parser to just properties supported by the mod.The text was updated successfully, but these errors were encountered: