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

Implement equals and hashCode on WrappedComponent #163

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

jpenilla
Copy link
Member

fixes #162

@kashike kashike added the bug Something isn't working label Oct 10, 2024
…n/impl/WrappedComponent.java

Co-authored-by: Riley Park <[email protected]>
@zml2008
Copy link
Member

zml2008 commented Oct 12, 2024

Should MC's components' equals() be modified to unwrap WrappedComponnents before comparing?

Otherwise wrapped.equals(native) will produce a different result than native.equals(wrapped) which is not very fun and cool

@zml2008
Copy link
Member

zml2008 commented Oct 18, 2024

I think this is ready to merge, it should be backported to the 5.x series as well though I think since I expect 1.21.1 will live a relatively long life.

@zml2008 zml2008 self-assigned this Oct 18, 2024
@zml2008 zml2008 added this to the 6.0.1 milestone Oct 18, 2024
@zml2008
Copy link
Member

zml2008 commented Oct 18, 2024

I've set up mc/1.21.1 for that backport, I'll do it unless you have the free time.

@zml2008 zml2008 merged commit 8bfe454 into mc/1.21 Oct 18, 2024
2 checks passed
@zml2008 zml2008 deleted the fix/wrapped-component-comparison branch October 18, 2024 05:08
This was referenced Oct 18, 2024
zml2008 added a commit that referenced this pull request Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text Components in Item Components cause ItemStack comparison problems
3 participants