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

Spawning collision checks are done before calling onInitialSpawn making it impossible for baby mobs to spawn in smaller spaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.13.2, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The bug

      The method net.minecraft.world.WorldEntitySpawner.findChunksForSpawning(WorldServer, boolean, boolean, boolean) which spawns mobs in the world and the method net.minecraft.tileentity.MobSpawnerBaseLogic.updateSpawner() which spawns a mob for a mob spawner call the method net.minecraft.entity.EntityLiving.isNotColliding() before calling the method net.minecraft.entity.EntityLiving.onInitialSpawn(DifficultyInstance, IEntityLivingData), which can make a mob be a baby. This makes it impossible for baby mobs to spawn in smaller spaces.

      How to reproduce

      1. Create a Superflat world with the following preset
        minecraft:stone,minecraft:air,minecraft:glass;minecraft:plains;
        
      2. Set the time to night
        /time set 14000
        
      3. Use the /say command to list all zombies
        /say @e[type=zombie]
        

        → It won't find any zombies even though baby zombies would have enough space to spawn

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                CHK: