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

Zombies of village siege spawn more likely in negative direction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.11.2, 22w18a
    • Confirmed

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The bug

      Zombies of a village siege spawn more likely in negative X and Z direction. This is probably difficult or impossible to notice in-game but can be seen when looking at the code.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.village.VillageSiege.findRandomSpawnPos(BlockPos) uses nextInt(16) - 8 as horizontal offset and nextInt(6) - 3 as vertical offset. The problem is that this produces numbers from -8 to 7 (both inclusive) respectively -3 to 2 (both inclusive).

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: