-
Bug
-
Resolution: Unresolved
-
None
-
1.20.6, 24w18a, 1.21, 1.21.3, 1.21.4 Pre-Release 3
-
None
-
Confirmed
-
Combat, Commands
-
Low
-
Platform
If any mob or player has a very low attack_knockback value, the knockback strength performed by the entity is weaker than the usual knockback from a regular hit attack. This is unintuitive, because having an a{{ttack_knockback}} value of 0 should not be stronger than a value of, say, 0.1.
There are two ways of how you'd expect it to work, either attack_knockback would be only act as additional knockback for regular attacks, so values of 0.1 would only increase the knockback from attacks and not otherwise.
The other way would be that attack_knockback completely replaces the knockback an attack deals, so values of 0.1 dealing very low knockback make sense. However this one comes with some caveats, as a value of 0 would have to make attacks not deal any knockback. It would have to make most entities have a default attack_knockback value of something like 0.4 to simulate the usual knockback from a regular attack.
How to reproduce
- Summon a husk, apply a high level of slowness to it.
/execute summon minecraft:husk run effect give @s minecraft:slowness infinite 10 true - Get attacked by the husk, notice it deals some knockback from a regular attack.
- Set the attack_knockback attribute of the husk to a value of 0.1.
/attribute @n[type=husk] minecraft:attack_knockback base set 0.1
- Notice how the knockback dealt by the husk is lower than before, despite having a higher attack_knockback value than 0.
Expected result
The attribute attack_knockback would act like a scale for knockback from regular attacks.
Observed result
Some values of the attribute can override the knockback strength of regular attacks.