Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6442

Snowballs do not mutate Fireball velocity

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • not applicable

    • 3054-Spigot-4225eac-f3ed1ac (MC: 1.16.5)
    • none
    • Yes

    Description

      Throwing a snowball at a stationary fireball does not modify the fireballs velocity.
      This does not match the vanilla behaviour, under which the fireball begins to move in the direction the snowball was flying.

      Steps to reproduce

      1. Summon a stationary fireball using
        /summon minecraft:fireball
      2. Throw a snowball at the stationary fireball
      3. Observe the fireball still being stationary

      Potential cause

      EntityFireball#damageEntity calls CraftEventFactory.handleNonLivingEntityDamageEvent(Entity,DamageSource,double) which defaults the cancelOnZeroDamage parameter to true.
      As snowballs do not deal any damage to the fireball, the event is auto cancelled and the fireball is never damaged. This prevents the velocity mutation.

      As this seems to be done intentionally (see comment above handleNonLivingEntityDamageEvent), I don't think I can implement a fix myself.

      Attachments

        Activity

          People

            Unassigned Unassigned
            LynxPlay Bjarne Koll
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: