I summon a skeleton with a command block using the following command:
/summon Skeleton ~ ~1 ~ {Equipment:[{id:261},{},{},{},{}],Attributes:[{Name:generic.followRange,Base:40}]}
This gave me a normal looking skeleton with a bow. I switched to adventure mode and the skeleton charged straight at me as if it had a sword. However, wielding a bow, the skeleton did no damage. It did not shoot its bow even when I attacked it to provoke it into shooting me. I repeated this experiment but with a "normal skeleton" by typing /summon Skeleton, but got the same result. Even skeletons from spawn-eggs and in survival mode, they never fired their bows.
Comments 4
I discovered my issue. The problem was that on the same world I had a clock that was constantly updating the following command block:
/entitydata @e[type=Skeleton] {Attributes:[{Name:"generic.followRange",Base:100}]}
Thus by constantly updating the follow range of the skeleton, it was somehow interfering with its ability to shoot. Interestingly, the same clock was also updating two other command blocks affecting Spiders and Zombies by the same measure aforementioned. So it seems that somehow constantly setting the followRange of a mob will make it always attack by melee, because Skeletons with bows attacked by charging straight at me while Spiders and Zombies, which attack only by Melee anyway, were not inhibited.
Side note: numeral ids are depreciated, use the string ids instead