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

Bad performance of targetSelector of agressive mob AI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, 1.16.2, 21w08b, 21w19a
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
    • Confirmation Status:
      Community Consensus
    • Category:
      Performance
    • Mojang Priority:
      Important

      Description

      The bug

      On my server, I must set doMobSpawning to false because AI of aggressive mob take all resources!
      If I add datapack to remove AI on zombie, that's skeleton AI which take all resources.
      And if I add datapack to remove AI on skeleton too, that's creeper AI which take all resources, etc.

      [06] |   |   |   |   |   |   tick - 99.34%/91.47%
      [07] |   |   |   |   |   |   |   minecraft:zombie - 89.92%/82.25%
      [08] |   |   |   |   |   |   |   |   ai - 98.83%/81.29%
      [09] |   |   |   |   |   |   |   |   |   newAi - 99.97%/81.27%
      [10] |   |   |   |   |   |   |   |   |   |   targetSelector - 98.83%/80.32%
      [11] |   |   |   |   |   |   |   |   |   |   |   goalSetup - 99.96%/80.29%
      [12] |   |   |   |   |   |   |   |   |   |   |   |   canSee - 99.81%/80.14%
      [12] |   |   |   |   |   |   |   |   |   |   |   |   unspecified - 0.19%/0.15%
      [11] |   |   |   |   |   |   |   |   |   |   |   unspecified - 0.04%/0.03%
      [11] |   |   |   |   |   |   |   |   |   |   |   goalTick - 0.00%/0.00%
      ...
      

      With two players that's ok. But with four that start to lag, and with 10 players, the server crashes because tick too long with max-tick-time to 60 secondes (max-tick-time=60000).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jewome62 Desjardins Jérôme
              Votes:
              12 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: