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

The order in which tile entities get processed changes after reloading



    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.2, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08b, 1.14.4, 19w37a, 1.15 Pre-release 1, 1.15.1, 1.15.2 Pre-Release 1, 1.16.2 Release Candidate 1, 1.16.2
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Community Consensus
    • Category:


      When reloading an area the order in which the present tile entities get processed may change.

      In cases where players rely on the order, this might lead to unexpected behaviour.

      There are currently two known examples for this:

      1. Blocks moved by pistons
      2. Hoppers



      The the easiest way to reproduce it is by checking the order with command blocks.
      In the case of hoppers, this can be done by reading the inventory of several hopper clocks with a comparator.

      For pistons moving redstone blocks works well.

      mc-143979.nbt contains a a build to test for both cases.
      The order will be printed in chat by the command blocks.

      The case of hoppers is tested by a row of hopper clocks, which should all be in order after pasting the build, due to the order the blocks are placed by structure blocks.
      When turning the levers on top of the hoppers the command blocks should output in an order from 1 to 6.
      After reloading the world this order might (or might not) change. If it changes seems to be dependent on a number of factors, such as the position of the build and the position of other tile entities in the world.

      To test it for pistons, a piston needs to be triggered and in a really short period afterwards the world needs to be unloaded.
      It can be a bit tricky to get the timing right in this case, but again the order can completely change.

      Sometimes the position needs to be changed a few times before it works, or a few other tile entities need to be placed.

      Video of both cases: https://youtu.be/8A9RPLdmzBU


      There are two suspected causes:

      1. Depending on the order in which chunks load, tile entities in different chunks may change order.
      2. The order in which tile entities are saved seems to be dependent on a hashing order, therefore tile entities inside the same chunk also may get mixed.

      Related Issues: MC-8457, MC-96709 and MC-89146


          Issue Links



              Unassigned Unassigned
              panda4994 [Mojang] Panda
              9 Vote for this issue
              5 Start watching this issue