Slime AI

Slime AI is an AI followed by every slime in the game (with the exception of King Slime, Queen Slime, Heavenly Slime and Gastropods), as well as the Hoppin' Jack, Slimer and Grasshoppers.

Behavior
An NPC with the Slime AI exhibits the following behavior:
 * Chases the player by jumping towards them
 * Floats on water
 * Jumps up to higher platforms, but can not drop down them
 * Takes damage from lava, except the Lava Slime
 * Suffers knockback

Exceptions

 * Slimes will not chase the player above ground at daytime, not even after hitting the player. However, if nighttime sets in or the player lands in a hit with any weapon, the chasing behavior sets in.
 * Grasshoppers run away from nearby players, moving opposite to the normal chasing behavior.
 * Slimes will also behave as if they are above ground and it is daytime when the player has equipped. They will even stay passive after being hit while Royal Gel is equipped.

Tips

 * Slimes jiggle up and down slightly, which becomes faster when they are about to jump. It is a good idea to attack just after they land, as the player will have a few seconds to retreat before they jump again.
 * Since slimes have a limited jump height, it is recommended to get to a place where they cannot reach the player. The height depends on the type of slime it is.