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

Make item matching ignore modifier uuids #1426

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

Pablete1234
Copy link
Member

Fixes #1167

Essentially makes it so item-matching in PGM checks attribute modifiers ignoring their UUID, and if they're all equal then strips the modifiers from the meta that is passed down to the "equals" check

boolean attributesEqual(ItemMeta meta1, ItemMeta meta2);

default boolean modifiersDiffer(
Collection<AttributeModifier> a, Collection<AttributeModifier> b) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: style: imo this method is going too far with shortening variables names and makes it a bit harder to follow

Admittedly its less of a problem here given that what the method does is pretty simple

Copy link
Member Author

Choose a reason for hiding this comment

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

the method is rather trivial, so it's either A and B or modifiersA modifiersB, or modifiers1, modifiers2

given how trivial it is i don't think it matters much

@Pablete1234 Pablete1234 merged commit 144ca2d into dev Nov 6, 2024
2 checks passed
@Pablete1234 Pablete1234 deleted the fix-item-matching-attr-mods branch November 6, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Shop items that cost an item with an <attribute> aren't purchasable
2 participants