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

Fix RenderLayers.getBlockLayer returning solid for everything #69

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

embeddedt
Copy link
Contributor

Forge does not populate the BLOCKS map in RenderLayers. This means that RenderLayers.getBlockLayer returns solid for any modded block. Evidently, Forge expects modders to be using the new RenderLayers.getRenderLayers function they patch in, however, Fabric mods will all be using getBlockLayer since that is correct for vanilla. Hence, we need to provide a reasonable fallback.

The approach I used is to return the first render type in the ChunkRenderTypeSet; this will work correctly on most blocks. It's quite a bit of a kludge, but better than nothing. The mixin on ChunkRenderTypeSet is necessary to avoid an iterator allocation on every call.

@Su5eD Su5eD merged commit 1d0da21 into Sinytra:1.20.1 Oct 30, 2023
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants