Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-163845

Allays generate severe lag when pathfinding

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.40
    • None
    • Unconfirmed
    • iOS

      Allays can attempt to pathfind to players and their corresponding items even when it is impossible to actually get there, which generates severe lag that affects (at least) entities, block-breaking particle effects, and redstone. Some other functions such as opening chests or the player inventory and walking seem to be unaffected; additionally, allays do not generate that lag when passively wandering around to nearby (accessible) locations within their cage.

      I reproduced this in both 1.19.31 on an iPad, 1.19.40 on an iPhone, and 1.19.40 on an iPad (the last of the three is where my example video was taken). This bug did not affect 1.19.21 unless I severely misremember, though I have no devices still on that version to provide a video showing so.

      Steps to Reproduce:
      (Skip steps 1-3 if using BugExample.mcworld; and all following steps up to 12 are shown in the attached video. Apologies for any minor compression artifacts from getting the video below the file size limit.)
      1. Create a new creative world
      2. Fill a hollow box out of solid blocks
      3. Summon a decent amount of allays, say, 50+, and give each of them the same item
      4. While standing away from the box, throw an item not held by the allays onto the ground.
      5. Move close to the allay box and throw an item not held by the allays onto the ground.
      6. While standing close to the allay box, throw the item held by the allays onto the ground.
      7. Throw an item not held by the allays onto the ground.
      8. Summon a chicken.
      9. Pick up the allay item that was thrown onto the ground, and observe the chicken.
      10. Throw the item held by the allays back onto the ground, and observe the chicken.
      11. Pick up the items, and move out of the allays' simulation distance, but still in render distance of the box.
      12. Throw the allays' item onto the ground and pick it up.

      Steps not covered in the video:
      While near the allay box, throw their held type of item onto the ground. Break a few blocks, place and try to open a chest, and create a redstone clock formed by a loop of one torch, two 1-tick repeaters, and some redstone dust.

      Expected results:
      The movement of entities like chickens will not depend on whether the type of item held by the allays is thrown onto the ground or picked up.
      All item entities will fall smoothly and be picked up reasonably quickly like the items in steps 5 and 12.
      The player's inventory can be opened reasonably quickly and the player can move smoothly.

      The blocks will break and create particles immediately, the chest will open quickly, and one redstone tick will be roughly 0.1 seconds long (so changes in the components' redstone power state will propagate to the next component roughly 0.1 seconds later).

      Actual results:
      The chicken can move while the allays are not attempting to pathfind to their item, but while the type of item held by the allays is thrown onto the ground, the chicken barely moves.
      (Incidentally, allays also slow down just like other entities at those times, although my listed steps encase them in solid blocks rather than glass so it is not visible in the video. This is why near my video's step 5, even after moving next to the allays, the lag persisted for a bit while the allays slowly finished trying to get near the player.)

      The items in steps 4 and 7, which are thrown by the player while the allays are attempting to pathfind to the inaccessible player or to an inaccessible item, respectively, fall very slowly and take awhile to be picked up.

      The player's inventory and motions are unaffected and still function as expected.

      Blocks appear to be broken at the usual speed in creative mode, but their particles are delayed.
      The chest's inventory can be pulled up and closed at the expected speed.
      The components of the redstone clock have a visually noticeable delay between the changes in state of one component and the next. One redstone tick takes over 0.6 seconds on the device the video had been recorded on.

            ROBOTRON31415 ROBOTRON
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: