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 render in 1.17 fabulous. #6

Merged
merged 2 commits into from
Jul 7, 2021
Merged

fix render in 1.17 fabulous. #6

merged 2 commits into from
Jul 7, 2021

Conversation

plusls
Copy link
Contributor

@plusls plusls commented Jul 6, 2021

It works, but why?

@Fallen-Breath
Copy link
Owner

Any explaination about how these code works / where are these code from? I don't want to mess with these addition codes without knowing where they come from when mojang change render code again in the future

@plusls
Copy link
Contributor Author

plusls commented Jul 6, 2021

Any explaination about how these code works / where are these code from? I don't want to mess with these addition codes without knowing where they come from when mojang change render code again in the future

I don't know why it works when I inject in WorldRenderer::render RETURN, I just try it.

The matrixStack code from WorldRenderer::render

MatrixStack matrixStack = RenderSystem.getModelViewStack();
matrixStack.push();
matrixStack.method_34425(matrices.peek().getModel());
RenderSystem.applyModelViewMatrix();
this.client.debugRenderer.render(matrices, immediate, d, e, f);
matrixStack.pop();
RenderSystem.applyModelViewMatrix();

Because the old inject point after this matrix translate, so I should add it.

@Fallen-Breath Fallen-Breath merged commit 17ea6ce into Fallen-Breath:1.17-fabric Jul 7, 2021
Fallen-Breath pushed a commit that referenced this pull request Nov 5, 2021
it also affects 1.16 btw
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.

None yet

2 participants