"effects_changed" advancement trigger can be used to give infinite status effects until the player dies
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.
Created Issue:
"effects_changed" advancement trigger can be used to give infinite status effects until the world is re-logged
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a Target has no effects to remove error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged. The same would happen even after multiple re-logs.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a Target has no effects to remove error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged
. The same would happenevenaftermultiplere-logs.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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a Target has no effects to remove error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a Target has no effects to remove error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a Target has no effects to remove error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug also affects Survival mode and other game modes,
Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug
also affects Survival mode andothergame modes,Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects the player has.
Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects the player has.Data pack
A data pack is provided below for easier reproduction.
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 re-logging the world.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Aside from Creative mode, other game modes such as Survival and Adventure mode are also affected.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
"effects_changed" advancement trigger can be used to give infinite status effects until the player is killed or the world is re-logged
"effects_changed" advancement trigger can be used to give infinite status effects until the playeris killedor the world is re-logged"effects_changed" advancement trigger can be used to give infinite status effects until the player dies or the world is re-logged
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
re-logging the world.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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
Re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Aside from Creative mode, other game modes such as Survival and Adventure mode are also affected.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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 or the world is re-logged.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Aside from Creative mode, other game modes such as Survival and Adventure mode are also affected.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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 or the world is re-logged.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
Aside from Creative mode, other game modes such as Survival and Adventure mode are also affected.The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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 or the world is re-logged.
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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 30 3- Use /effect give @s strength 30 3 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
"effects_changed" advancement trigger can be used to give infinite status effects until the player diesor the world is re-logged
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
or the world is re-logged.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 that will be run by the advancement:
advancement revoke @s only game:effects_changed effect give @s strength 303- Use /effect give @s strength 30
3to 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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.
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 that will be run by 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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.
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 that will be run by 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- Observe the effect when it reaches a duration of 00:00.
→The effect remains and cannot be cleared.
- Use /kill to kill the player
, or re-log the world.
→The effect is removed.
Other information
Occasionally, the status effect still remains with the player even after the world is re-logged, and the same would happen after subsequent re-logs.
The bug cannot be reproduced if there are other status effects given to the player in the process.
Data pack
A data pack is provided below for easier reproduction.
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 that will be run by 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- 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.
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
that will be run bythe 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; when using the command, it instead shows a "Target has no effects to remove" error message.
- 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.
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; when using the command, it instead shows a "Target has no effects to remove" error message.
- 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.
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
; when using the command, it instead showsa "Target has no effects to remove" error message.- 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.
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.