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

Pillagers in outposts inconsistently spawn at one block light level higher than other mobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3, 1.14.4, 19w34a, 19w35a, 19w36a, 1.15 Pre-release 1, 1.15 Pre-release 7, 1.15, 1.15.2, 20w18a, 20w22a, 1.16.1, 1.16.2 Release Candidate 1, 1.16.3, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 21w15a, 1.17, 1.17.1 Release Candidate 1, 1.17.1
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Mob spawning

      Description

      The bug

      Both mobs and pillagers from outposts spawning is affected by block light level, but pillagers from outposts spawn at block light levels 8 or less instead of 7 or less.

      How to reproduce

      1. Use the seed 7703073064123265302 and run the following commands:
        1. Teleports to pillager outpost.
          /tp @p 1175 65 855
          
        2. Sets the world border to restrict spawning area.
          /worldborder set 63
          
        3. Centers the world border.
          /worldborder center 1175.5 855.5
          
        4. Removes terrain.
          /fill 1144 85 824 1206 64 846 air
          
        5. Removes more terrain.
          /fill 1206 72 847 1144 64 886 air
          
        6. Places platform for pillagers and mobs to spawn on.
          /fill 1206 64 824 1144 64 886 polished_blackstone
          
        7. Sets block light level to 7.
          /fill 1206 73 824 1144 73 886 minecraft:shroomlight
          
        8. Clears pillagers and mobs. 
          /kill @e[type=!minecraft:player]
          

           Notice that both pillagers and other mobs are spawning, as the light level is 7.

      2. Sets block light level to 8.
        1. /fill 1206 72 824 1144 72 886 minecraft:shroomlight
          
        2. Clears pillagers and mobs.
          /kill @e[type=!minecraft:player]
          

           Notice that even though the light level is 8, pillagers are still spawning.

      3. Sets block light level to 9.
        1. /fill 1206 71 824 1144 71 886 minecraft:shroomlight
          
        2. Clears pillagers.
          /kill @e[type=!minecraft:player]
          

           Notice that nothing spawns, as the light level is 9.

      Code analysis

      1.16.2-rc1, Mojang names

      net.minecraft.world.entity.monster.PatrollingMonster.checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster>, LevelAccessor, MobSpawnType, BlockPos, Random) allows light level <= 8.
      net.minecraft.world.entity.monster.Monster.isDarkEnoughToSpawn(ServerLevelAccessor, BlockPos, Random) allows light level <= Random.nextInt(8) which is 0-7 (both inclusive).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gaspoweredpick [Helper] gaspoweredpick
            Votes:
            10 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: