It depends: if you are talking about mobs like zombies and husks, they have already in their AI the behavior needed to perform an attack to the player.
However, if you are talking about other mobs like skeletons or pillagers, well, in their AI code, they don’t know how to use a spear so it’s only a model shown.
I don’t think they are going to change that (as we have already seen with the crossbow) since there is no real purpose: mobs (aside for zombies and husks) will never spawn naturally holding a spear.
It depends: if you are talking about mobs like zombies and husks, they have already in their AI the behavior needed to perform an attack to the player.
However, if you are talking about other mobs like skeletons or pillagers, well, in their AI code, they don’t know how to use a spear so it’s only a model shown.
I don’t think they are going to change that (as we have already seen with the crossbow) since there is no real purpose: mobs (aside for zombies and husks) will never spawn naturally holding a spear.