Minecraft wiki entry for Magma_Cube, associated text: They can swim in water and attempt to stay on the surface. Like slimes, magma cubes drown if submerged in water for 15 seconds, splitting into smaller cubes if possible.