mojira.dev
MC-80142

The acceleration of wither skulls, small/dragon fireballs and wind charges is not synced correctly, leading to stuttering during flight

The bug

Wither skulls and small/dragon fireballs will stutter during flight if their acceleration_power tag does is neither 0 nor 0.1. Wind charges will do this as well, but this is less of an issue since they do not experience drag so a power of magnitude 0 is sufficient for most applications.

/summon minecraft:wither_skull ~ ~2 ~ {Motion:[0.0,0.0,0.5],acceleration_power:0.3}

Details

The client assumes that wither skulls, wind charges and small/dragon fireballs have an acceleration_power of 0.1 when calculating their acceleration, while on the server the value is stored properly. The only exception to this is when it is 0, in which case the entity behaves properly according it its Motion; I assume the acceleration calculation is either being skipped or doing nothing (as in Unity when Transform.LookAt receives the executor) in this case. The game will re-sync the entity's position every second or so, creating jerky movement for any affected entity whose acceleration_power is not equal to 0 or 0.1.

Due to this bug, for a summoned projectile of this type to move smoothly it must be summoned with an acceleration_power of either:

  • 0, in which case it will experience drag (unless it is a wind charge) but can be redirected easily by modifying its Motion tag (although the client will not receive this update until the next sync, which could be up to 1 second away, due to MC-139548).

  • 0.1, in which case it will quickly accelerate/decelerate (depending on its Motion) to its (fixed) terminal velocity and can only redirected buglessly by having its power modified and then being reloaded.

Thoughts on a fix

It seems likely that when blaze fireballs were added to the game, they experienced drag, and that instead of disabling this drag whoever implemented them decided to add an acceleration field that would counteract it. This seems like a rather lazy solution, and I'm not surprised that its implementation is imperfect. A proper fix would get rid of the drag these projectiles naturally experience and do away with the acceleration_power field; any in-flight trajectory changes can be accomplished through direct modification of the Motion tag, and should be communicated to the client immediately, as they are when a player punches a ghast fireball. (If special handling for certain cases of /data is problematic, proper redirection could be implemented via the long-requested /motion or /impulse command instead.)

Linked issues

Comments 20

Please post your suggestions on reddit.

Confirmed for

  • 1.8.4

WitherSkulls and SmallFireballs with a direction tag like *direction:[0.5,0.0,0.0]* move very raggedly.

I don't know what you mean by "blue wither skulls".

Example command

/summon WitherSkull ~ ~2 ~ {direction:[0.0,0.0,0.5]}

The wither can shoot two kinds of wither skulls- fast moving black ones and slow moving blue ones. The black ones cannot break cobblestone or harder blocks, while blue ones can.

Oh didn't knew that
However can you please add SmallFireballs as well in your text because they are also affected by the raggedly movement

Could you please change this report to "SmallFireballs and WitherSkulls move ragedly when summoned"? I put the fact that these blue WitherSkulls exist but can't be detected in MC-81656

Note: This does not affect Fireballs

10 more comments

Affects 22w07a. Here are some commands which use power instead of direction:

/summon minecraft:small_fireball ~ ~2 ~ {power:[0.2d,0d,0d]}
/summon minecraft:wither_skull ~ ~2 ~ {power:[0.2d,0d,0d]}

Notice how changing 0.2 to 0.1 will fix the movement as per the above comment.

This was not fixed in 24w14a; only certain cases of wind charge stuttering (primarily covered by other tickets) were fixed. This ticket covers the stuttering that these projectiles experience one second after creation during normal gameplay, as well as stuttering that can only be reproduced through commands.

Can confirm not fixed in 24w14a.

Can confirm in 26.1 snapshot 4

clamlol

FiskFille

Confirmed

Platform

Low

Entities, Projectiles

command, dragon_fireball, small_fireball, wind_charge, wither_skull

Minecraft 1.8.4, Minecraft 16w36a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, , 1.21 Pre-Release 4, 24w37a, 1.21.4, 1.21.7, 1.21.9 Pre-Release 1

24w14a

Retrieved