Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-227735

Zombie reinforcements can spawn on biomes where regular zombies can't



    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1 Release Candidate 2, 1.17.1, 21w37a, 21w38a, 21w40a, 21w42a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 4, 1.18 Pre-release 6, 1.18 Release Candidate 1, 1.18.1 Release Candidate 1, 1.18.1 Release Candidate 2, 1.18.1, 22w05a, 1.18.2 Pre-release 1, 1.18.2 Pre-release 3, 1.18.2, 22w14a, 22w18a, 22w19a
    • None
    • Confirmed
    • Mob spawning


      The bug

      Zombie reinforcements can spawn on the following biomes: Mushroom Fields, Mushroom Field Shore, The Void, and all Nether and End biomes, even though zombies naturally don't spawn in those biomes.

      Steps to reproduce

      1. Create a single biome world of one of the previously mentioned biomes, on creative mode (or go to The End).
      2. Set the difficulty to Hard.
      3. Set command blocks to constantly kill any mob that is not either a zombie or the player (you cannot execute the command /gamerule doMobSpawning false, as that disables reinforcements). This is not necessary, but it assures that other mobs won't interfere or attempt to kill the player.
      4. Set the time to night.
      5. Spawn a zombie that can summon reinforcements inside it:
        /summon zombie ~ ~ ~ {Attributes:[{Name:"zombie.spawn_reinforcements",Base:1.0},{Name:"generic.movement_speed",Base:0.0}]}
      6. Switch the gamemode to survival, and hit the zombie a few times.
      7. Zombie reinforcements will spawn.

      Expected results

      Zombie reinforcements should not spawn in biomes where zombies can't spawn (especially in the void).

      Code analysis

      Using 1.18.2-pre1, Mojang mappings
      The logic for zombie reinforcement is in the method net.minecraft.entity.monster.Zombie.hurt(DamageSource, float); it contains several checks, including NaturalSpawner.isSpawnPositionOk(...) which checks for an empty valid spawn block within the world border, and SpawnPlacements.checkSpawnRules(...) which checks monster spawn rules (brightness, not in Peaceful mode). However, none of these methods seem to check for biomes where zombies can naturally spawn.


        Issue Links



              Unassigned Unassigned
              ampolive [Helper] ampolive
              13 Vote for this issue
              5 Start watching this issue