`WorldSlice#getColor` cannot be called with custom ColorResolvers
embeddedt opened this issue ยท 1 comments
Request Description
In Sodium 0.5+, WorldSlice#getColor
converts to a BiomeColorSource
internally before retrieving the color, and BiomeColorSource
is an enum that only supports GRASS, WATER, and FOLIAGE. Therefore, there is no way to pass a custom ColorResolver
and have it work correctly with Sodium 0.5+. An example of a crash this causes (albeit with a Forge mod) can be found here.
I think the best way to solve this issue is to remove the enum, and refactor BiomeColorCache
to look up the appropriate ColorBuffer
based on the provided ColorResolver
instance. If this solution sounds reasonable, I am willing to make a PR.