mojira.dev
MC-14800

When zombie villagers, husks, drowned or zombified piglins are damaged, they spawn regular zombie reinforcements

The bug

When zombie villagers, husks, drowned or zombified piglins take damage, there is a chance (depending on difficulty setting it seems) that a zombie will spawn.

It is not clear what the expected behavior for these zombie types should be: Spawning zombies of the same type or not being able to spawn reinforcements at all.
However, for zombie villagers spawning zombie villager reinforcements might allow building a farm based on this, which might or might not be desired.

Note: For zombified piglins ("zombie pigmen" at the time) this was partially fixed in 20w14a by setting their base zombie.spawn_reinforcements value to 0. However, it appears that if a zombified piglin spawns as leader ("Leader zombie bonus"), then it is still possible for it to spawn zombies. The same also applies when setting a custom zombie.spawn_reinforcements value in the NBT or via commands.

How to reproduce

  1. Be in the nether or the end (the overworld works too, but there will be natural zombie spawning as well)

  2. Set the game difficulty to hard, and ensure the gamerule mobGriefing is set to true

  3. Spawn a bunch of zombie villagers, husks, drowned or zombified piglins. Example:

    /summon minecraft:zombified_piglin ~ ~ ~ {Attributes:[{Base:1.0,Name:"zombie.spawn_reinforcements"}]}
  4. Go into survival mode

  5. Damage the mobs for a while
    → ❌ Zombie reinforcements are spawning

Expected behavior

Regular zombie reinforcements would not be spawned when entities that aren't zombies with the minecraft:zombie.spawn_reinforcements attribute are attacked. Instead, for example, if a zombified piglin with this attribute were to be attacked, it would summon zombified piglin reinforcements and not zombie reinforcements.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

MC-14684 Damage to a zombie pigman will spawn regular zombies instead of zombie pigmen Resolved MC-15301 Zombie Pigmen spawn zombies when attacked Resolved MC-15355 zombie's spawn in the nether Resolved MC-41649 Zombie Pigman summon Zombie as reinforcement Resolved MC-48268 Regular Zombie found in the nether Resolved

Attachments

Comments 113

Unable to reproduce.

I've retested, and it appears to only happen when pigmen are shot by ghasts (probably other non-player damage aswell). Also, zombies seem to spawn a lot more frequently as you increase the difficulty setting.

I can confirm this for 13w18b. It happened to me when I was smashing some zombie pigmen.

Can confirm, when I was hitting zombie pigmen, a zombie spawned nearby. Will upload pics

Can confirm with 13218c, happens when damage is dealt to pigmen

103 more comments

Confirm in 1.19.4 Pre-release 3

Can confirm in 1.19.4 and 23w18a

Confirmed in 1.20.1

Still confirmed in Java 1.20.1

Can confirm in 1.21

Avaq

Sonicwave

etanaratsastaja

Confirmed

Gameplay

Low

Mob spawning

mob, reinforcement, spawn, zombie

Snapshot 13w17a, Snapshot 13w18b, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w23b, ..., 1.20.2, 1.20.4, 23w51b, 1.21 Pre-Release 4, 1.21

Minecraft 14w29b, 24w33a

Retrieved