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

Power tag for wither skulls, small/dragon fireballs and wind charges is not synced correctly, leading to stuttering during flight

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • 24w14a
    • Minecraft 1.8.4, Minecraft 16w36a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.2, Minecraft 18w02a, Minecraft 18w05a, Minecraft 18w11a, Minecraft 18w21a, Minecraft 1.13-pre1, Minecraft 1.13.1, 1.15.2, 20w51a, 21w05b, 1.17.1, 22w07a, 1.18.2, 22w14a, 22w15a, 22w16b, 22w17a, 22w18a, 22w19a, 1.19 Pre-release 1, 1.19 Pre-release 2, 1.19 Pre-release 4, 1.19 Pre-release 5, 1.19 Release Candidate 2, 1.19, 22w24a, 1.19.1 Pre-release 1, 1.19.1, 1.19.2, 22w42a, 22w43a, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2, 1.19.4, 23w12a, 23w17a, 23w18a, 1.20 Pre-release 1, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 1, 1.20.2 Pre-release 2, 23w40a, 23w41a, 23w42a, 23w43a, 23w44a, 23w45a, 1.20.3 Release Candidate 1, 24w11a, 24w12a, 24w14a, 1.20.5 Pre-Release 4
    • Confirmed
    • Entities, Projectiles
    • Low
    • Platform

      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.

            Unassigned Unassigned
            clamlol clam lol
            Votes:
            18 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              CHK: