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

[BUG] Color4f from integer gives incorrect green value #71

Open
DarkKronicle opened this issue Feb 5, 2022 · 1 comment
Open

[BUG] Color4f from integer gives incorrect green value #71

DarkKronicle opened this issue Feb 5, 2022 · 1 comment
Labels
bug Something isn't working fixed-in-dev Already fixed in development code, fix will be in upcoming releases

Comments

@DarkKronicle
Copy link
Contributor

Green value when unpacking a color int is always when doing it though Color4f. The bitshift operator uses 0x000FF000 when it should instead be 0x0000FF00.

https://github.com/maruohon/malilib/blob/fabric_1.18.x/src/main/java/fi/dy/masa/malilib/util/Color4f.java#L62

@maruohon
Copy link
Owner

maruohon commented Feb 5, 2022

Same as #30. I'm somewhat surprised that I still didn't apparently fix it for any of the 1.13+ versions. It's fixed in the LiteLoader branch though, which will eventually replace/be "merged to" all the other branches, so the fix will at least come via that.

I guess I didn't think this to be a critical fix needing a new version pushed out, since you can use your own util method for this for now... The upcoming malilib rewrite will need vast changes in all dependent mods anyway, so getting rid of the temporary custom util method is a minor inconvenience during that update.

@maruohon maruohon added bug Something isn't working fixed-in-dev Already fixed in development code, fix will be in upcoming releases labels Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-in-dev Already fixed in development code, fix will be in upcoming releases
Projects
None yet
Development

No branches or pull requests

2 participants