Question: why are slimes not spawning in swamp?
Answer: Slimes only can spawn in a swamp if the swamp is between Y-levels 50 and 70. In addition, slimes will also only spawn if the light level is at most 7. ... In addition, slimes follow all normal mob spawning rules. They will only spawn if you are within 16 to 144 blocks from a "valid" area.