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.
Linked Issues
is duplicated by5
Created Issue:
Attribute minecraft:generic.attack_knockback does not work on players
You can use the minecraft:generic.attack_knockback attribute to change the knockback of an entity. But if you try to do this with players it does not work. It says Entity name has not 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.
Attribute minecraft:generic.attack_knockbackdoes not work on playersAttribute minecraft:generic.attack_knockback and minecraft:generic.flying_speed don’t work on players
You can use the minecraft:generic.attack_knockback attribute to change the knockback of an entity. But if you try to do this with players it does not work. It says Entity name has not 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.
It seems like minecraft:generic.flying_speed also does not work on mobs.
You can use the minecraft:generic.attack_knockback attribute to change the knockback of an entity. But if you try to do this with players it does not work. It says Entity name has not 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.
It seems like minecraft:generic.flying_speed also does not work on mobs.
You can use the minecraft:generic.attack_knockback attribute to change the knockback of an entity. But if you try to do this with players it does not work. It says Entity name has not 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.
is duplicated by
relates to
You can use the minecraft:generic.attack_knockback attribute to change the knockback of an entity. But if you try to do this with players it does not work. It says Entity name has not 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.
You can use the minecraft:generic.attack_knockback attribute to change the knockback of a
nentity. But if you try to do this with players it does not work. It saysEntity name has notAttribute 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.
You can use the minecraft:generic.attack_knockback attribute to change the knockback of a non player entity. 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.
You can use the minecraft:generic.attack_knockback attribute to change the knockback of a
non player entity. 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.
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.
is duplicated by
relates to
is duplicated by
is duplicated by
Attribute minecraft:generic.attack_knockback and minecraft:generic.flying_speed don’t work onplayersAttribute minecraft:generic.attack_knockback and minecraft:generic.flying_speed don’t work on all entities
is duplicated by
relates to
Thank you for your report!
We're actually already tracking this issue in MC-180199, so I resolved and linked this ticket 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 in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
This is probably the same issue as MC-180199.
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-180199, which has been marked as Invalid - this issue does not meet the criteria of the bug tracker, please check the parent report for more information on why this is the case.
Please use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
See the comment in MC-180199
Attributes not applying to some entities is a feature request, not a bug. Additionally the changelog explicitly said players.
EDIT: and here goes mojang being inconsistent again; this comment was based on the resolution/comment on MC-180199.
Isn't this just a duplicate of MC-180199?
EDIT: upon further looking into this, no, the attribute exists.
Invalid, as the message tells you, players do not have a flying speed attribute. For more info, see MC-180199.
Numerous mobs possess the capability for melee attacks, yet the
minecraft:generic.attack_knockback
attribute remains unutilized. This report diverges from MC-180199, as it describes a distinct issue. MC-180199 describes a scenario where entities lack this attribute entirely, resulting in error messages when attempting to modify it. In contrast, this bug report concerns entities that have the attribute but remain unused. Below is a list of such mobs where this attribute does not function:
- Axolotl
- Bee
- Dolphin
- Goat (MC-229507)
- Iron Golem (
MC-199161) - Magma cube
- Polar bear
- Pufferfish
- Rabbit (Killer bunny)
- Slime
- Wolf
By default, the attribute for all these entities is set to 0.
The attribute works as expected for the following mobs:
| Mob | Default value |
|---|---|
| Bogged | 0 |
| Cave spider | 0 |
| Drowned | 0 |
| Enderman | 0 |
| Endermite | 0 |
| Fox | 0 |
| Frog (see MC-269231) | 0 |
| Hoglin | 1 |
| Husk | 0 |
| Panda | 0 |
| Phantom | 0 |
| Piglin | 0 |
| Ravager | 1.5 |
| Silverfish | 0 |
| Skeleton | 0 |
| Spider | 0 |
| Stray | 0 |
| Vex | 0 |
| Vindicator | 0 |
| Warden | 1.5 |
| Wither Skeleton | 0 |
| Zoglin | 1 |
| Zombie | 0 |
| Zombie villager | 0 |
| Zombified piglin | 0 |
This bug report is also related to MC-250205. In addition this bug report could be related to MC-213349.

Also relates to
MC-138868.Not all entities have the same attributes.
Adding an attack knockback attribute for players is a feature request.
But why don’t have players an attack knockback attribute? I don’t see any reason for them to not have this attribute.
Wait, players are not intended to have this basic attribute?