-
Bug
-
Resolution: Invalid
-
None
-
1.15.2, 20w21a, 20w22a
-
Unconfirmed
-
(Unassigned)
The bug
When using an effects_changed advancement that runs a reward function when granted, it can be used to give the player a status effect of an infinite duration when that same effect is given and then cleared beforehand. The status effect is then removed when the player dies.
The bug cannot be reproduced if there are other status effects given to the player in the process.
How to reproduce
- Create an effects_changed advancement with a reward function:
{ "criteria": { "effects_changed": { "trigger": "effects_changed" } }, "rewards": { "function": "game:effects_changed" } }
- Create a reward function for the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 127
- Use /effect give @s strength 30 127 to get a Strength effect with the same duration and amplifier as the one in the function.
- Use /effect clear or a Milk Bucket to clear the effect.
→ The effect is cleared and then given again to the player. - Repeat the previous procedure.
→ The effect is no longer cleared, and a "Target has no effects to remove" error message is shown when using the command. - Observe the effect when it reaches a duration of 00:00.
→ The effect remains and cannot be cleared even when re-logging the world. - Use /kill to kill the player.
→ The effect is removed.
Data pack
A data pack is provided below for easier reproduction.