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=[
]] 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)
- duplicates
-
MC-271826 Armor default attribute modifier component can't be removed
- Resolved