Slime

A slime is a hostile mob, in the shape of a hopping green cube of various sizes. They are able to see the player through solid blocks, and will always try to move directly toward players without regard for obstacles or hazards. When killed, a slime will split into smaller slimes, except for the smallest slime which will drop slimeballs instead. Slimes are found in either the lowest 40 layers of certain chunks, or (as of the Pretty Scary Update) in swamp biomes in darkness. On Xbox 360, slimes can also be found below level 40. Slimes can spawn in superflat world types if its world generation level is below level 40.

Usage
Slimeballs, which tiny slimes drop, are a key ingredient in sticky pistons. They can also be combined with blaze powder to create magma cream for brewing fire resistance potions. They are also good targets for gathering experience, since they are plentiful in selected areas, and killing a large slime plus all its fragments will give from 12 to 28 experience points.

Behavior
In vanilla Minecraft, only sizes 1, 2, and 4 spawn naturally, and with equal probability. With use of map editors or mods, Slimes can potentially range from size 1 to 256.

Slimes move by hopping, which they will do each 10 to 30 ticks ($1⁄2$ to $1 1⁄2$ seconds). Their exact routine is as follows:

The Slime will search for a player within 16 blocks (spherical) distance.
 * If no players was found, they wait 10 to 30 ticks (&frac12; to 1&frac12; seconds). Then they will change direction, by a random amount up to 57.26° (&frac12; radian) left or right, jump, and repeat the process.
 * If a player is found, the delay before jumping will be $1⁄3$ as long (3 to 10 ticks), and the Slime's direction will be set directly toward the nearest player before jumping.

An interesting observation about slimes is that when you spawn at least five of them in the overworld (in peaceful or creative modes), they all seem to hop in the same direction rather than wandering around aimlessly like a regular mob. This also applies for Magma Cubes.
 * Interaction with environment
 * Each time a Slime lands (Slime size * 8) Slime particles are spawned.
 * Slimes cannot swim upward in water, and will eventually drown if the water is deep enough.
 * Slimes can trample farmland.
 * Slimes can take damage in all the usual ways: burning, falling, drowning, suffocating inside blocks, being attacked, falling into The Void, etc.
 * Slimes can climb ladders, and be pushed over slabs & stairs.
 * Only medium or large size Slimes will generate sound when they jump.

Combat
Slimes' health is equal to their size squared. A slime's dimensions are .6 blocks times its size in each dimension.

When the slime has found a player it will come after him/her and will try to collide with the player. When a slime collides with a player it will deal damage equal to its size, except for size 1 (tiny) slimes, which cannot harm players directly (though they can push players into lava or other hazards).
 * When the Slime is attacking the player

When the player manages to kill the slime and the slime's size is bigger than 1 it will die and spawn 2-4 new slimes equivalent to its size/2, rounding down. If its size is 1 it will drop 0 - 2 slimeballs, but if it's larger it will only drop experience. All slimes drop experience equal to their size.
 * When the player is attacking the Slime

Spawning
Slimes naturally spawn in certain areas deep underground, and also spawn on the surface of swamp biomes during the night. Slimes will also spawn if the world type is superflat. Slimes also spawn in swamp biomes during the night, but as of snapshot 13w10a, spawn rates are effected by the phase of the moon. Also, slimes will often remain in the world during the day, though no new slimes will spawn until night falls. Often the slimes will drown.

Swamps
In swamps, slimes may spawn at night. They spawn most often on a full moon, and never on a new moon. This can make gathering slimeballs difficult, as it takes over two hours for the moon to cycle.

Low Layers
Slimes spawn throughout the world below layer 40, but only in certain chunks, 1 in 10 of all chunks. These that are determined pseudo-randomly by combining their chunk coordinates with the seed of the world. Tools exist to calculate which chunks are slime chunks—see Slime Finding Tools.

One in 10 of chunks will be able to spawn slimes underground, based on the formula: Random rnd = new Random(seed +                         (long) (xPosition * xPosition * 0x4c1906) +                          (long) (xPosition * 0x5ac0db) +                          (long) (zPosition * zPosition) * 0x4307a7L +                          (long) (zPosition * 0x5f24f) ^ 0x3ad8025f); return rnd.nextInt(10) == 0;

That is, using the chunk coordinates to help generate a seed, a random number between 0 and 9 will be generated, and if that number is 0, the chunk will be able to spawn slimes. To convert world coordinates to chunk coordinates, divide by 16 and round down.

Due to the fact that flatland worlds can be generated with a surface level well below the necessary height level for slimes to spawn (notably the default flatlands, whose surface is 3 blocks above bedrock), slimes tend to spawn abundantly on flatland map types. This is because there are no caves, all spawnable area is lit during the day and slimes are the only hostile mob that can spawn in the light. Slime spawning on a Flatlands world can be prevented by using a preset whose surface level is above layer 40 (for example, the "Redstone Ready" preset).

Like most other mobs, Slimes require two vertical non-opaque blocks (e.g., air, signs, torches) to spawn in, with an opaque block underneath. The space they spawn in must also be clear of solid obstructions and liquids. Big Slimes require a 3x3x3 space to spawn, small Slimes require a 3x3x2 space, and tiny Slimes require a 1x1x2 space (or 1x1x1 if the upper block is not opaque). Slimes are equally likely to spawn at all sizes. Slimes are much more likely to spawn in a 3 high room.

Slimes spawn only 1/10th as often as other hostile mobs, so unless a swamp biome is nearby, they can be hard to find. Slimes can spawn in any light level and lighting does not affect their spawn rate. However, lighting up the surrounding area does decrease the chances of non-slime mobs spawning and thus indirectly increases slime spawning rates. Glowstone has the same properties as glass, so mobs cannot spawn on it. When lighting the floor, Jack-o-lanterns are recommended. Slimes have equal chances to spawn at any size. It is intended for tiny slimes to spawn in peaceful mode, however, the code to allow this is skipped over when the game is on peaceful.

Like other hostile mobs, slimes will not spawn within 24 meters (spherical) of any player, and will despawn instantly if no player is within 128 meters. However, other mobs will also randomly despawn over time if no player is within a 32 meter range. In contrast, slimes will never despawn if there are players within the 128 meter range.

Farming


Once a slime spawning chunk has been determined the process of encouraging slime spawning is relatively simple. The player can clear out large rooms - typically 3 x 3 x 3 or larger. It might be wise to light these rooms to prevent other hostile mobs from spawning. Waiting for slimes to spawn in these rooms can be lengthy at times, however. See the Slime spawning page on minecraftforum.net mentioned above for more information on how to increase this rate.


 * Descend below the maximum height allowed for slime spawning and strip mine a cavern. (or find a large Lava lake close to Bedrock) Approximately 10% of chunks will spawn slimes, so the space must be fairly large to have a good chance of spawning one. With a cavern that spans 7 chunks you have a 50% chance to spawn one, and 22 chunks will have a 90% chance.


 * Setting slimes on fire has become a popular method of getting slimeballs because the chances of the slimeballs burning is surprisingly low so through the use of netherrack setting parts of rooms where slimes spawn on fire is a great way to farm slimeballs.


 * A much easier alternative to the above is to dig out a pit large enough to hold all sizes of Slimes and fill it to the brim with water. Slimes cannot rise in water or hop around so they will eventually drown, leaving slimeballs when they perish.

The tutorials section provides some advice on managing slimes in superflat mode. Due to Slimes spawning in very large numbers on flatland maps, so there is no need to farm them, but they do need to be brought under control.

Bugs

 * Slimes will take fall damage. This will cause the bone-cracking impact sound when landing, which seems incorrect, as they have no bones and they are gelatinous.
 * Additionally, their nether counterpart, the magma cube, takes no fall damage.
 * Slimes in SMP can sometimes push players despite intervening blocks
 * As with other mobs, slimes can sometimes "glitch" into the ground, sometimes making them invincible, but still able to harm the player.
 * There is the possibility that when a Large Slime is swung at, it will not take damage. In other words, the hit box sometimes reacts as if the Large Slime was a Tiny Slime , making the Large Slime practically invincible.


 * If in creative mode, you dig out the bedrock under a stationary slime, it will fall into the void, but large and medium slimes can jump back out of the void so long as there is a block within their jumping radius.

Trivia

 * When a player recieves damage from a slime, the "punching" sound effect that plays when taking damage sounds squishier and wetter than normal.
 * Third party software can be used to create arbitrarily large slimes.
 * Slimes may have been inspired by a number of classic gaming monsters. Their shape and size resemble that of Gelatinous Cubes from Dungeons & Dragons (though admittedly that probably comes more from Minecraft's cubic art design), while their splitting behavior resembles that of Zols and Chuchus from The Legend of Zelda, Puddings from Nethack and Ameboids from Ratchet and Clank. The name and the large, cartoonish face may be a homage to Yuji Horii's iconic Slimes from the Dragon Quest series.
 * Since there's a limit on the number of hostile mobs that can exist in all the loaded chunks at once, splitting several slimes into tiny slimes and letting them follow you will greatly reduce the chances of encountering other monsters.
 * Slimes will only attack the player, even if a skeleton accidentally shoots it.
 * Slimes do not use the updated Mob AI, and still move directly towards its target, even if they will fall off a cliff.
 * There's a line in the code that's meant to allow tiny slimes to spawn on Peaceful, but the natural spawning algorithm skips hostile spawning entirely on Peaceful. As a result, this line won't even be reached. However, there are illegitimate ways to spawn tiny slimes on Peaceful, e.g. with a Slime Monster Spawner.
 * Magma Cubes, added in Beta 1.9, could be seen as the Nether equivalent of Slimes.
 * Slimes hop faster when pursuing a player.
 * Despite Slimes being hostile mobs, many players have tiny Slimes as pets since they follow and can't directly damage players. They will also push Minecarts you are in, allowing for Slime-powered minecarts as they follow you.
 * From one large slime, the minimum experience you can get from killing it and all the slimes that split from it is 12, 4 from the largest, 2 from the 2 it splits into, and 1 from the 2 each of those split into. The maximum experience possible is if the big slime splits into 4 and each of those medium slimes split into 4, resulting is 28 total experience.
 * Slimes can climb ladders, and once in pursuit of the player, their straight-line pursuit can take them right to the top, if a player is waiting there.
 * Slimes do not prevent you from sleeping, meaning you do not get this message: "You may not rest now, there are monsters nearby".
 * As of Snapshot 12w25a Slime spawning in Superflat world type has reduced.
 * One-block ceilings of opaque blocks immediately below slimes will have a green "leak" particle effect (as with lava and water).
 * Because slimes spawn in swamps at night, they often jump in the water and kill themselves.

History
Slimes were the fifth hostile mob added to the game on July 23, 2010 (Seecret Friday 6! Alpha 1.0.11). When slimes were first added, there were four sizes: Tiny, Small, Big and Huge. Notch limited slime spawning shortly afterwards because they would appear in abundance. A miscalculation in the new limit caused slimes to only spawn in strange locations, so Notch then disabled natural slime spawning.

Small slimes started to drop 0 - 2 slimeballs in Beta. Notch confirmed in Coestar's livestream that slimes had been reskinned and returned in Beta 1.2_01 but were still very rare. On many old SMP servers, slimeballs were used as money, because back then there were no uses for slimeballs. Slimes also used to be extremely rare, thus making it hard to "cheat" the economy. Slimes became more common in Beta 1.3. A bug remedied in Beta 1.5 caused slimes to spawn in Peaceful mode and attack without any provocation. An SMP bug fixed in Beta 1.4 caused slimes that split to be visible only to the player that caused them to split and would not take any damage. Because these slimes were client-side, the player could only remove them by exiting and logging back into the server.

Since the 1.9 prerelease, slimes always split upon death even if they take overkill damage. Before Beta 1.9 Pre-release 5, Slimes only appeared in the bottom 16 layers of the map regardless of light levels or time of day, often in large caverns or open mines.

In the snapshot 12w38a, Slime sounds now use the same sounds as Magma Cube, to make the sounds more realistic like.

Before 12w40a, Slimes were very difficult to find in layers, but now slimes are now easier to find, and they spawn in swamp biomes during the night. Since slimes can't swim, it's quite likely that they will jump in deep water and eventually drown.

Pre-1.4 spawning
The (pre-1.4) slime spawning algorithm is discussed in greater detail in this forum topic, but note that the algorithm has changed many times and older information may no longer be accurate.

Due to the relative difficulty of finding slimes before 1.4, a number of tools exist to aid the player in finding a location that can spawn slimes.


 * Slime Finding Tools
 * http://mcslimes.appspot.com/ (Java applet, allows you to upload a level.dat file from a server or multiplayer for seed, very useful)
 * http://extension.ws/minecraft/slimes.html (HTML/JavaScript)
 * Rei's Minimap is able to to highlight chunks with the ability to spawn slimes in a singleplayer game.
 * What's My Light Level can also aid players in finding Slimes.
 * Minecraft X-Ray, since version 3.4.0 (external map-viewer, not a mod)
 * AMIDST Finds Slime chunks as well as Strongholds, Villages, and Biomes. (external program)