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

Add mixins for FabricItem.getAttributeModifiers #3797

Merged
merged 1 commit into from
May 30, 2024

Conversation

opekope2
Copy link
Contributor

Added an ItemStack mixin to call FabricItem.getAttributeModifiers(ItemStack).
Also added a mixin when Minecraft creates the item tooltip, because unlike 1.20.4, which get attribute modifiers using getAttributeModifiers, 1.20.6 loads them from data components.

I tested it on a production client with a mod of mine (source not yet upstream), and it worked. I'll test it on a server later.

Resolves #3787

@opekope2
Copy link
Contributor Author

Tried it on dev client&server and prod client&server, and I didn't encounter any problem

@modmuss50 modmuss50 added bug Something isn't working merge me please Pull requests that are ready to merge labels May 29, 2024
@modmuss50 modmuss50 merged commit 6248723 into FabricMC:1.20.6 May 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merge me please Pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FabricItem.getAttributeModifiers(ItemStack) is defunct
2 participants