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

[1.20.5] ItemAttributeModifierEvent does not cover all uses of attributes #906

Open
jaredlll08 opened this issue May 2, 2024 · 0 comments
Labels
1.20.6 Targeted at Minecraft 1.20.6 bug A bug or error help wanted Extra attention is needed

Comments

@jaredlll08
Copy link
Contributor

(I'm listing 1.20.5 since that is my current environment, but I don't believe this has been changed in 1.20.6)
Minecraft Version: 1.20.5

NeoForge Version: 20.5.0-beta

Description of issue:

CommonHooks#getAttributeModifiers is only called in ItemStack#forEachModifier, however there are other calls to DataComponents.ATTRIBUTE_MODIFIERS that do not use forEachModifier or that are covered by the ItemAttributeModifierEvent event, such as net.minecraft.advancements.critereon.ItemAttributeModifiersPredicate and net.minecraft.world.entity.Mob#getApproximateAttackDamageWithItem.

This leads to instances where attributes added via mods using the event are not seen in those methods.

@jaredlll08 jaredlll08 added the triage Needs triaging and confirmation label May 2, 2024
@Shadows-of-Fire Shadows-of-Fire added bug A bug or error 1.20.6 Targeted at Minecraft 1.20.6 and removed triage Needs triaging and confirmation labels May 2, 2024
@Shadows-of-Fire Shadows-of-Fire changed the title [1.20.5] ItemAttributeModifierEvent does cover all uses of attributes [1.20.5] ItemAttributeModifierEvent does not cover all uses of attributes May 2, 2024
@Matyrobbrt Matyrobbrt added the help wanted Extra attention is needed label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20.6 Targeted at Minecraft 1.20.6 bug A bug or error help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants