Minecraft wiki entry for Slime, associated text: A slime needs roughly a 3×2.1x3 free space to spawn. The area in which the slime spawns must be clear of solid or liquid obstructions. When a slime attempts to spawn, the game checks for the space requirement of a large slime, and the size is determined later. Therefore, since large slimes are slightly taller than 2 blocks, no slimes, regardless of size, are able to spawn at all in 2-block-high areas. Also, since large slimes are slightly wider than 2 blocks, and mobs spawn at the center of a block, having any block within the 3×2.1x3 area, even as thin as a glass pane, can prevent a slime of any size from spawning.