Foxes attack players they trust if they self-inflict damage.
It kind of makes the PunchII super jump trick kind of dangerous to pull if you play with a lot of trusting foxes.
Easy way to reproduce: Bow and arrow, shoot at yourself by aiming upwards.
NOTE: Untested with self inflicted damage from TNT, snowballs, splash potions, potions and ender pearls.
Comments 2
Self-inflicted damage from TNT (using flint and steel or flame bows) and splash potions cause friendly foxes to attack the player. Enderpearls don't cause this behavior, nor do snowballs; the latter don't do any damage or knockback at all.
Anything that deals damage and can be traced to the cause (i.e. a skeleton with a flame bow igniting TNT that hurts the player) will be targeted by friendly foxes. This includes other foxes, which is why they will try to kill each other.
Can confirm. After they kill you, they will then attack each other for the same reason. This may relate to MC-147619.