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

Zombies of village siege do not spawn centered on a block

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      Zombies spawned by a village siege do not spawn centered on a block, instead they use the block position coordinates. This can, combined with MC-59440, result in suffocating zombies.

      How to reproduce

      Village sieges only happen

      • when the moon is at the zenith
      • when a player (not being a spectator) is nearby
      • when no second village is close
      • when the village has at least 10 doors
      • when the village has at least 20 villagers
      • with a chance of 1 / 10

      Because a siege only happens with a chance of 1 / 10 it is easier to cause one by having a clock (for example repeater) setting the time to day, waiting a short moment (for example one redstone tick), setting the time to 18000 and then waiting a little bit longer.

      1. Create a Superflat world with the preset "Classic Flat"
      2. Get to a nearby village, for example by using /locate Village
      3. Setup a repeating command block with the following command
        /entitydata @e[type=zombie] {NoAI:1b}
        
      4. Look at the zombies spawned by a village siege
        → They will be in the middle of four blocks

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.village.VillageSiege.spawnZombie() does not add 0.5 to the X and Z coordinate when calling net.minecraft.entity.Entity.setLocationAndAngles(double, double, double, float, float).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: