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

Rename the EntityRenderer#getRenderState method to createRenderState #4023

Merged

Conversation

haykam821
Copy link
Contributor

@haykam821 haykam821 commented Oct 12, 2024

The EntityRenderer#getRenderState method is only used to initialize a field:

private final S state = this.getRenderState();

It also returns a new EntityRenderState instance each time, as can be seen in the EmptyEntityRenderer#getRenderState method as well as other implementations:

@Override
public EntityRenderState getRenderState() {
	return new EntityRenderState();
}

As such, createRenderState would be a more fitting name.

@haykam821 haykam821 requested a review from a team October 12, 2024 18:20
@apple502j apple502j merged commit bc83367 into FabricMC:1.21.2-pre3 Oct 12, 2024
3 checks passed
@haykam821 haykam821 deleted the entityrenderer-createrenderstate branch October 12, 2024 18:27
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