Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused Optifine properties can result in invalid Colormatic JSON #92

Open
ChloeDawn opened this issue Mar 27, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ChloeDawn
Copy link

ChloeDawn commented Mar 27, 2022

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.

@kvverti kvverti added the bug Something isn't working label May 9, 2022
@kvverti 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
@mpar-22
Copy link

mpar-22 commented May 21, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants