mojira.dev
MCPE-227423

Ender pearl being propelled by multiple wind charges exploding on the same tick receives random velocity.

An ender pearl within the explosion of several stacked wind charges may receive anywhere between almost no velocity from the explosion, to the expected velocity from the explosion. This happens even when the wind charges explode on the same tick.

Steps to reproduce

  1. Summon multiple wind charges at the same position.

  2. Teleport an ender pearl to within the wind charge explosion radius, and on the next tick summon a chicken on the wind charges to blow them up on the same tick.

  3. Wait for the ender pearl to land, and mark this position.

  4. Repeat.

Expected results

The ender pearl gets the same velocity every single time. Furthermore, the velocity from the explosion appears to be reasonable given the number of wind charges.

Observed results

The ender pearl gains a random amount of velocity, ranging from the velocity that would be gained from one or two wind charges, to around what would be expected if all the wind charges acted on the pearl.

Possible explanation

This seems to resemble the behaviour caused by the following process:

  1. During a single gametick, entities are ticked in a random order:

    1. If a wind charge is ticked and the ender pearl is nearby, the ender pearl accumulates velocity from the explosion.

    2. If the ender pearl is ticked, its position is incremented by its velocity.

There are three cases to consider:

  1. The ender pearl is ticked before the wind charges explode.

    • The ender pearl initially has no velocity, and goes nowhere.

    • The wind charges are ticked next, and the ender pearl accumulates the velocity from all wind charges as expected.

  2. The ender pearl is ticked at a random point during the explosion.

    • Some of the wind charges have exploded, so the pearl has an unknown velocity.

    • The ender pearl has some accumulated velocity from the explosion. The ender pearl’s position is incremented by its velocity.

    • Depending on where the ender pearl is now, it may:

      • lie within the explosion radius (but further from the origin), in which case any remaining wind charges have less effect on the pearl’s velocity; or

      • lie outside the explosion radius, in which case any remaining wind charges have no effect on the pearl’s velocity.

  3. The ender pearl is ticked after the explosion.

    • The ender pearl has accumulated the velocity from all wind charges as expected.

    • Since the ender pearl has accumulated velocity, it steps forwards a large amount.

Cases 1 and 3 result in the ender pearl gaining the expected velocity from the explosion. Additionally, in case 1, the ender pearl’s trajectory after the explosion is effectively delayed by one tick.

Case 2 results in the ender pearl gaining a random amount of velocity. As shown in the video, it is possible for the pearl to gain almost no velocity from a very powerful explosion, which is unexpected behavior.

It should be noted that not all entities are affected by this bug. Arrows summoned by command blocks do not seem to be affected, nor are players or mobs.

Attachments

Comments 1

For whatever reason TNT doesn’t have this issue.

StrawberryJam

(Unassigned)

Unconfirmed

Multiple

Windows 11

1.21.100

Retrieved