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

Blockentity with color not rendered correctly #895

Closed
XcusanaIi opened this issue Sep 11, 2021 · 11 comments
Closed

Blockentity with color not rendered correctly #895

XcusanaIi opened this issue Sep 11, 2021 · 11 comments
Labels
A-mods Area: Mod compatibility T-bug Type: Bug
Milestone

Comments

@XcusanaIi
Copy link

Version information

sodium-fabric-mc1.17.1-0.3.0+build.5

Expected Behavior

2021-09-11_21 07 31

Actual Behavior

2021-09-11_21 09 58

Reproduction Steps

1.Install Sodium and another mod that has blockentity with a block color provider
2.The blockentity is rendered in a strange way

Java version

Java 16

CPU

Intel Core i5-10400F

GPU

NVIDIA GeForce GTX 1650 SUPER

Additional information

No response

@jellysquid3 jellysquid3 added A-mods Area: Mod compatibility T-bug Type: Bug labels Sep 12, 2021
@jellysquid3
Copy link
Member

Sodium is forcefully blending every color provider incorrectly because our logic is backwards here. This needs to be fixed on our side.

@jellysquid3
Copy link
Member

Can you check if 634b11e fixes the problem?

@jellysquid3 jellysquid3 added the S-needs-testing Status: Needs testing label Oct 10, 2021
@jellysquid3 jellysquid3 added this to the Sodium 0.3.3 milestone Oct 29, 2021
@Micalobia
Copy link

Was wondering if there was an update for this, the behavior stills seems to happen. Biome Blending turned off fixes the issue, if that helps in any way

@devpelux
Copy link

devpelux commented Jun 24, 2022

Can you check if 634b11e fixes the problem?

I've ported 634b11e in 1.19 and tested with my "tun" block, and can confirm it works.

This block is a block entity with an item on its inventory, then the "liquid" inside is colored with a color provider basing on the item (the content), because of that it requires the precise block position and blending its color with other ajacent blocks make no sense.
TunBlock.java#L235

Normal:

With fix:

Test for supported blocks: (E.g Grass)

The porting is here #1360 if you are interested, I've also added a way for modders to register new blocks for smooth blending (technically the opposite of #1331 by using the experimental commit), for example if they add new leaves... and added missing 1.18 and 1.19 leaves (I don't know if there are other 1.18 missing blocks... e.g moss??).

@jellysquid3

@TelepathicGrunt
Copy link

Looks like there was some work back in June that fixed the issue but got lost. I am see this issue in 1.19.2 - 4.4.0 Sodium currently with my Incense Candle block for my Bumblezone mod. Will the fix be looked into again and ported to 1.19.2 and released?

Currently, I found another modder who had the same issue and their solution was to mixin into Sodium but I rather not have to do that
315F955A-F461-45FD-B8ED-AF0ECD2BE9AD

@TelepathicGrunt
Copy link

Poking this to say this is still an issue in 1.19.4 Sodium

@devpelux
Copy link

devpelux commented Jul 6, 2023

While waiting for this to get officially patched, I've included the fix made in commit 634b11e, ported in #1360 from 1.17, into a mod named "Sodium Blending Registry" that includes the c:blendable tag too: https://modrinth.com/mod/sodium-blendingregistry

The patch is for the latest version of sodium.

@jellysquid3 jellysquid3 modified the milestones: Sodium 0.3.3, Sodium 0.5 Jul 6, 2023
@jellysquid3 jellysquid3 added R-pending-release Resolution: Pending release and removed S-needs-testing Status: Needs testing labels Jul 6, 2023
@jellysquid3
Copy link
Member

We have a new version of the patch which fixes a lot of issues (commit 651276f). The fix will be published with Sodium 0.5, which is the upcoming release... hopefully in the next 2-3 weeks.

There was a lot of work done on the color blending stuff to fix performance/bugs, as Sodium's implementation is a little dumb (incorrectly blended all blocks, including Redstone Wire).

The issue will be closed, but kept with R-pending-release until an actual release of the mod is published with the fix.

@apexfinity
Copy link

Is Sodium Blending registry mod no longer needed?

@embeddedt
Copy link
Contributor

It should not be needed with 0.5 and newer.

@apexfinity
Copy link

Thanks, feel free to mark this as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment