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

Projectile protection has no effect on wither skulls, unlike ghast fireballs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.15.2, 20w15a
    • Fix Version/s: 20w22a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Projectiles

      Description

      The direct impact damage from Wither skulls is not reduced by the Projectile Protection enchantment, unlike damage from Ghast/Blaze fireballs. This may be intentional, but it's inconsistent with ghast fireballs at least.

      To reproduce

      This is most easily reproduced in a world with no nearby mobs and mob spawning disabled.

      • Give yourself two leather helmets, leggings and boots; enchant one set with Projectile Protection IV and leave the other unenchanted
      • Set a repeating command block that clears the Wither effect from the player
      • Set /gamerule naturalRegeneration false and change to Hard difficulty and Survival mode
      • Summon a wither with the following command:
         /summon wither ~ ~ ~ {Attributes:[{Name:generic.follow_range,Base:0}]}
        
        • The wither still attacks, but will stay in place and not chase you, making it easier to get away from it.
      • Approach the wither and get hit by one of its skulls while wearing the unenchanted armor, heal yourself to full health and repeat the same with the enchanted armor.
      • Spawn a ghast and repeat the same.

      Notice how the Projectile Protection armor significantly reduces damage from the ghast, but not the wither.

      Code analysis

      This is likely because in net.minecraft.world.entity.projectile.WitherSkull.onHitEntity(), the damage source passed to the target entity doesn't call setProjectile() (like ghast/blaze fireballs and arrows do).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Sonicwave [Mod] Sonicwave
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: