Zombies and zombie villagers do not spawn underground on blocks where they would be defined as cave mobs (that is, where they are subject to and contribute to the cave density cap for monsters). They do spawn in caves, but only on blocks that define them as surface mobs. This causes fewer zombies to spawn in caves than there should be, and consequently causes caves to contain more monsters of other types since there is more room below the cave density cap.
Other monsters (creepers, skeletons, spiders, witches, and endermen) are not affected by this issue.
Steps to reproduce:
- Open the attached demo world
There is a 16 x 16 spawn floor at Y=6. The blue square you see is aligned above it. This world is configured so that no spawns can occur naturally anywhere but the spawn floor.
- Place a bottom slab on the blue block in front of the bottom observer. Command blocks will replicate this across the entire blue square, hence above the spawn floor. This creates the condition necessary to spawn mobs in caves subject to the surface density cap.
- Use the button to teleport to the Testing Room.
- Use the lever to enable mob spawning. Repeating command blocks will start running that test for zombies and zombie villagers every 5 seconds. If they find any, the chat will show them.
- Wait until zombies and/or zombie villagers are found. This shows that these can spawn on blocks that qualify the mob as a surface mob.
- Disable mob spawning.
- Use the Reset button to kill all the mobs that spawned.
- Use the button to teleport back to the surface. Break the slab you placed. This creates the condition necessary to spawn mobs in caves subject to the cave density cap.
- Return to the Testing Room and enable mob spawning.
- Wait as long as you like. No zombies or zombie villagers will spawn.
Important: The ability to spawn monsters in caves subject to the surface density cap is reported as a bug in MCPE-41273. It may be that such spawns are intended in some cases, but if not it will likely be fixed by reducing or eliminating surface monster spawns in caves. If that fix occurs before this problem, the result will be that zombies or zombie villagers will no longer spawn underground at all! Therefore, this issue needs to be fixed before, or in conjunction with, MCPE-41273.