The bug
When a player/mob gets hit by an arrow with the damage:0.0d
tag, the arrow doesn't apply its CustomPotionEffects
to that player/mob.
Steps to reproduce
Summon an arrow with a damage of 0.0d above an entity/player
/summon minecraft:arrow ~ ~2.3 ~ {damage:0.0d,CustomPotionEffects:[{Id:20,Amplifier:0,Duration:20}]}
→ The arrow won't apply the
minecraft:wither
level 1 effect for 20 ticks.Summon an arrow with a damage of 1.0d above the entity/player
/summon minecraft:arrow ~ ~2.3 ~ {damage:1.0d,CustomPotionEffects:[{Id:20,Amplifier:0,Duration:20}]}
→ The arrow will apply the
minecraft:wither
level 1 effect for 20 ticks.
Code analysis
EntityTippedArrow.arrowHit(entitylivingbase)
is called from EntityArrow.onHit(raytraceresult)
only if the entity is attacked.
Can confirm for 1.13-pre4.