The bug
Slimes are spawning specific to the moon phase and the swampland biome, but not in the swampland hills.
How to reproduce
Create world type: Superflat, Customize, Presets:
Change number of dirt blocks to 62 and change biome fromplains
toswamp_hills
/time set night
(you'll see the full moon, otherwise add 24000 until you could see it)/gamerule doDaylightCycle false
Kill all other mobs with command blocks
You can repeat this and use the swamp
biome and you will see many slimes in seconds.
The enviroment is supposed to contain pc details.