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

Removed MixinEntityLivingBase reflection hack #384

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

3arthqu4ke
Copy link
Contributor

Describe the pull
Removes a reflection hack done in MixinEntityLivingBase to keep compatibility with older Mixin versions.

Describe how this pull is helpful
The comment above the hack describes it as a bit silly and bad for performance which is fixed here.

Additional context
The reason the hack was added is because Mixin did not have this line prior to 0.8. In Mixin 0.7 the check typeInfo.isLoadable() (which would check if AccessorEntityFireworkRocket is an Accessor) did not exist, causing Mixin to try to find the class in the hierachy of EntityLivingBase. This only happens when a Mixin method is merged into the targeted class, and only for the methods of that Mixin class, so putting the methods inside a helper class fixes the issue.

Let me know if this is wanted and if the helper class should be a kotlin class instead.

Copy link
Member

@Avanatiker Avanatiker left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this patch :3 this is way better. if u want contributor role in the discord ping me there :)

@Avanatiker Avanatiker merged commit aa7febd into lambda-client:master Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants