Minecraft wiki entry for Wandering_Trader, associated text: When attacked by a player, a wandering trader flees from the player as a villager would do. The llamas, however, attack the player by spitting if their master gets hit, except in Peaceful. The llamas stop attacking If the player is killed and respawns, if the llamas are leashed after the wandering trader is killed or if the player gets far enough away from them for a short period of time.