PepperCode1 / Continuity

A Fabric mod that allows for efficient connected textures
GNU Lesser General Public License v3.0
260 stars 66 forks source link

Blocks are rendered without offset #420

Closed MehVahdJukaar closed 1 month ago

MehVahdJukaar commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

That is entirely expected.

MehVahdJukaar commented 1 month ago

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

PepperCode1 commented 1 month ago

In Continuity's case, yes.

peow commented 16 hours ago

this problem doesn't seem to have been solved yet these 2 Pull Requests (https://github.com/FabricMC/fabric/pull/3799, https://github.com/comp500/Indium/pull/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.

https://github.com/FabricMC/fabric/assets/105888751/57b23c47-cd81-42c8-af62-27d1cea2e590

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

https://github.com/FabricMC/fabric/assets/105888751/7e8d46d7-2189-4263-b34d-7065c381234a

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 commented 15 hours ago

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 commented 2 hours ago

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