Summary:
There is an inconsistency in the use of the modification of attributes on items.
If you leave the modifier input empty, it behaves differently between armor and tool items.
For armor items, it does not remove the basic attributes (armor, armor_thoughness and knockback_resistance).
For tool items it will remove the basic attributes (attack_damage and attack_speed).
However, if you do not leave the input empty, it will remove the basic attributes in both cases.
Commands to reproduce:
(for commands in 24w33a: remove "generic")
Modified Netherite Sword:
/give @p netherite_sword[attribute_modifiers={modifiers:[]}] 1
/attribute @s minecraft:generic.attack_damage get -> 1.0
/attribute @s minecraft:generic.attack_speed get -> 1.0
Normal Netherite Sword:
/give @p netherite_sword
/attribute @s minecraft:generic.attack_damage get -> 8.0
/attribute @s minecraft:generic.attack_speed get -> 1.599...
(this can also be seen in the tooltip of the item)
Modified Netherite Chestplate:
Chestplate with no modifier added
/give @p netherite_chestplate[attribute_modifiers={modifiers:[]}] 1
/attribute @s minecraft:generic.armor get -> 8.0
/attribute @s minecraft:generic.armor_toughness get -> 3.0
/attribute @s minecraft:generic.knockback_resistance get -> 0.1...
(this can also be seen in the tooltip of the item)
Chestplate with luck modifier added
/give @p netherite_chestplate[attribute_modifiers=[
{id:"luck",type:"generic.luck",amount:1,operation:"add_value"}
]] 1
/attribute @s minecraft:generic.armor get -> 0.0
/attribute @s minecraft:generic.armor_toughness get -> 0.0
/attribute @s minecraft:generic.knockback_resistance get -> 0.0
/attribute @sĀ minecraft:generic.luck get -> 1.0
(this can also be seen in the tooltip of the item)
Normal Netherite Chestplate:
/give @p netherite_chestplate 1
/attribute @s minecraft:generic.armor get -> 8.0
/attribute @s minecraft:generic.armor_toughness get -> 3.0
/attribute @s minecraft:generic.knockback_resistance get -> 0.1...
(this can also be seen in the tooltip of the item)
Thank you for your report!
We're tracking this issue in MC-271826, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
š Bug Tracker Guidelines ā š¬ Community Support ā š§ Mojang Support (Technical Issues) ā š§ Microsoft Support (Account Issues)
š Project Summary ā āļø Feedback and Suggestions ā š Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.