ZsoltMolnarrr/DungeonDifficulty

Invalidate the ModifyItemAttributeModifiersCallback in fabric api

Closed this issue · 4 comments

private static final String ITEMSTACK_ATTRIBUTES_NBT_KEY = "AttributeModifiers";

I think this implementation has a big problem as it makes many other mods ineffective.
ModifyItemAttributeModifiersCallback in fabric api doesn't work when the itemstack has a 'AttributeModifiers' NbtCompound.

Please specify what exactly the problem present in-game, also feel free to recommend methods to resolve.

Please specify what exactly the problem present in-game, also feel free to recommend methods to resolve.

After installing this mod and TieredZ at the same time, when I obtained a weapon from the loot chest and reforged it in an anvil, nothing happened except for changing the name prefix.

Technically there is no bug here, instead, this problem is a semantic incompatibility between the 2 mods.
While TieredZ modifies the native attribute modifiers, Dungeon Difficulty applies a full NBT dataset with the buffed modifiers.

Its been a long time known issue, as a bugfix, this issue is non actionable.
There is no resolution without rewriting one of the two mods.

You are the one causing the incompatibility for any other mods attempting to modify item attributes. Mods who use the Callback can work together without problem, but none of them could work with NBT attribute modifier.

Mods are not supposed to use the NBT attribute modifier. It’s reserved for datapack and map makers. Please switch to the Callback method to fix the problem.