Fabric: Attribute#mergeAttributes doesn't respect modifier UUIDs

Created on 25 Jun 2020  路  14Comments  路  Source: FabricMC/fabric

Attribute#mergeAttributes completely ignores the UUIDs of the modifiers in the input multimaps, causing problems for code that depends on particular UUIDs (such as Item.ATTACK_DAMAGE_MODIFIER_ID). I'm not sure what the intended behavior for this method is.

bug help wanted

Most helpful comment

I'll take a look when I can.

All 14 comments

I'll take a look when I can.

Actually, since the purpose of mergeAttributes is to prevent duplicate entries in the tooltip, couldn't the current calls to that method be replaced with one that merges only the multimaps (using ImmutableMultimap.Builder#putAll), while handling duplicate entries when the tooltip is displayed?

I don't mean to be rude, but is there any progress on this issue?

It's been 3 weeks since this issue was opened; any response would be nice.

855 might be helping with it? I've taken a step back from modding for the time being due to personal circumstance.

855 concerns mining levels. It isn't relevant to attribute modifiers at all from what I can get from the code.

They're both part of the same module.

IMO they should become two different modules then.

Also yes #855 will not affect this.

I mean, AttributeManager solely exists to help deal with Fabric Tool Attribute API, so it doesn't make sense to spin it out. We're not NPM.

No, I mean that the mining level stuff is completely unrelated to tool attributes

uhhh, no? the mining level stuff was literally one of the primary points of tool attributes

The attributes mean the actual entity attributes, like attack speed and stuff. The mining speed and is effective is not really an attribute in my opinion.

Anyway, I completely went off-topic here, sorry about that. As stated, #855 won't fix this issue and this issue should be looked into.

I may look into this a bit later and write unit tests for the merging. No guarantees though

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liach picture liach  路  4Comments

M4gma picture M4gma  路  5Comments

JustinJ553 picture JustinJ553  路  3Comments

BigCasper picture BigCasper  路  4Comments

NatoBoram picture NatoBoram  路  3Comments