Mob AI

Each type of mob in minecraft has a certain AI (Artificial Intelligence) system with different behaviours and mechanics. Passive mobs will flee in random directions after being hurt, while hostile mobs will face and chase/attack the Player as soon as they come close. Neutral mobs will remain neutral until a player or mob attacks it, at which point the neutral mob will turn hostile toward and attack the entity/mob that hit it.

All mobs randomly walk around. When they come to a one block high wall, they jump. They avoid falling 4 or more blocks (falling 4 or more blocks means taking fall damage). They all float in water except for slimes (as slimes cannot swim).