Villagers keep profession when zombified or cured

This is a new game mechanic introduced in version 2.2 of the Villager Tweaks Mod and it was the main feature added on that update.

When villagers get infected by zombies, they will now keep their original profession. Instead of becoming the regular "Steve" zombie villager, the infected villagers will have clothes and robes based on their original profession. If that villager had a custom name, the zombie villager will also keep that name and become persistant (will not despawn naturally).

The same rule works for curing a zombie villager. After they get cured, the villager will have the same custom name and profession as the zombie clothes indicated. The trades are not reset in Java (unsure of Bedrock). In Java, if a villager has a certain profession, is zombified and then cured, he will keep all of his original trades. If some of those trades have been maxed (with the red X) these trades will still be unavailable after the cycle. "NOTE: This feature does not affect the chance of a villager becoming a zombie, that part still follows Minecraft rules and depends of the world difficulty (0% on Easy, 50% on Normal, and 100% on Hard). "

Professions and careers
Villagers have 5 professions, indicated by their robes: Farmer, Librarian, Cleric, Blacksmith and Butcher. Some of those professions also have sub-types, called "careers" (e.g. Fisherman, Armorer, Leatherworker, etc).

When a villager is infected and become a zombie, only the profession is preserved, the career and the trades are lost. That means a zombie villager blacksmith,after cured, can become either an armoruer, a tool mith or a weapon mith.

Vanilla Zombie Villager
The original vanilla zombie villager can still spawn naturally, but more rarely. Of all zombie villagers that spawn naturally or from spawners, 70% will have a profession and only 30% will be the original one. If a vanilla zombie villager is cured, the new villager will get a random profession following the same rules as vanilla Minecraft.

Images
From left to right: Librarian, Cleric, Blacksmith, Butcher, Farmer and the vanilla zombie villager.

This was the feature that took the most time, but I really liked the result. This was the core feature of the 2.2 update, called "the Persistance Update". hi giys

My inspiration to create this was a suggestion from the user CursedGhast on the Minecraft Forums.

Interestingly enough, the fact that villagers lose their profession when zombified was reported in 2013 on Mojang's bug tracker under the code MC-11883. That bug report remain open, so maybe in the future ,something like this will be added to vanilla.