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

Fix biome colors being retrieved differently from vanilla #2131

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

embeddedt
Copy link
Contributor

This PR fixes a parity issue with how biome colors are retrieved compared to vanilla. Vanilla uses the lambdas in the static final fields of BiomeColors in order to call the appropriate methods on the biome, while Sodium just calls them directly. This causes compatibility issues with mods that use an AT/AW and replace the lambda in those fields to add custom logic.

In the case where no mod has replaced the lambda, the behavior of this patch should be exactly the same as Sodium 0.5.3, as the lambda delegates to the same method Sodium would have called.

Copy link
Member

@jellysquid3 jellysquid3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable enough.

@jellysquid3 jellysquid3 merged commit e4250e9 into CaffeineMC:dev Oct 31, 2023
@embeddedt embeddedt deleted the fix/biome-color-parity branch December 6, 2023 22:35
IMS212 pushed a commit to IMS212/sodium-fabric that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants