Minecraft – way to still have zombie villagers from zombie spawners


I'm halfway through building a villager cure station from a zombie spawner however since 1.11 zombie villagers don't spawn there anymore…

Is there still a way to maybe change this feature back through the use of a datapack or something?

I'm playing on 1.14.1 Pre-release.

Best Answer

A spawner can choose between entities from an arbitrarily big set that you specify.

For example if you want 95% of entities from a spawner to be zombies and 5% to be zombie villagers, you can use this command:

/setblock ~ ~ ~ spawner{SpawnPotentials:[{Entity:{id:"zombie"},Weight:19},{Entity:{id:"zombie_villager"},Weight:1}]}

This isn't quite the same behaviour as it used to have in old versions, for example I'm pretty sure that it's slower, but you can adjust all the parameters you find here (archive) however you like.

(Omitting the Weight parameters gives 100% of the spawn probability to the first entity type.)