Attribute minecraft:generic.attack_knockback and minecraft:generic.flying_speed don’t work on all entities
You can use the minecraft:generic.attack_knockback attribute to change the attack knockback of a mob. But if you try to do this with players it does not work. It says entity name has no Attribute Attack Knockback. For mobs it works fine.
How to reproduce:
Run this command: /attribute @s minecraft:generic.attack_knockback base set 0
It fails.
minecraft:generic.flying_speed has the same issue.
It seems like minecraft:generic.flying_speed also does not work on mobs.
This also doesn’t work if you have the attribute on an item. You can for example use this command:/give @p minecraft:stick{AttributeModifiers:[
{AttributeName:"generic.attack_knockback",Name:"generic.attack_knockback",Amount:10,Operation:0,UUID:[I;5,5,5,5],Slot:"mainhand"}]} 1 and the attribute of the item will only work on mobs.
2020-04-23, 05:13 PM
2024-03-09, 03:59 PM
2020-06-10, 05:01 PM
12
8
-