mojira.dev
MC-139548

Projectiles are rendered incorrectly if their Motion tag was recently changed

The bug

NOTE: This is not a duplicate of MC-124197 or any bugs listed within. This is new as of the 1.14 snapshots. It didn't occur in 1.13.2.

It affects all projectile entities (e.g. arrows, fireballs, potions, enderpearls, snowballs, eggs, etc.) but not other entities such as tnt or mobs. Every ~20 ticks it updates the position to where it's supposed to be, and if the entity changes state (such as an arrow's inGround tag becoming true) it updates immediately. It also affects other entities properly even while not being rendered in the correct location. For the Power[0,1,2] data, the projectile renders with a trajectory that curves towards the negative X, Y, and Z directions but actually travels and impacts as it should.

A video's worth a thousand pictures, so here's a video showing the bug in action

[media]

In case you need more details, this is using a convoluted raycasting system I set up. The projectiles are being fired in the direction of an invisible armorstand summoned 0.1 blocks in front of the player by setting the Motion or Power tags equal to the difference between the coordinates of the armorstand and the player, stored as a scoreboard value, via /data merge. When I summon them regularly with a /summon command such as /summon minecraft:fireball ~ ~ ~ {direction:[0.0,0.0,0.0],power:[0.123,-0.123,0.246]} they render just fine. As far as I can tell, it only occurs with /data merge. I'm not sure if it only affects /data merge with the "from" argument, or all /data merge commands.

How to reproduce

  1. Enter the following commands into active repeating command blocks:

    /summon snowball ~ ~1 ~ {Motion:[1.0,1.0,0.0]}
    /execute as @e[type=snowball,tag=!edited] run data merge entity @s {Motion:[0.0,1.0,1.0],Tags:[edited]}

    → ❌ The newest snowballs appear to travel the wrong direction

Linked issues

Attachments

Comments 9

If this is only observed using NBT-modifying commands, the precedent is "Won't Fix/Working as Intended" as per @unknown's comment here: https://bugs.mojang.com/browse/MC-66943?focusedCommentId=188032#comment-188032

TheRedstoneBlaze

I would hope that this precedent can be excepted here, because otherwise this means in 1.14 and on it will be impossible to launch a projectile on the player's look vector

Please comment if you can reproduce a desync without using NBT commands

Is this still an issues in latest releases?

Arrows seem to have been fixed, but snowballs, eggs, etc. are still affected.

Per the duplicate, "dragon fireball, egg, ender pearl, experience bottle, experience orb, eye of ender, falling block, fireball, item, llama spit (which is even stranger), potion, [and] small fireball", note items aren't projectiles.

Affects 24w14a. Highly related to MC-80142, and these issues combined are likely the cause of the initial stuttering these projecties experience shortly after creation. Also, this issue can be observed when a wind charge explosion changes the velocity of a nearby projectile.

I can confirm this still exists in version 1.21.3, but NOT in 1.21.1. The projectile after data modification will still follow its intended path and collide with anything along it, but it appears to go straight down. I've tested this with arrows, snowballs, eggs, and tridents, and they all suffer from this bug.

I am unable to reproduce in 1.21.8

TheRedstoneBlaze

(Unassigned)

Confirmed

Platform

Normal

Commands, Projectiles

Minecraft 18w45a, Minecraft 18w46a, 1.20.1, 23w33a, 24w14a, 1.21, 1.21.2 Pre-Release 3, 1.21.3

Retrieved