-
Bug
-
Resolution: Duplicate
-
None
-
1.16.4
-
None
-
Unconfirmed
-
(Unassigned)
It just doesn't set the value even if the command doesn't fail.
To reproduce:
- Summon a creeper near you /summon creeper ~ ~ ~ {NoAI:1}
- Add the modifier to the creeper: /data modify entity @e[type=creeper,limit=1,sort=nearest] Attributes[ {Name:"minecraft:generic.max_health"}].Modifiers append value
{Name:"test.max\_health",Amount:0.0,Operation:1,UUID:[I;-633757882,1012614665,-1758719176,-1591490096]} - Check that the modifier is there: /data get entity @e[type=creeper,limit=1,sort=nearest] Attributes[ {Name:"minecraft:generic.max_health"}].Modifiers ... it's there
- Add a dummy scoreboard objective /scoreboard objectives add test dummy
- Set a score value for the creeper /scoreboard players set @e[type=creeper,limit=1,sort=nearest] test 16
- And now the offender: /execute as @e[type=creeper,limit=1,sort=nearest] store result entity @s Attributes[ {Name:"minecraft:generic.max_health"}].Modifiers[
{Name:"hg.max_health"}].Amount double 1 run scoreboard players get @s test ... The command outputs entity_uuid has 16 [test] but the Amount is not set: - /data get entity @e[type=creeper,limit=1,sort=nearest] Attributes[ {Name:"minecraft:generic.max_health"}].Modifiers
- duplicates
-
MC-192981 Modifying entity attribute modifier values does not properly update nbt data
- Open