mojira.dev
MC-309768

Persistent targets in `post_effects` are not cleared when removing the effect with `/posteffect`

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.zip resourcepack attached

  • Run the following command and notice how the screen fades from black to normal /posteffect add @s post_effects_bug:fadein

  • Now run /posteffect remove @s post_effects_bug:fadein to clear the post effect

  • Finally run /posteffect add @s post_effects_bug:fadein again 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////

Attachments

Comments 3

Thank you for helping us improve Minecraft! We saved your files:

[media]

Can confirm. This happens to me too.

Can confirm, I had the same problem, it only worked once when I first used it

Enchanted_Games

Nathan Adams

Confirmed

Platform G

Normal

Rendering

26.3 Snapshot 3

26.3 Pre-Release 1

Retrieved