When removing a post_effect from a player using the /posteffect command, persistent targets do not get cleared. This can be a potential vram leak and makes certain effects such as a fade in effectively impossible to implement.
Steps to reproduce:
Download and activate the
post_effect targets bugs.zipresourcepack attachedRun the following command and notice how the screen fades from black to normal
/posteffect add @s post_effects_bug:fadeinNow run
/posteffect remove @s post_effects_bug:fadeinto clear the post effectFinally run
/posteffect add @s post_effects_bug:fadeinagain and notice how the screen does not fade in from black again, this is due to the persistent targets defined in the post_effect not being cleared
Expected behaviour:
When removing a post effect the targets would be cleared, in this example causing the fade in effect to play after enabling the post effect for a second time.
Additional notes:
Reloading resources with F3 + T while the post effect is disabled does clear the targets as expected////
Thank you for helping us improve Minecraft! We saved your files: