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

[WIP] 1.17 fabric 3rd person render #398

Open
wants to merge 4 commits into
base: 1.17-fabric
Choose a base branch
from

Conversation

tr7zw
Copy link

@tr7zw tr7zw commented Oct 6, 2021

Before this gets fully forgotten, this branch adds 3rd person rendering that works in combination with Not Enough Animations. Currently there are two options: disable this feature when NEA is not pressent, or copy over the arm translation mixins to make it work without NEA. Also the Atlas is currently missing its back texture.

Copy link
Member

@tyra314 tyra314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder. But I assume it's not ready yet.

@@ -67,6 +67,8 @@ private void drawMinimap(MatrixStack matrices, int atlasID, VertexConsumerProvid
matrices.push();
matrices.translate(0, 0, 0.01);
Textures.BOOK.drawWithLight(buffer, matrices, 0, 0, (int) (GuiAtlas.WIDTH * 1.5), (int) (GuiAtlas.HEIGHT * 1.5), light);
// Book backside
Textures.BOOK.drawWithLightFlipped(buffer, matrices, 0, 0, (int) (GuiAtlas.WIDTH * 1.5), (int) (GuiAtlas.HEIGHT * 1.5), light);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess without NEA this should not be drawn, as nobody would see it anyways

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea in the current state this is missing these checks since I don't know the way you guys are planning to implement it. When there is no way to see the backside(so no NEA), this can be skipped of cause.

}
if (arm != entity.getMainArm() && entity.getOffHandStack().getItem().equals(RegistrarAntiqueAtlas.ATLAS)) { // Only offhand
matrices.push();
((ModelWithArms) getContextModel()).setArmAngle(arm, matrices);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the very strong feeling, this code redundancy could be refactored away.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, its a bit of a copy and paste job that was different, but now could be refactored since these differences are not there any more.

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