The bug
The advancement trigger for "effects_changed" seems to activate inconsistently when used in a custom advancement. "instant_damage", "instant_health", and "saturation" don't seem to trigger the advancement whenever the player:
drinks a potion
uses a splash potion
uses a lingering potion
(However, the advancement DOES get triggered when the player uses a tipped arrow with the respective effect, or uses the /effect command to give the respective status effect)
How to reproduce
Create custom data pack(1.13 snapshot) OR place in the respective advancement folder (1.12.2)
{
"display": {
"title": "instant damage test",
"description": "",
"icon": {
"item": "minecraft:potion"
},
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png",
"show_toast": true,
"announce_to_chat": true
},
"criteria": {
"instant_damage": {
"trigger": "minecraft:effects_changed",
"conditions": {
"effects": {
"minecraft:instant_damage": {
}
}
}
}
}
}
}
(replacing the "effects" conditions with the respective status effect)
Then using a potion (drinking, slash, or lingering) with the assigned status effects.
I've included a world download with advancements and potions already made and ready to use.
Linked issues
is duplicated by 1
relates to 1
Attachments
Comments


What is the command you used to give the effect?

Here are the commands used:
/effect @s minecraft:instant_health 1 0
Successfully triggers advancements
/effect @s minecraft:instant_damage 1 0
Successfully triggers advancements
/effect @s minecraft:saturation 1 0
Successfully triggers advancements
Shooting an "Arrow of Healing" at the player Successfully triggers advancements
Shooting an "Arrow of Harming" at the player Successfully triggers advancements
Shooting an "Arrow of Healing" at the player Successfully triggers advancements
Shooting a "tipped_arrow" with the "saturation" effect using
/give @p minecraft:tipped_arrow 1 0 {Potion:"minecraft:water",CustomPotionEffects:[{Id:23}],display:{Name:"Custom Potion"}}
at a player Successfully triggers advancements
Drinking a "Potion of Healing" does not trigger advancements
Drinking a "Potion of Harming" does not trigger advancements
Drinking a "custom potion" with the command
/give @p minecraft:potion 1 0 {Potion:"minecraft:water",CustomPotionEffects:[{Id:23}]}
does not trigger advancements

Throwing a "Splash Potion of Healing" at a player does not trigger advancements
Throwing a "Splash Potion of Harming" at a player does not trigger advancements
Throwing a "custom potion" with the command
/give @p minecraft:splash_potion 1 0 {Potion:"minecraft:water",CustomPotionEffects:[{Id:23}]}
does not trigger advancements

Please stay away from the caps lock key.
I asked for the command with a reasoning, as these potions apply for 1 tick, but the command can apply it for more than 1 tick. If it did work > 1 tick but not with = 1 tick, then the bug would be simple: 1 tick effects not detected, while now (since it works for = 1 tick) the problem lies solely in the potions, which basically do the same as the command.

Throwing a "Lingering Potion of Healing" at a player does not trigger advancements
Throwing a "Lingering Potion of Harming" at a player does not trigger advancements
Throwing a "custom potion" with the command
/give @p minecraft:lingering_potion 1 0 {Potion:"minecraft:water",CustomPotionEffects:[{Id:23}]}
does not trigger advancements
I'm very sorry if I was unclear earlier! Please let me know if I can do anything else to help specify the issue.

My mistake! Very sorry about that! I've given the commands that I have used.
Regarding saturation potions: MC-25866.

Still affects 18w05a, please update!

Still affects 18w09a.
I should also mention that the "saturation" effect doesn't seem to be working properly for potions, splash potions, and lingering potions?