Affects Version/s: Minecraft 1.14, 1.16 Pre-release 3, 20w51a, 1.16.5
Fix Version/s: None
When cows, sheep and pigs are hit by a weapon enchanted with Knockback while they are walking to a specific location, they do not update their pathfinding. They will continue to move to the location they were originally pathfinding towards.
Potentially other mobs are affected as well.
This is easier to see if the mobs are hit by a weapon enchanted with a high level of Knockback. This was reproduced easily with Knockback 20. This level of Knockback will knock most mobs about 50 blocks.
Create a superflat world in creative mode.
Enchant a stick with Knockback 20, command is:
Find or spawn a cow, sheep or pig.
Wait until the mob is walking on its own to a new location.
Hit it with the Knockback stick. -> The mob will run towards the player, towards where they were originally going. They will run in a straight line for 50 blocks or so. It won't happen all the time but will happen fairly often.