Similar to this question, does hitting people with tools cause them to not like you? Unlike the other question I have never seen an NPC react but I know I have accidentally swung an axe or hoe in the direction of them before.
1 Answer
You can't hit someone with a tool or a melee weapon. When you swing one of these items, one of the things the game checks is whether your potential target is a monster. Monsters can be whacked; ordinary NPCs (including animals) can't.
(Source: Snooping in the source code with a decompiler)
-
Such a godsend too, I always felt so bad in HM when I would smack my cows or chickens with an axe accidentally!– CoqPwnerCommented Mar 11, 2016 at 20:05