mojira.dev
MC-118890

Tipped arrows stuck in the ground never lose their effect

The bug

Tipped arrows are supposed to lose their effect after they were in the ground for 30 seconds. This however only applies if the arrow has custom potion effects (CustomPotionEffects tag).

How to reproduce

  1. Give yourself an arrow with a default potion effect

    /give @p tipped_arrow{Potion:"leaping"}
    /give @p tipped_arrow{Potion:"leaping"}
  2. Shoot it and wait
    → ❌ It will be removed at some point but did not lose its potion effect

  3. Give yourself an arrow with a custom potion effect

    /give @p tipped_arrow{CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:1200}]}
    /give @p tipped_arrow{CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:1200}]}
  4. Shoot it and wait
    → ✔ The arrow loses its potion effect after 30 seconds

Code analysis

Based on 1.12 decompiled using MCP 9.40 PRE 1

The method net.minecraft.entity.projectile.EntityTippedArrow.onUpdate() only checks if the custom potion effects are not empty when trying to remove the effects, instead it should probably test if the arrow has a potion or custom potion effects.

Linked issues

Comments 8

Can confirm for MC 1.12.1.

Confirmed for 1.13.1-pre1

Can confirm in 21w03a.

Can confirm in 21w05b.

Can confirm in 21w06a.

Can confirm in 21w40a.

Can confirm in 1.20.4

marcono1234

(Unassigned)

Confirmed

Projectiles

CustomPotionEffects, effect, inGround, tipped_arrow

Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.13.1-pre1, Minecraft 1.13.1, ..., 21w05b, 21w06a, 21w40a, 1.20.4, 24w06a

24w09a

Retrieved