mojira.dev
MC-80142

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

Brief note

As of 24w19b the command to repro is:

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

I will update the rest of this description later.

The bug

Wither skulls and small/dragon fireballs will stutter during flight if their power tag does not have a magnitude of either 0 or 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],power:[0.2d,0d,0d]}

Details

The client assumes that wither skulls, wind charges and small/dragon fireballs have a power of magnitude 0.1 when calculating their acceleration, while on the server the value is stored properly. The only exception to this is when the magnitude 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 power magnitude is not equal to 0 or 0.1.

Reloading the projectile will update power's direction on the client (if it has been modified with /data), but its magnitude will still be interpreted as 0.1 (unless it is 0). I imagine (and would hope that) any fix to the previous paragraph would fix this as well, although if not the devs are within their rights to call it WF and make me sad.

So to summarize, due to this bug, for a summoned projectile of this type to move smoothly it must be summoned with a power magnitude 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 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.

Related issues

Comments

Tan Chin Cheern

Please post your suggestions on reddit.

marcono1234

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]}
jimbo

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.

marcono1234

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

marcono1234

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

bob

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

Sonicwave

Confirmed for 1.12 (and 1.12.2), also affects dragon fireballs.

Sonicwave

This seems related to MC-65312, if not the same issue.

Sonicwave

Confirmed for 18w05a.

Kraif

Confirmed for 1.13.1.

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w05b.

clamlol

This might be WAI as per Searge's comment on MC-80807, although I really do hope Mojang revisits this issue to make all summoned projectiles which ignore gravity have customizable velocity, drag and acceleration (or at least experience these properties in an intuitive and predictable way).

clamlol

Also, affects 1.17.1.

clamlol

A few more notes on this:

  • The example commands should be updated to use Motion instead of direction since that tag was removed some time ago.

  • From what I'm able to tell, the client assumes all non-Ghast fireballs (including both types of wither skulls) have a power of magnitude 0.1 when calculating their acceleration, while on the server the value is stored properly. (If the magnitude is 0, the entity behaves properly according it its Motion, so 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 power magnitude is not equal to 0 or 0.1.

  • Reloading the projectile will update power's direction on the client (if it has been modified with /data), but its magnitude will still be interpreted as 0.1 (unless it is 0). I imagine (and would hope that) any fix to bullet point 2 would fix this as well, although if not the devs are within their rights to call it WF and make me sad.

So to summarize, due to this bug, for a summoned non-Ghast fireball to move smoothly it must be summoned with a power magnitude of either:

  • 0, in which case it will experience drag but can be redirected easily by modifying its Motion tag.

  • 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.

clamlol

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.

clamlol

Affects 22w14a.

clamlol

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.

ampolive

Can confirm not fixed in 24w14a.

jimbo

clamlol

(Unassigned)

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.20.5 Pre-Release 4, 24w19b, 1.21 Pre-Release 4, 24w37a, 1.21.4

24w14a

Retrieved