Sodium

Sodium

35M Downloads

Sodium Ignores Dynamic Block Colors

MoriyaShiine opened this issue ยท 1 comments

commented

Expected Behavior

The game should color the block properly

Actual Behavior

The game ignores the color and returns white

Reproduction Steps

  1. Install Sodium and another mod that dynamically colors a block
  2. Place block
  3. See block without color

An example of a mod that does this is Bewitchment, at https://github.com/MoriyaShiine/bewitchment/blob/master/src/main/java/moriyashiine/bewitchment/client/BewitchmentClient.java#L50

Attachments

With Sodium
2020-12-24_18 35 11

Without Sodium
2020-12-24_18 36 24

System Information

  • Java Version: 11.0.8 64bit
  • CPU: Ryzen 7 3700x
  • GPU: Radeon RX 5700 XT
commented

For context: this isn't really a Sodium bug - they were trying to access BlockEntity data in a BlockColorProvider, which should be done through RenderAttachmentBlockEntity instead.

You could call the getBlockEntity call on WorldSlice not working a Sodium bug, but RenderAttachmentBlockEntity is much more robust and should be used whenever possible instead.