Projectile protection has no effect on wither skulls, unlike ghast fireballs
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).
Created Issue:
Projectile protection has no effect on wither skulls, unlike ghast fireballs
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).
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).
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).
relates to
relates to
After thoroughly testing and looking at the vanilla behavior files, I can say that the randomness in wither skull damage is indeed due to randomness in how close the center of their explosion is to the player. If you remove all randomness from their trajectory with a behavior pack then they always do the same amount of damage. Also, if you set them to be summonable and summon them on yourself, the damage amount is always the same.
However, wither skulls should always do 8 projectile damage (4 hearts) to mobs they hit directly in vanilla, and then only do explosion damage to mobs nearby the point of impact, as in Java Edition (MC-178576). The reason they do not deal the stable projectile damage is that the projectile component in wither_skull.json and wither_skull_dangerous.json has no impact_damage section within the on_hit parameter. Compare this to the small_fireball.json, which correctly gives blaze fireballs 5 projectile damage.
Ghast fireballs have the same bug, which I have reported at MCPE-153740.
Cannot reproduce in 1.16.2 Pre-release 1.
Appears to have been fixed in 20w22a, likely as a side effect of fixing
MC-178441.