Is there a problem with mob behavior? As Marlix is a mini-boss, shouldn't Marlix be attacking players instead of running away?
This. Marlix doesn't have any control over where it goes. If you've ever been near a bat you'll know they fly away from players. Well the easiest way to give Marlix a flying AI was to make him ride an invincible and invisible bat, which he does. Part of this is that his moment is also controlled by one :/
As ethy said, the marlix flies because it is actually riding an invisible, invincible bat. The marlix has no control whatsoever of where it goes, and bats just fly randomly. {EDIT} ninja'd by xHaro_der -_-
Then he wouldn't be able to fly, and if you had a sharpness 100 hay bale, he would be super easy to kill. Along with most everything else.