-
Bug
-
Resolution: Won't Fix
-
None
-
1.19.2
-
None
-
Confirmed
-
Statistics
When an effect is applied (eg by a tipped arrow) commands can detect the effect with the full duration on mobs, but for players, the duration has already decreased one tick.
Steps to reproduce:
- Run the following commands:
/give @s bow /give @s tipped_arrow{CustomPotionEffects:[{Id:27,Duration:5,Amplifier:0b}]} 10 /setblock ~ ~ ~1 repeating_command_block[facing=south]{auto:1b,Command:'execute as @e[nbt={ActiveEffects:[{Id:27}]}] run tellraw @p {"nbt":"ActiveEffects[{Id:27}].Duration","entity":"@s"}'} /setblock ~ ~ ~2 chain_command_block[facing=south]{auto:1b,Command:'effect clear @e unluck'}
- Shoot a mob
- it returns "5" in chat
- Shoot a player (eg yourself)
- it returns "4" in chat, meaning that the duration has already decreased
This is problematic for 2 instances:
- A duration of 1 tick can be detected on mobs, but not players.
- If the duration is set to a specific value (eg to the score of a shooter), it will not return the correct value.