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

Projectiles visually update slowly when their motion is changed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w37a
    • 24w36a
    • None
    • Confirmed
    • Commands, Networking, Projectiles
    • Important
    • Platform

      When a projectile that also displays a direction such as an arrow or a trident has its Motion changed, it will visually continue to advance in its old trajectory in a chaotic manner.

      In the attached video I am using a datapack that changes arrows Motion so that they follow already landed arrows, their behavior has not changed since 24w35a. but visually they continue to follow their old trajectory for a few seconds.

      Video example: https://youtu.be/-czvnLJv1do?si=1nQcCMhHf0kDCp2w, es_reproducing.mp4
      (The sky is not glitched, there's just a lot of glass)

      Only projectiles that display their direction seem to be affected, so arrows, tridents and wither skulls. While snowballs, ender_pearls, or wind charges are not affected.

      The delay in the visual update is not tied to any command, it instead appears to be universal, it does not matter if i use data modify, data merge, or if the arrow is hit with a wind charge in mid air, the correct motion will only be displayed after one second.

      TNT explosions update the arrows visual motion correctly.

      Steps to reproduce

      1. Join any world in 24w36a with cheats enabled.
      2. Using a bow and an arrow, fire in any direction.
      3. While the arrow is in the air, use the following command in the chat or with a command block:
        /data merge entity @n[type=minecraft:arrow] {Motion:[0.0d,1.0d,0.0d]}

        alternatively use the command:

        /data modify entity @n[type=minecraft:arrow] Motion set value [0.0d,1.0d,0.0d]

      Observed behavior

      The arrow flies its old trajectory for about a second, after which it teleports to its true location, sometimes the arrow teleports to its true location but does not display the correct Motion, so it remains out of sync with its true position for another second or more before teleporting again. If the arrow visually lands before correcting its position to its true location, it produces no sound when hitting the ground.

      Expected behavior

      The arrow immediately follows its new trajectory, displaying its position and motion correctly.

      By placing a repeating command block on the ground and activating it after inserting the following command:

      execute as @e[type=minecraft:arrow] at @s run particle minecraft:electric_spark ^ ^ ^ 0 0 0 0 0 force @a

      It is possible to see the true location of the arrow while the previous steps are being performed.

        1. link to video-1.txt
          0.0 kB
          PALKIP
        2. es_reproducing.mp4
          6.88 MB
          PALKIP

            HugoHagglund [Mojang] SHugoh
            PALKIP PALKIP
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: