Minecraft wiki entry for Managing_slimes_in_superflat_mode, associated text: On superflat maps, slimes spawn in enormous numbers, and dealing with them can become extremely tedious. Three main tricks are commonly used to handle them, although the first two are outdated methods. The first of these are to build walls or fences around areas you wish to keep slime-free. Fences would stop all slimes as well as any other mobs, or spaced columns of dirt two blocks high with a one-block gap between each will keep out medium and large slimes while still permitting all other mobs (and the harmless tiny slimes) to pass through. The second common trick is to build a slime pit or a 'slime cage' that traps any slime that blunders into it, thereby controlling the problem by coralling the slimes into known locations. Iron golems will attract slimes, so adding an iron golem to the slime cage will drastically increase the catch (fencing the iron golem in via fences will prevent it from killing the slimes). Finally, there is a third method for versions 1.9 and up. This version uses a clock with a command block. If no Slimes at all are desired, then the world can simply be generated with a surface y level above 40, which will stop the slime spawns.