Skip to content

WorldSlice#getColor cannot be called with custom ColorResolvers #2166

@embeddedt

Description

@embeddedt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-modsArea: Mod compatibilityP-lowPriority: LowT-enhancementType: Enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions