Use alternative method for rendering water in cauldrons
TibiNonEst opened this issue ยท 5 comments
The current method for rendering water inside cauldrons (with colors of course) involves mixing-in to BiomeColors
and injecting a check to the getWaterColor
method to see if the position it's getting a water color for is a water cauldron. If it is, we currently replace the normal water color value with the color stored in the water cauldron block entity. While this works, it can break compatibility with other mods, notable BedrockIfy and certain Iris shaders. It also requires us to mixin to Sodium's BlockRenderer
class to make sure only a FlatColorBlender
is being used on a water cauldron. This is already a hack, and the temporary solution is just to embrace the hacky-ness and give our mixin a higher (lower number) priority. One potential actual solution to this is to replace the current water cauldron model with a block entity renderer. However, this may cause issues with other mods relying on certain features of water cauldrons, I just do not know. The realistic solution may just be to provide both options and allow the user to choose which they want in a config for the best compatibility. Either way, this will require more testing which I do not have much time for this week.
The Bedrockify part of this issue has been fixed another way, the biggest problem is still just that this requires mixing-in to Sodium to avoid color blending issues.
I'm fairly sure I can straight up remove water color checks on water cauldrons and instead use a shader to do water dyeing, will have to look into this more when I have time.
It works wonderfully, just hope it can dye more than leather armor (wool, terracota, banner etc)
This was fixed by 6c4645f. Water color is now provided by a proper ColorProvider
instead of janky injections. This could also mean marginally better performance on chunk rebuild because the result can now be properly cached. After a discussion with JellySquid, Sodium no longer overrides the water cauldron color provider (smooth blending isn't needed for cauldrons), and thus no mixins to Sodium are required as of 0.5.2.