Summary:
When performing a sweeping attack, the knockback enchantment only applies to the entity that you have hit directly. It doesn't apply to other entities.
Steps to reproduce:
Hold a sword.
/enchant @s minecraft:knockback 2
Spawn some mobs.
Do a sweeping attack.
Observed result:
Only the knockback for the entity that you have hit directly was increased.
Expected result:
The knockback enchantment should increase the knockback for all entities that you have attacked.
Video:
[media]
Relates to MC-93669, MC-111428 and MC-111435