mojira.dev
MCPE-244735

Projectile update order is inconsistent

The order that projectiles move in is inconsistent; it is neither truly random, consistent with update order, nor is it predictable. It also varies across sessions and instances of Minecraft.

Steps to reproduce

Download the world attached to this bug report. It contains a setup capable of testing projectile update order. The world contains behaviour packs to modify the velocities of projectiles and visualise projectile hit events, which can be used to infer update order. Press the button labelled “subscribe to projectile hit events” to receive the events in chat.

Example experiment

Follow these steps in the exact order they are listed:

  1. At the red side of the collider, summon an arrow.

  2. At the blue side, summon a wind charge.

  3. Press the button labelled “collide projectiles”.

  4. Take note of the projectile-entity collision that occurred, if any did.

  5. Repeat this experiment multiple times.

How to interpret results

Projectiles currently update in sequence. Thus, the first projectile to update will collide with the other projectile if this interaction exists. Else, it will just smash into the wall and get destroyed immediately, leaving nothing for the other projectile to hit except the wall. Alternatively, the locations of the projectile entity hits (if any) may be used to determine the update order of projectiles if either one can hit the other. You are strongly advised to not rely on the order of the events printed in chat.

In the case of the example experiment, only the arrow → wind charge hit can occur. Thus, whether or not a projectile entity hit event occurs can be used to infer the order the projectiles updated in:

  • If the arrow collided with the wind charge, the arrow must have updated first.
    Proof: For sake of contradiction, assume that the wind charge updated first and that the arrow collided with the wind charge. Then, as wind charges do not collide with arrows they move into, the wind charge will smash directly into the opposite wall. When the arrow updates next, the wind charge will be gone, so the arrow cannot hit it anymore, which is a contradiction. Therefore, the arrow must have updated first.

  • If no collision event occurred, the wind charge must have updated first.
    Proof: For sake of contradiction, assume that the arrow updated first and that no collision event occurred. When the arrow moves, the wind charge will not have moved yet and therefore will still be in the way of the arrow. The arrow will therefore hit the wind charge, which is a contradiction. Therefore, the wind charge must have updated first.

You are encouraged to try different projectiles or creation orders in this experiment. This experiment will work as long as the projectiles can interact.

Expected outcome

Either one of these behaviours is always observed across all instances of Minecraft:

  1. The update order of projectiles is the same as the order the actors were created in the world; or

  2. Projectiles update in creation order within groups of entity type, and the entity types update in an order that never changes.

Actual outcome

The projectiles do not seem to follow any consistent update order. Projectiles may:

  • update in creation order even across different projectile types;

  • update within groups of entity type, and these groups are sometimes not updated in a constant order;

  • update in a seemingly random order; or

  • appear to update in an alternating order, though the mechanism for this alternation is unclear.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media]

StrawberryJam

(Unassigned)

Unconfirmed

Windows

Windows 11

26.65 Hotfix

Retrieved