Mojira Archive
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"}
    
  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}]}
    
  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.

Fixed

Marcono1234

2017-06-22, 06:14 PM

2024-06-29, 05:14 PM

2024-02-27, 11:29 AM

7

5

Confirmed

Projectiles

CustomPotionEffects, effect, inGround, tipped_arrow

Minecraft 1.12 - 24w06aMinecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.13.1-pre1, Minecraft 1.13.1, 1.14.4, 19w37a, 20w46a, 21w03a, 21w05b, 21w06a, 21w40a, 1.20.4, 24w06a

24w09a