NeoForge
NeoForge copied to clipboard
[1.20.5] ItemAttributeModifierEvent does not cover all uses of attributes
(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.