Modifying entity attribute modifier values does not properly update nbt data
When using the "/data" command to modify entity attribute modifier amounts, nbt data is not updated/displayed despite returning a "success" when the command is executed. However, the desired value is grabbed when using the "attribute" command.
How to Reproduce:
Summon a dummy entity with a certain attribute (I chose max_health).
/summon minecraft:armor_stand ~ ~ ~ {Tags:["dummy"],Attributes:[{Base:20.0d,Name:"minecraft:generic.max_health"}]}
Add an attribute modifier of "Amount" 1.0 to max_health using the attribute command (see picture 1 to view the nbt after the attribute command was applied).
/attribute @e[tag=dummy,limit=1] minecraft:generic.max_health modifier add 0a-1a-2a-3a-4a test 1.0 add
Use the data command to modify the modifier "Amount" value to 2.0d (This should return successful).
/data modify entity @e[tag=dummy,limit=1] Attributes[{Name:"minecraft:generic.max_health"}].Modifiers[0].Amount set value 2.0d
Grab the modifier "Amount" value from the entity's nbt using the data command (This should return: 1.0d).
/data get entity @e[tag=dummy,limit=1] Attributes[{Name:"minecraft:generic.max_health"}].Modifiers[0].Amount
Grab the modifier "Amount" value using the attribute command with a scale of 1. This should return 2.0d, which is a discrepancy (see picture 2)
/attribute @e[tag=dummy,limit=1] minecraft:generic.max_health modifier value get 0a-1a-2a-3a-4a 1
Linked Issues
Created Issue:
Modifying entity attribute modifier values does not properly update nbt data
When using the "/data" command to modify entity attribute modifier amounts, nbt data is not updated/displayed despite returning a "success" when the command is executed. However, the desired value is grabbed when using the "attribute" command.
How to Reproduce:
Summon a dummy entity with a certain attribute (I chose max_health).
/summon minecraft:armor_stand ~ ~ ~ {Tags:["dummy"],Attributes:[{Base:20.0d,Name:"minecraft:generic.max_health"}]}Add an attribute modifier of "Amount" 1.0 to max_health using the attribute command (see picture 1 to view the nbt after the attribute command was applied).
/attribute @e[tag=dummy,limit=1] minecraft:generic.max_health modifier add 0a-1a-2a-3a-4a test 1.0 addUse the data command to modify the modifier "Amount" value to 2.0d (This should return successful).
/data modify entity @e[tag=dummy,limit=1] Attributes[{Name:"minecraft:generic.max_health"}].Modifiers[0].Amount set value 2.0dGrab the modifier "Amount" value from the entity's nbt using the data command (This should return: 1.0d).
/data get entity @e[tag=dummy,limit=1] Attributes[{Name:"minecraft:generic.max_health"}].Modifiers[0].AmountGrab the modifier "Amount" value using the attribute command with a scale of 1. This should return 2.0d, which is a discrepancy (see picture 2)
/attribute @e[tag=dummy,limit=1] minecraft:generic.max_health modifier value get 0a-1a-2a-3a-4a 1
is duplicated by
Thank you for your report!
We're tracking this issue in MC-192981, 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
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit


Can confirm in 20w51a.
I cannot reproduce this issue in Minecraft 1.20.5 pre-release 1.