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

Blocks are rendered without offset #420

Closed
MehVahdJukaar opened this issue May 24, 2024 · 8 comments
Closed

Blocks are rendered without offset #420

MehVahdJukaar opened this issue May 24, 2024 · 8 comments

Comments

@MehVahdJukaar
Copy link

MehVahdJukaar commented May 24, 2024

So idk how and idk why but when Continuity AND a texture pack that uses connected textures (any) is on, any block that is rendered with the following code does NOT follow what vanilla does as the block is rendered at the center instead of using its Offset.
blockRenderer.getModelRenderer().tesselateBlock(level, blockRenderer.getBlockModel(state), state, pos, poseStack, buffer.getBuffer(ItemBlockRenderTypes.getMovingBlockRenderType(state)), false, RandomSource.create(), seed, OverlayTexture.NO_OVERLAY);

As a consequence, when those 2 conditions are there, my mod, A Good Place, displays an erroneus animation for the block. This took me ages to figure out as it also needed that texture pack to be on (was a random pack that just altered leaves)

@PepperCode1
Copy link
Owner

Continuity does not interact with model offsets in any way and thus it is more likely that this is an Indigo/Indium issue. After checking Indigo/Indium's code right now, it seems there is an extremely old bug where the offset is ignored in non-terrain rendering. I will try to fix this soon. Use FabricMC/fabric#3798 to track this issue since it's not a Continuity issue.

@MehVahdJukaar
Copy link
Author

MehVahdJukaar commented May 24, 2024

I see. Odd tho as this however does not happen when i remove that pack, block then is correctly rendered with an offset. I also just had those 2 mods on. Disabling either the texture pack or the mod would make the model render with offset once again

@PepperCode1
Copy link
Owner

That is entirely expected.

@MehVahdJukaar
Copy link
Author

MehVahdJukaar commented May 24, 2024

meaning its what the expected behavior of that indigo issue would be?

@PepperCode1
Copy link
Owner

In Continuity's case, yes.

@peow
Copy link

peow commented Jun 26, 2024

this problem doesn't seem to have been solved yet
these 2 Pull Requests (FabricMC/fabric#3799, comp500/Indium#295) arose due to a report of an incompatibility report between the A Good Place mod and Continuity, where the A Good Place mod adds animations when placing blocks, but when using any Connected Textures resourcepack the animations present a problem, because the block appears in place before the animation is finished.

Continuity.mp4

this problem only happens when Sodium and Indium are also present, in the video below im not using these mods

Without.Sodium.And.Indium.mp4

I've updated all the mods where the fix has already been implemented (Indium and Fabric API)

Mods links -
https://modrinth.com/mod/a-good-place
https://modrinth.com/mod/continuity
Fabric 1.20.1
Fabric Loader 0.15.11

@PepperCode1
Copy link
Owner

PepperCode1 commented Jun 26, 2024

The problem as described in this issue is not present in your videos. I would suggest opening a new issue on A Good Place's repository as I cannot see this being a Continuity issue, especially if it only happens with Indium.

Indeed, after looking through A Good Place's code, I can see their Sodium compatibility code is ignored if block rendering goes through Indium, causing this issue, so this is not a Continuity issue.

@peow
Copy link

peow commented Jun 26, 2024

i see, I tested it with another mod to connect textures and the problem persisted, with some differences but it persisted, thanks for replying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants