-
Bug
-
Resolution: Fixed
-
Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w03b, Minecraft 19w03c
-
None
-
Confirmed
-
(Unassigned)
The bug
When attempting to modify a phantom's attributes with the /data command, changes do not take place. Other functions of the /data command work fine, such as changing its current health, size, etc. but attributes such as attack damage and follow range are not affected.
How to reproduce
- Summon a phantom
- Run the command (The base modifier can be any number. It makes no difference):
/data merge entity @e[type=minecraft:phantom,limit=1] {Attributes:[{Name:generic.attackDamage,Base:0}]}
- The server will say the mob has been modified, but checking using the following command reveals that no change has occurred:
/data get entity @e[type=minecraft:phantom,limit=1]
The commands used above function correctly for all other mobs I have tested.
Code analysis
From 18w31a's source:
Method ang.l() will directly set the phantom's generic.attackDamage to a hard-coded 6, plus the value from their Size tag, which overrides whatever Base was previously specified. This method is called when the entity has its data set from NBT (whether it's via command or via chunk loading).
- relates to
-
MC-154372 Phantoms deal less damage in 1.14+ than in 1.13.2
- Resolved
-
MC-71977 Changing generic.attack_damage of tamed wolf has no effect / taming wolf removes custom generic.attack_damage
- Resolved
- testing discovered
-
MC-181823 Phantom attack damage attribute resets on world load if size is nonzero
- Open