The bug
Most zombie-related mobs, even including zombified piglins, can zombify/infect villagers, while zoglins cannot. Zombies, husks, drowneds and zombie villagers are designed to be able to zombify villagers. However, zombified piglins(formerly known as zombie pigmen) also can infect villagers(using commands to make them attack villagers). As zombified piglins can infect villagers, it's expected that zoglins, another variant of zombified nether mobs, are able to zombify villagers as well, while they cannot in fact, causing it to be inconsistent.
How to reproduce
Simply let a zombie-related mob kill a villager in hard difficulty(or normal with half chance) to transform the villager into a zombie villager. It's observed that zoglins even in hard mode still kill villagers instead of zombifying them. Zombified piglins can be done using command
/execute as @e[type=zombified_piglin] run data merge entity @s {AngryAt:[I;0,0,0,0]}
/execute as @e[type=zombified_piglin] run data modify entity @s AngryAt set from entity @e[type=villager,limit=1,sort=nearest] UUID
respectively.
Linked issues
relates to 2
Attachments
Comments 6
I feel like it does not need to occure with zombified piglins since the command that you use for it is unreal to be used by players.
Affects 1.20.6. A simple way to test is to do:
/difficulty hard
/summon minecraft:villager ~ ~ ~ {NoAI:1b}
/summon minecraft:zoglin ~ ~ ~ {NoAI:1b}
/damage @e[type=minecraft:villager,limit=1,sort=nearest] 100 minecraft:player_attack by @e[type=minecraft:zoglin,limit=1,sort=nearest]
This issue is somewhat different from MC-181202, though. MC-181202 was closed for being feature request. However, this issue is more like an inconsistency since this one marked the relation between zoglins and zombified piglins.