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

Improve ItemMeta comparisons #5374

Merged

Conversation

APickledWalrus
Copy link
Member

Description

This PR aims to improve ItemData's ItemMeta comparisons.
Just like the existing implementation, this new one is not exactly ideal. Because Skript manually checks certain parts of the ItemData, we do not want to check it again during our ItemMeta comparisons (this may result in an incorrect result). This is solved by cloning the second ItemMeta and setting its properties to match those of the first ItemMeta. If anyone has a better solution, please feel free to share it :)


Target Minecraft Versions: any
Requirements: N/A
Related Issues:

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.7 Targeting a 2.7.X version release labels Jan 20, 2023
Copy link
Member

@AyhamAl-Ali AyhamAl-Ali left a comment

Choose a reason for hiding this comment

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

Let's #TrustBukkitWork 😁

@TheLimeGlass TheLimeGlass merged commit 67339e3 into SkriptLang:master Feb 2, 2023
@APickledWalrus APickledWalrus deleted the fix/item-meta-comparisons branch September 6, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.7 Targeting a 2.7.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants