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

Mobs that die outside the simulation distance continue to count towards mob caps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.6, 1.21, 24w35a
    • None
    • Community Consensus
    • Entities
    • Important
    • Platform

      The bug

      When a mob outside the player's simulation distance dies, it continues to count towards its mob cap until the player moves closer to it where it died. This makes it very difficult to use commands to enable animals to spawn naturally, since running /kill @e[type=!player] won't actually reset all mob counts to zero.

      How to reproduce

      1. Create a new world:
        • World Type: Superflat
        • Generated Structures: OFF
        • "Spawn mobs" game rule: OFF
        • "Spawn chunk radius" game rule: 0
      2. Set your simulation distance to 5 chunks, and ensure your render distance is higher than that
      3. Spawn a cow
        The creature count is 1 ("C: 1" on the fourth-bottom line of the debug screen)
      4. Teleport 100 blocks away:
        /tp ~ ~ ~100
      5. Kill the cow:
        /kill @e[type=cow]

        → The command succeeds, but the cow is still visible

      6. Verify that the cow is actually dead:
        /execute if entity @e[type=cow]

        Test failed

      7. Check the creature count
        The creature count is still 1
      8. Walk towards the cow
        → The cow's death animation plays
        The creature count is now 0

            Unassigned Unassigned
            Darth Cobby [Mod] j_p_smith
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: